bash tool often times out
Hey, loving opencode.
A clean build + test in my repo takes more than 2 minutes, and I could easily see it growing to more than 10 minutes for some tasks. I am seeing timeouts in the bash tool command often. Even with hints, it is often forgetting to set the timeout parameter (as far as I can tell)
My preferred fix:
- default timeout is no timeout (runs forever)
- max timeout is very long (1 day? infinite?)
Happy to submit a PR if this would be welcome.
been using #1811 for a while now and its definitely better. Meanwhile I am working on a bash MCP to try and give the LLM full control over long running commands https://github.com/xhuw/async-bash-mcp
hi @thdxr @xhuw
Could you fix this issue?
default timeout is no timeout (runs forever) max timeout is very long (1 day? infinite?)
We could prolly change it hmm
I think normally the concern tho is an agent will start a server or something itself and when it is looping itself it gets stuck, and a lot of people dont want that
We could prolly change it hmm
hi @rekram1-node
Is there anything for this issue?
I actually merged something for this @junmediatek it will be in next release:
default timeout will be 2 min, max timeout is gone (no cap)
I actually merged something for this @junmediatek it will be in next release:
default timeout will be 2 min, max timeout is gone (no cap)
Hi @rekram1-node I find the source code, however, how to set the bash tool timeout by opencode.json?
which timeout are u wanting to set? The default?
which timeout are u wanting to set? The default? @rekram1-node Yes, I want to re-set the default bash tool for my building task that lasts up to one hour or more
I actually merged something for this @junmediatek it will be in next release:
default timeout will be 2 min, max timeout is gone (no cap)
how to increase timeout I want to have 20 hour timeout
opencode timeouts are incredibly obnoxious
hi @Kreijstal
I think you can refer to claude code which has BASH_DEFAULT_TIMEOUT_MS & BASH_MAX_TIMEOUT_MS environment variables, they are can be set in the setting.json file.
in next release we will have OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS