[BUG] Timeout crash when writing files with VS Code integration - Error after 1000ms waiting

Status Fixed / completed
Maintainer reply ✓ Yes — rboyce-ant
Activity 7 comments · opened Jul 11, 2025 · closed Jul 25, 2025
💡 Likely answer: A maintainer (rboyce-ant, contributor) responded on this thread — see the highlighted reply below.

## Bug Description
Claude Code crashes with a timeout error when writing files that trigger VS Code integration prompts.

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

Error: Timeout waiting after 1000ms
at cN2 (file:///home/ali/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1375:13672)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ZR6 (file:///home/ali/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1958:12070)
at async J (file:///home/ali/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1958:10781)

## Steps to Reproduce

  1. Ask Claude to create/write a file (in this case public/favicon.svg)
  2. VS Code integration opens the file with confirmation dialog
  3. Dialog shows: "Do you want to make this edit to favicon.svg?"
  4. Wait for user response - timeout occurs after 1000ms
  5. Claude Code crashes with the above error

## Expected Behavior

  • Should wait for user response without timeout
  • Should handle user interaction gracefully
  • Should not crash the entire process

## Environment

  • OS: Linux 6.12.10-76061203-generic
  • Node.js: v22.17.0
  • Claude Code: Latest version
  • VS Code: Integrated
  • Working Directory: Git repository

## Impact

  • Complete crash of Claude Code session
  • Loss of conversation context
  • Interrupts development workflow

## Additional Context
This appears to be related to VS Code integration timing out while waiting for user confirmation on file operations.

View original on GitHub ↗

7 Comments

rboyce-ant contributor · 1 year ago

@azorlu80 Can you check your Claude Code version? This should be fixed in v1.0.45 or newer

azorlu80 · 1 year ago

Hi @rboyce-ant,

I've tested with Claude Code v1.0.51 and the issue is still occurring, but with an important detail: this appears to be specific to SVG files.

Test Results:

  • ✅ .txt files: Work fine, no timeout
  • ✅ Other file types: No issues observed
  • ❌ .svg files: Timeout crash after 1000ms

SVG File Test:

  • Version: v1.0.51
  • Command: Asked Claude to create public/favicon.svg
  • Result: Same timeout crash

Error Log:
Error: Timeout waiting after 1000ms
at Uq2 (file:///home/ali/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1383:14523)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async iR6 (file:///home/ali/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1969:12396)
at async J (file:///home/ali/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1969:11106)

Key Finding:
This seems to be SVG-specific - VS Code integration handles other file types without timeout, but SVG files trigger the 1000ms timeout crash.

Environment:

  • OS: Linux 6.12.10-76061203-generic
  • Node.js: v22.17.0
  • Claude Code: v1.0.51
  • VS Code: Integrated

The fix for v1.0.45+ may have resolved general timeout issues, but there appears to be a remaining issue specifically with SVG file handling in VS Code
integration.

epsniff · 1 year ago

I'm seeing the same issues with SVGs:

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

Error: Timeout waiting after 1000ms
    at Uq2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1383:14523)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async iR6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1969:12396)
    at async J (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1969:11106)

Node.js v20.19.3

The workaround is to open Claude-code in a non-VSCode terminal, so that it doesn't use the VSCode integration, and it works fine.

sokeroner · 1 year ago

@rboyce-ant I think I've found the source of the problem.
The timeout issue occurs when you use an extension that modifies the display of a file.

For example, I encountered the issue with MD files when using the Novel-VSCode extension, which modifies the rendering of Markdown files directly.

For SVGs, you may have simply the image preview enabled by default.
You can disable it in the settings file:

"workbench.editorAssociations": {
  "*.svg": "default"
}

If I disable these extensions, it works perfectly!

These plugins are likely to be in conflict with the difftool, or perhaps they simply take too long to render.

thesubtleties · 1 year ago
@rboyce-ant I think I've found the source of the problem. The timeout issue occurs when you use an extension that modifies the display of a file. For example, I encountered the issue with MD files when using the Novel-VSCode extension, which modifies the rendering of Markdown files directly. For SVGs, you may have simply the image preview enabled by default. You can disable it in the settings file: `` "workbench.editorAssociations": { "*.svg": "default" } `` If I disable these extensions, it works perfectly! These plugins are likely to be in conflict with the difftool, or perhaps they simply take too long to render.

Also happens if you have:

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

set in your VSCode settings json file. This automatically previews markdown files (which is really nice QoL), but Claude Code will crash if it tries to edit these while connected to your IDE. If you detach from the IDE, it will work fine. I tested this by removing this line in my settings and the edit then worked first try. Of course, that is also changing the display of a file, so similar idea to the extension issue.

Fix for now is using Markdown All in One and enabling automatic side by side preview. CC can still make updates without crashing.

blois collaborator · 1 year ago

Claude Code should now fall back to displaying the diff in the terminal if the diff tool cannot be opened.

github-actions[bot] · 1 year 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.