[BUG] Claude ignores BASH_DEFAULT_TIMEOUT_MS environment variable

Resolved 💬 5 comments Opened Feb 18, 2026 by greg-mcnamara-datacom Closed Mar 19, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I'm prompting the Bash tool to call some uv run commands and the timeout is shown as 10 minutes in the tool output. For some long-running tasks I need a longer timeout. I read in #5615 that the BASH_DEFAULT_TIMEOUT_MS environment variable could be used to increase this, and that it needs to be set in ~/.claude/settings.json. I added a setting to increase the timeout to 30 minutes (1800000) and restarted Claude. I then noticed that the reported timeout from the Bash tool actually dropped to 5 minutes. On subsequent runs it seemed to alternate between 5 minutes and 10 minutes randomly, but never respected the 30 minute timeout I had configured.

What Should Happen?

Setting the BASH_DEFAULT_TIMEOUT_MS environment variable in the env section of ~/.claude/settings.json should adjust the timeout for Bash tool calls.

Error Messages/Logs

Steps to Reproduce

  1. Add Bash tool timeout settings to ~/.claude/settings.json as shown below:
{
  "mcpServers": {
    // ... existing configurations
  },
  "env": {
    "BASH_DEFAULT_TIMEOUT_MS": "1800000",    // 30 minutes
    "BASH_MAX_TIMEOUT_MS": "7200000"         // 120 minutes
  },
  "hooks": {
    // ... existing hooks
  }
}
  1. Open a new Claude Code terminal session and prompt Claude to run the Bash tool with command uv run [script_file_path].
  2. Tool output shows the command being run successfully and reports the timeout as either 10 minutes or 5 minutes (ignores the configured values).

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.45

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗