Fix bash tool timeout for OpenCode

It's simple enough but not that easy to find!

I've recently been experimenting a lot with OpenCode – an open source alternative to Claude Code and Gemini CLI.

Just like with many an open source software, there are a number of issues to deal with to get it working.

One particularity annoying one was that when the agent called the command line using the 'bash tool', it would time out after 2 minutes.

Error message from the bash tool

bash tool terminated command after exceeding timpout 120000 ms

That was not compatible with my full test suite 😅

Thankfully, there was an easy enough, if somewhat hidden, fix.

Simply set the OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS environment variable.

I added it to my ~/.bashrc:

# OpenCode

export OPENCODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS=3600000

Now after a quick restart of the terminal, my test suite could run uninterrupted:

Results if my test suite running after taking it's sweet time

If you need more information, also don't fail to check out OpenCode issue #4788.