GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — How to control Timeouts · Issue #1065 · anomalyco/opencode

How to control Timeouts #1065

New issue
Copy link
New issue
Copy link
Closed
#1982
Closed
How to control Timeouts#1065
#1982
Copy link
Assignees
thdxr

Description

@mrbm
mrbm
opened on Jul 16, 2025
Issue body actions

I am running ollama on my local network on a dedicaled m4 24gig with Qwen3:14b Quant with 65k context window.

I had it create a slightly more than basic react app and it created things, wrote some of the thngs in the dialog and wrote 50% of the things to disk, the other 50 it didn't I gave it a command to write the rest of the items...and then it did some, but not all of it, i did another command to finish...and now it just timesout.

I am reading the ollama serve logs and noticed that open code is sending a timeout singnal around 4 min ond each time.

So...the issue is opencode.

I didn't set a timeout in the config. Then i tried setting a timeout in the opencode config to 600 seconds, same results.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "ollama-local-remote": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "http://192.168.XX.XXX:11434/v1",
        "timeout": 600000
      },
      "models": {
        "llama3:8b": {"name": "Ollama Llama3"},
        "qwen3:14b-65k": {
          "name": "qwen3:14b 65k (remote local)",
          "tools": true,
          "reasoning": true,
          "options": { "num_ctx": 65536 }
        },
        "qwen3:14b-q4_K_M": {
          "name": "qwen3:14b-q4_K_M (remote local)",
          "tools": true,
          "reasoning": true
        }

Is this the right way to do it? Or is this something that can't be changed. Thanks! OpenCode.ai special sauce is going to be for those homebuilds which are going to have less resources and as a result opencode needs to be able to wait longer. Love the community thoughts or is this coming soon. I think there was 3 releases yesterday so i know things are happening rapidly.

Reacted by Nick Poorman, Vasiliy Kulikov, Paul Lesiak, Baptiste Gaillard, Kaan Tekiner, agentic-ai-forge and Emmanuel Bourg
Reacted by ubergarm

Activity

Next
  1. thdxr commented on Jul 16, 2025

    @thdxr
    thdxr
    on Jul 16, 2025 – with Linear
    Member
    More actions

    hmm im not sure where this timeout is being set - i don't think that timeout option exists

  2. thdxr
    self-assigned this
    on Jul 16, 2025
  3. mrbm commented on Jul 16, 2025

    @mrbm
    mrbm
    on Jul 16, 2025
    Author
    More actions

    I am not attempted to be super familiar with the code base, but just a quick search brings me to this:

    https://github.com/sst/opencode/blob/dev/packages/opencode/src/util/timeout.ts

    Is there a way to set this project to wait a certain time length max or indefinitely? Or does this have a default waiting period occuring at some stage of the project? Maybe some &http.Client method has a default timeout? I'm in a dr office waiting with my eyes dialated so can't really see anymore.. but maybe these notes help

  4. douglarek commented on Jul 17, 2025

    @douglarek
    douglarek
    on Jul 17, 2025
    More actions

    Maybe same as #655, opencode does not complete a download service but ends abruptly. My scenario is upgrading software packages in the Gentoo overlay. The download stops halfway, causing the Manifest that records the package to write an incorrect checksum.

  5. mrbm commented on Jul 17, 2025

    @mrbm
    mrbm
    on Jul 17, 2025
    Author
    More actions

    https://github.com/sst/opencode/blob/60b55f9d921805a4a9d38c9eed05a060df08df82/packages/opencode/src/tool/bash.ts

    i see timeouts here, i have no idea how this might be effecting http.client requests to an llm or requests for other things, but i think there is a possible issue somehere.

  6. mrbm commented on Jul 17, 2025

    @mrbm
    mrbm
    on Jul 17, 2025
    Author
    More actions

    @thdxr i think the real pillar of strength that claude and google can't take from this project will be the ability to use local models which are obvious always going to run slower. I do think testing on a slow response scenario where from a separate machine running ollama might not response for 7 min while it thinks is a worthy test case to backtrack and find where open code might be closing the connection pre-maturely.

    Reacted by Rick Stoner, Alistair Stewart, k4ss4n, cyjin.yl, askoan and MichalNawrocik
  7. thdxr commented on Jul 24, 2025

    @thdxr
    thdxr
    on Jul 24, 2025
    Member
    More actions

    yep will look into this

    Reacted by Gabriel Garrett, Rick Stoner, Julio Daniel Reyes, k4ss4n, Laelia-Succubus, Robert Baskette, Akira Makino, Roberto Canha, agentic-ai-forge and sleebu
  8. noahfraiture commented on Jul 28, 2025

    @noahfraiture
    noahfraiture
    on Jul 28, 2025
    More actions

    I agree that timeout would be very convenient, but also for other capabilities like bash execution

  9. ggaabe commented on Jul 31, 2025

    @ggaabe
    ggaabe
    on Jul 31, 2025
    Contributor
    More actions

    running into timeouts from slow local model responses as well. would be great to control.

    Reacted by Nick Poorman, Rick Stoner, bzessack, xqzhou, Roberto Canha and Avalanche Ridings
  10. dc-tec commented on Aug 1, 2025

    @dc-tec
    dc-tec
    on Aug 1, 2025
    More actions

    Same here when running a larger local model, would be nice if we could configure the timeout.

    Reacted by bzessack, xqzhou and Roberto Canha
    Reacted by Emanuel López
  11. dysangel commented on Aug 3, 2025

    @dysangel
    dysangel
    on Aug 3, 2025
    More actions

    same. My model was trying to do multiple tool calls and eventually timing out. I'd be happy to just be able to disable the timeout for local use

    Reacted by Rick Stoner, k4ss4n, KrisKennaway, Beshoy Girgis and Roberto Canha
  12. egyptianbman commented on Aug 9, 2025

    @egyptianbman
    egyptianbman
    on Aug 9, 2025
    Contributor
    More actions

    Same here, getting constant timeouts with ollama. When this happens, the request is not aborted so the model keeps churning and subsequent requests are more likely to fail as the model is busy.

  13. dysangel commented on Aug 9, 2025

    @dysangel
    dysangel
    on Aug 9, 2025
    More actions

    I've been looking into this the last few days. By default a lot of network requests time out after 5 minutes. I'm submitting a PR to mlx-lm to send back SSE comments which notify that the prompt is currently processing and keep the connection alive. If necessary we could make similar keepalive tweaks to ollama and llama.cpp etc to allow time for local models to process very large contexts without all the clients disconnecting

  14. jamviking commented on Aug 9, 2025

    @jamviking
    jamviking
    on Aug 9, 2025
    More actions

    As I am experiencing the same timeout issue when running OpenCode against a local LMStudio installation, us local users need a way to override the default NodeJS timeout as documented here: https://blog.appsignal.com/2023/11/08/how-to-use-timeouts-in-nodejs.html

    Hope this helps as I need it...

    Reacted by eggp
  15. dysangel commented on Aug 9, 2025

    @dysangel
    dysangel
    on Aug 9, 2025
    More actions

    @jamviking if you're using an MLX model, then yes that issue is still present

    Reacted by jamviking and eggp
  16. 8 remaining items

  17. egyptianbman commented on Aug 18, 2025

    @egyptianbman
    egyptianbman
    on Aug 18, 2025
    Contributor
    More actions

    For those that are blocked by the fix being merged, I've found that https://github.com/charmbracelet/crush works as well as opencode and doesn't suffer from the timeout issue.

    Reacted by Hans Nielsen
  18. dysangel commented on Aug 18, 2025

    @dysangel
    dysangel
    on Aug 18, 2025
    More actions

    my fix for mlx-lm was merged into main, so if you set up an MLX server now, you should have no timeout issues

  19. eduardogarre commented on Aug 24, 2025

    @eduardogarre
    eduardogarre
    on Aug 24, 2025
    More actions

    Also affected by this issue

  20. mrbm commented on Aug 24, 2025

    @mrbm
    mrbm
    on Aug 24, 2025
    Author
    More actions

    Hey @thdxr just making sure you saw this and the solution somebody provided.

  21. adamwlarson commented on Aug 26, 2025

    @adamwlarson
    adamwlarson
    on Aug 26, 2025
    More actions

    also impacted by this

  22. dannyfranca commented on Aug 30, 2025

    @dannyfranca
    dannyfranca
    on Aug 30, 2025
    More actions

    1+, Using GPT-5 with Opencode and high reasoning is not practical at all.

  23. thdxr
    closed this as completedin #1982on Aug 31, 2025
  24. rekram1-node commented on Aug 31, 2025

    @rekram1-node
    rekram1-node
    on Aug 31, 2025
    Member
    More actions

    support will be added in next release thx for your patience

    Reacted by Beshoy Girgis, Andrew Black, Seth Jones, Joshua Kuestersteffen, Stephen M. Clark, Danny França, Henrik Mohr, Artem R, eduardogarre and Chaos
  25. Cyrille37 commented on Nov 5, 2025

    @Cyrille37
    Cyrille37
    on Nov 5, 2025
    More actions

    Thanks for timeout provider option, it works great.

    I need an increased timeout with my computer without GPU

  26. wangsen992 commented on Dec 16, 2025

    @wangsen992
    wangsen992
    on Dec 16, 2025
    More actions

    Thanks for timeout provider option, it works great.

    I need an increased timeout with my computer without GPU

    @Cyrille37 I'm look for a solution to this issue. Based on your comment it seems you managed to do this, may I ask how did you do it to enable longer timeouts? Thank you!

  27. rekram1-node commented on Dec 16, 2025

    @rekram1-node
    rekram1-node
    on Dec 16, 2025
    Member
    More actions

    @wangsen992 what version are u on, what timeouts are u seeing?

  28. Cyrille37 commented on Dec 17, 2025

    @Cyrille37
    Cyrille37
    on Dec 17, 2025
    More actions

    @wangsen992 Added timeout in provider's options config. Have a look at #3708 for an example.

  29. Cyrille37 commented on Dec 17, 2025

    @Cyrille37
    Cyrille37
    on Dec 17, 2025
    More actions

    Also, this option is not in documentation, only found in config schema.

    Reacted by Hicsy
  30. dysangel commented on Dec 17, 2025

    @dysangel
    dysangel
    on Dec 17, 2025
    More actions

    @Cyrille37 thanks! I'll have to try open again sometime

  31. andreipromarketing-dev
    added a commit that references this issue on Apr 7, 2026

    chore(deps-dev): bump c8 from 10.1.3 to 11.0.0 (anomalyco#1065)

    6b82abe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @thdxr
    thdxr

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.