Skip to content
BENIBIX Learn

BASH_DEFAULT_TIMEOUT_MS

AI⌨️ Claude CodeConfiguration

Also known as BASH_DEFAULT_TIMEOUT_MS environment variable

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

Think of it like

It is like a kitchen timer. It rings if a dish takes too long.

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.

Definition

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 code

bash
export BASH_DEFAULT_TIMEOUT_MS=300000
claude
Give commands 5 minutes by default.
The default is the first mark on the line.

Common mistake

Writing seconds. 300 means 0.3 seconds here. Write 300000 for 5 minutes.

Key takeaways

  1. 1
    Milliseconds. Not seconds.
  2. 2
    Default 2 minutes. 120,000.
  3. 3
    When Claude asks none. The usual case.

Compare