[BUG] Error: Timeout waiting after 1000ms in claude-code CLI (Node.js v20.19.3)

Resolved 💬 16 comments Opened Jun 23, 2025 by felixg3 Closed Jan 5, 2026

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.31 (Claude Code)
  • Operating System: macOS 15.5
  • Terminal: VSCode

Bug Description

node:internal/process/promises:391
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: Timeout waiting after 1000ms
    at FC2 (.../cli.js:1366:11718)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async nF5 (.../cli.js:1979:9952)
    at async F (.../cli.js:1979:8806)

Steps to Reproduce

  1. Install Node.js 20.19.3 (e.g. via n)
  2. Install @anthropic-ai/claude-code globally
  3. Run any Claude Code command (e.g. claude -p "<your-prompt>")
  4. Wait ~1–2 minutes
  5. Observe crash with the above stack trace

Expected Behavior

• No uncaught exceptions
• CLI should retry or extend timeout if the Claude API takes longer than 1000ms
• Graceful failure or logging without process crash

Actual Behavior

• Process crashes during promise resolution
• Error originates from triggerUncaughtException in node:internal/process/promises
• The default timeout of 1000ms seems insufficient under regular network/load conditions

Additional Context

Troubleshooting Done
• Verified Node version: node -v → v20.19.3
• Confirmed the crash is intermittent but reproducible under normal CLI usage
• No relevant environment variables (e.g. BASH_DEFAULT_TIMEOUT_MS) were customized
• Homebrew node v24 was unlinked to ensure clean Node environment

View original on GitHub ↗

16 Comments

AI-Guru · 1 year ago

Same here. Makes Claude Code unusable.

AI-Guru · 1 year ago

So far, this has happened only inside VSCode. Not in a regular terminal.

sergenX1 · 1 year ago

happening in Cursor when using the extension and via terminal within Cursor and very annoying

evdutt · 1 year ago

Getting this error when asking Claude in VSCode terminal to make a Jupyter notebook exploring a CSV dataset. It makes the notebook but before I can press 1 to accept, it crashes with the above error. Seems that getting stuck on one task (not iterating or moving down a todo list) for more than two minutes is related. Tried exact same prompt in the same codebase in a standalone (not VSCode) terminal and it worked just fine. I am also on Mac, using Python and Node installed via Homebrew.

glitchculture · 1 year ago

Seems similar to this issue (Mac, Claude CLI run in VS Code terminal). I posted a workaround here:
[https://github.com/anthropics/claude-code/issues/2547](url)

evdutt · 1 year ago
Seems similar to this issue (Mac, Claude CLI run in VS Code terminal). I posted a workaround here: [https://github.com/anthropics/claude-code/issues/2547](url)

Interesting. Jupyter notebooks have markdown in them which would explain why I was having that issue.

felixg3 · 1 year ago
> Seems similar to this issue (Mac, Claude CLI run in VS Code terminal). I posted a workaround here: [https://github.com/anthropics/claude-code/issues/2547](url) Interesting. Jupyter notebooks have markdown in them which would explain why I was having that issue.

correct i was using jupyter

Jenosize · 1 year ago

I’m hitting the same 1000 ms timeout crash.

Environment

  • Claude Code CLI: v1.0.31
  • Node.js: v20.19.3 (installed via n, Homebrew Node unlinked)
  • macOS: 15.5 (Apple Silicon)
  • Terminal: VS Code integrated terminal
yuji-yasuno · 1 year ago

I have the same issue; Claude crashes crashes at the same point every time I create it when creating Jupyter Notebook.

Environment

Claude Code CLI: v1.0.35
Node.js: v22.14 (using nodenv installed via anyenv)
macOS: 15.5 (Apple Silicon)
Terminal: VS Code and Cursor

Orchid420 · 1 year ago

@bcherny please help

mcbeaker · 1 year ago

Claude crashes after planning to edit an md file

node:internal/process/promises:394
triggerUncaughtException(err, true / fromPromise /);
^

Error: Timeout waiting after 1000ms
at wC2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1368:11718)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async nF5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1929:11635)
at async F (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1929:10489)

Node.js v24.3.0
macOS:15.4 (intel)
Terminal: VS Code

scottwritescode · 1 year ago

This same issue popped up for me and I realized I had recently turn on VSCode's ability to always open Markdown files in "Preview", not the markdown text.

Breaking VSCode settings.json setting

    "workbench.editorAssociations": {   
        "*.md": "vscode.markdown.preview.editor",
    }   

Removing this block from the settings file - (turning off "Automatically open markdown files in preview mode") - fixed the issue for me.

siri666666 · 1 year ago

same
node:internal/process/promises:394
triggerUncaughtException(err, true / fromPromise /);
^

Error: Timeout waiting after 1000ms
at UN2 (file:///root/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1372:13682)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async oL6 (file:///root/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1948:11756)
at async J (file:///root/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1948:10610)

Node.js v24.3.0

github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] · 6 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 6 months 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.