Skip to content
BENIBIX Learn

BASH_DEFAULT_TIMEOUT_MS vs BASH_MAX_TIMEOUT_MS

People think raising BASH_MAX_TIMEOUT_MS gives every command more time. It does not. BASH_DEFAULT_TIMEOUT_MS is the time a command gets when Claude asks for none, 2 minutes unless you change it. BASH_MAX_TIMEOUT_MS is the most Claude may ask for, 10 minutes unless you change it. Raise the default when all your commands are slow, and the top when only a few are.

AI⌨️ Claude Code

BASH_DEFAULT_TIMEOUT_MS

It sets how long a command runs before it is stopped.

BASH_DEFAULT_TIMEOUT_MS sets how long a shell command may run before Claude Code stops it, when Claude does not ask for a time. The value is in milliseconds. The default is 120,000, which is 2 minutes. It covers PowerShell commands too.

Example
Lucy's test suite takes 4 minutes, and it kept being stopped at 2. She sets the default to 5 minutes, and the tests finish.
Why it matters
Slow builds and tests get cut off for no reason when the timer is too short.
Full entry
AI⌨️ Claude Code

BASH_MAX_TIMEOUT_MS

It sets the longest time Claude may ask a command to run.

BASH_MAX_TIMEOUT_MS sets the longest time Claude may ask for when it runs a shell command. The value is in milliseconds. The default is 600,000, which is 10 minutes. The real top is whichever is larger, this or the default timeout.

Example
Jack's full build takes 20 minutes. He raises the top to 30 minutes, so Claude can ask for enough time on that one command.
Why it matters
Most commands stay short, while the few long ones can still finish when Claude asks.
Full entry

In one line

BASH_DEFAULT_TIMEOUT_MS
It sets how long a command runs before it is stopped.
BASH_MAX_TIMEOUT_MS
It sets the longest time Claude may ask a command to run.