You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
question: bash tool timed out after 60 seconds? #4788
hey so seems like when llm runs some long running cli process such as docker builds via the bash tool . it seems to timeout the process after 60s ?or such so . even tho the process had flowing output on the tui . timeout is a parameter for llm to choose or its just default hardcoded ?
changed the title [-]even tho process was priniting stuff timeout kills the process[/-][+]question: bash tool timed out after 60 seconds?[/+]on Nov 26, 2025
the main idea here is to prevent someone from starting a task and letting the llm work and then wondering why it never stops, like a dev server, some servers have background jobs that could still be logging things.
But i see what u want. Other people have asked for it to be configurable and stuff
I suggest that after a 60-second timeout, the task should be run in the background, and the LLM should be returned the logs already output along with a PID. The LLM should be instructed that it can use the job_output(pid, max_wait_time) tool to retrieve and wait for more output, or use job_kill(pid) to terminate the process.
If the process has not finished by the time job_output(pid, max_wait_time) exceeds the wait time, the LLM should be returned the output up to that point, and then prompted that it can wait for a longer duration.
This way, the LLM can keep development servers running continuously in the background, check outputs, or execute long-running tasks like pytest without interruption.
This idea comes from the crush project, and I think it's a great design. I submitted a PR, but they seem too busy to handle it... charmbracelet/crush#1496
you forgot to say that OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS only accepts a 32bit integer and 999999999999 ms is not allowed and it will default to 1 ms instead
Activity
github-actions commentedon Nov 26, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Nov 26, 2025
it defaults to 60 seconds but the llm can choose a value, we cap it at 10min rn
[-]even tho process was priniting stuff timeout kills the process[/-][+]question: bash tool timed out after 60 seconds?[/+]aptdnfapt commentedon Nov 26, 2025
could make it reset its timer if the terminal output is flowing ?
or yeah 10 min also works but a dynamic logic is better ig
rekram1-node commentedon Nov 26, 2025
the main idea here is to prevent someone from starting a task and letting the llm work and then wondering why it never stops, like a dev server, some servers have background jobs that could still be logging things.
But i see what u want. Other people have asked for it to be configurable and stuff
heimoshuiyu commentedon Dec 4, 2025
I suggest that after a 60-second timeout, the task should be run in the background, and the LLM should be returned the logs already output along with a PID. The LLM should be instructed that it can use the
job_output(pid, max_wait_time)tool to retrieve and wait for more output, or usejob_kill(pid)to terminate the process.If the process has not finished by the time
job_output(pid, max_wait_time)exceeds the wait time, the LLM should be returned the output up to that point, and then prompted that it can wait for a longer duration.This way, the LLM can keep development servers running continuously in the background, check outputs, or execute long-running tasks like
pytestwithout interruption.This idea comes from the
crushproject, and I think it's a great design. I submitted a PR, but they seem too busy to handle it... charmbracelet/crush#1496Kreijstal commentedon Dec 9, 2025
truly the most annoying thing of opencode is damn timeout
rekram1-node commentedon Dec 9, 2025
the default timeout is 2min now ig we could make it configured, keep in mind tho the agent can set it to any time it wants or you can instruct it to
Kreijstal commentedon Dec 9, 2025
pls make it configurable, I cannot keep telling the agent or the agent keeps forgetting
rekram1-node commentedon Dec 9, 2025
itll be configurable in next release
rekram1-node commentedon Dec 9, 2025
added OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS env var, it will be in next release
Kreijstal commentedon Dec 15, 2025
you forgot to say that OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS only accepts a 32bit integer and 999999999999 ms is not allowed and it will default to 1 ms instead
abda11ah commentedon Jan 17, 2026
hi, pls fix the feature, it won't work
my .bashrc file
then imported it
but i still get
rekram1-node commentedon Jan 17, 2026
@abda11ah the llm can pass a custom timeout when it invokes the tool, in this example that's what it did
anes1178 commentedon Apr 15, 2026
Hello, I’m experiencing the same issue as well. In that case, how should I instruct the agent? Is there a guide I can follow?