[BUG] Claude Code extension in VSCode hangs with WebSocket/bidirectional communication
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 hope this is the right place to report this - Claude Code told me to place it here but I'm not sure since it's the extension in VS Code. I am working in VSCode using the Claude Code extension and SSH'ing into my Synology NAS. Relatively often, if the memory in the NAS is getting overloaded Claude ends up hanging where it seems to be still deciding what to do, but never finishes and hitting the stop button does nothing. Checking the output show the task completed but never notified the VS Code extension. Output log is:
What Should Happen?
ensure front end is notified when back end finishes
Error Messages/Logs
2026-01-10 10:06:55.192 [info] From claude: 2026-01-10T15:06:55.191Z [DEBUG] [API:auth] OAuth token check complete
2026-01-10 10:06:59.450 [info] From claude: 2026-01-10T15:06:59.434Z [DEBUG] Stream started - received first chunk
2026-01-10 10:07:03.024 [info] From claude: 2026-01-10T15:07:03.024Z [DEBUG] Getting matching hook commands for SubagentStop with query: undefined
2026-01-10T15:07:03.024Z [DEBUG] Found 0 hook matchers in settings
2026-01-10 10:07:03.024 [info] From claude: 2026-01-10T15:07:03.024Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2026-01-10 10:07:04.801 [info] From claude: 2026-01-10T15:07:04.800Z [DEBUG] executePreToolHooks called for tool: Edit
2026-01-10 10:07:04.801 [info] From claude: 2026-01-10T15:07:04.801Z [DEBUG] Getting matching hook commands for PreToolUse with query: Edit
2026-01-10T15:07:04.801Z [DEBUG] Found 2 hook matchers in settings
2026-01-10 10:07:04.801 [info] From claude: 2026-01-10T15:07:04.801Z [DEBUG] Matched 2 unique hooks for query "Edit" (2 before deduplication)
2026-01-10 10:07:04.805 [info] [DiagnosticTracking] Captured baseline diagnostics for /volume1/VSCode/Quorum/architecture_doc.md: 1 files
2026-01-10 10:07:04.822 [info] From claude: 2026-01-10T15:07:04.822Z [DEBUG] Writing to temp file: /volume1/VSCode/Quorum/architecture_doc.md.tmp.30849.1768057624822
2026-01-10T15:07:04.822Z [DEBUG] Preserving file permissions: 100644
2026-01-10 10:07:04.938 [info] From claude: 2026-01-10T15:07:04.938Z [DEBUG] Temp file written successfully, size: 29728 bytes
2026-01-10 10:07:04.938 [info] From claude: 2026-01-10T15:07:04.938Z [DEBUG] Applied original permissions to temp file
2026-01-10T15:07:04.938Z [DEBUG] Renaming /volume1/VSCode/Quorum/architecture_doc.md.tmp.30849.1768057624822 to /volume1/VSCode/Quorum/architecture_doc.md
2026-01-10T15:07:04.938Z [DEBUG] File /volume1/VSCode/Quorum/architecture_doc.md written atomically
2026-01-10 10:07:04.944 [info] From claude: 2026-01-10T15:07:04.943Z [DEBUG] Getting matching hook commands for PostToolUse with query: Edit
2026-01-10T15:07:04.943Z [DEBUG] Found 1 hook matchers in settings
2026-01-10 10:07:04.944 [info] From claude: 2026-01-10T15:07:04.943Z [DEBUG] Matched 1 unique hooks for query "Edit" (1 before deduplication)
2026-01-10 10:07:05.378 [info] Closing Claude on channel: h72htqb4lgm
2026-01-10 10:07:05.946 [info] [DiagnosticTracking] No new diagnostics found for /volume1/VSCode/Quorum/architecture_doc.md
Steps to Reproduce
Mine was SSH'ing into a Synology NAS, so likely need to use a similar protocol.
Create a query in Claude Code extension in VSCode
Load up Docker or something else in the Synology so memory is tight
Run the query - hangs about 5-10% of the time, just depends on how the race conditions hit
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
extension version 2.1.4 (linux-x64)
Platform
Other
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗