Skip to content

"Add Configurable Timeout for Shell Command Execution" #1039

Closed

Description

@robspassky

Bug Description
Would like to be able to configure timeout on shell commands. Got a make command that needs more than two minutes to run tests

Environment Info

  • Platform: linux
  • Terminal: tmux
  • Version: 0.2.107
  • Feedback ID: 6cfd71b8-deb3-49ea-8694-c00b859539cc

Errors

[{"error":"ShellError: Shell command failed\n    at Object.call (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1369:862)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Go5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:5936)\n    at async br1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3766)\n    at async iV6 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2616)\n    at async er5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3090)\n    at async vr1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3024)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2147)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2544)\n    at async g2 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:2228:1755)","timestamp":"2025-05-09T18:25:41.832Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1369:862)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Go5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:5936)\n    at async br1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3766)\n    at async iV6 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2616)\n    at async er5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3090)\n    at async vr1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3024)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2147)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2544)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2544)","timestamp":"2025-05-09T18:26:18.385Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1369:862)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Go5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:5936)\n    at async br1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3766)\n    at async iV6 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2616)\n    at async er5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3090)\n    at async vr1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3024)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2147)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2544)\n    at async Jr (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:2544)","timestamp":"2025-05-09T18:26:25.267Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1369:862)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Go5 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:5936)\n    at async br1 (file:///home/robc/.fnm/node-versions/v23.11.0/installation/lib/node_modules/@anthropic-ai/claude-code/cli.js:1894:3766)\n    at async iV6 (file:///home/robc/.fnm/node-versions/v23.11.0/

Note: Error logs were truncated.

Activity

  1. djaddis commented on May 10, 2025

    @djaddis

    I also ran into this. It seems you can ask Claude to run it with a longer timeout, and the maximum is 10 minutes.

    Would be nice to have a setting for it though

  2. bcherny commented on May 13, 2025

    @bcherny
    Collaborator

    This is shipped in the latest -- control this with the BASH_MAX_TIMEOUT_MS and BASH_MAX_OUTPUT_LENGTH env vars. Docs incoming.

  3. self-assigned this
    on May 13, 2025
  4. github-actions commented on Aug 10, 2025

    @github-actions

    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.

  5. locked as resolved and limited conversation to collaborators on Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions