[BUG] There is no way to override the 2 minute timeout for shell commands

Status Fixed / completed
Maintainer reply ✓ Yes — wolffiex
Activity 5 comments · opened Jun 5, 2025 · closed Jun 5, 2025
💡 Likely answer: A maintainer (wolffiex, collaborator) responded on this thread — see the highlighted reply below.

When a shell command is launched, if it doesn't complete within 2 minutes, Claude Code kills it. There seems to be no way to increase the timeout. If you insist, Claude Code says something like "This is very slow. I'll move on with another task."

Some commandline tasks take longer than 2 minutes to complete... please make the timeout configurable, or even better, when a command times out, before it is killed ask the user if they want to kill it, or increase the timeout and try again, or keep waiting.

View original on GitHub ↗

5 Comments

wolffiex collaborator · 1 year ago

You can ask Claude to increase the timeout; it has an optional parameter for this

lukehutch · 1 year ago

I tried that, of course; in my case it didn't work. So it apparently ignores that request sometimes.

wolffiex collaborator · 1 year ago

ok you can also try https://docs.anthropic.com/en/docs/claude-code/settings#environment-variables: BASH_DEFAULT_TIMEOUT_MS and BASH_MAX_TIMEOUT_MS

lukehutch · 1 year ago

@wolffiex Super helpful, thanks, I didn't see that.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.