[BUG] Error: Timeout waiting after 1000ms in claude-code CLI (Node.js v20.19.3)
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- 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
Same here. Makes Claude Code unusable.
So far, this has happened only inside VSCode. Not in a regular terminal.
happening in Cursor when using the extension and via terminal within Cursor and very annoying
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.
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
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
Interesting. Jupyter notebooks have markdown in them which would explain why I was having that issue.
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
Interesting. Jupyter notebooks have markdown in them which would explain why I was having that issue.
correct i was using jupyter
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
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
@bcherny please help
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
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.
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