[BUG] VS Code extension: process exits with code 4294967295 during idle session (looks like ungraceful kill on token refresh)
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?
The Claude Code VS Code extension periodically kills its underlying process
mid-session with a non-standard exit code (4294967295), forcing a full reload
of the panel. This happens roughly once per 24 hours during normal use, and
reliably after system sleep/hibernation — even when no tool call is in progress
at the time it happens.
Log evidence suggests this coincides with an OAuth token refresh: the process
was idle, then the channel was closed, then immediately followed by an
"OAuth tokens found in secure storage" log line — implying this may be a
routine credential refresh being handled as an ungraceful process kill rather
than a clean reconnect.
What Should Happen?
If this is caused by a routine OAuth token refresh, the extension should
reconnect gracefully without killing the process with a non-zero/wrapped
exit code or forcing a full panel reload — or at minimum should show a
clear "reauthenticating" message rather than a generic crash error.
Error Messages/Logs
2026-07-09 16:45:01.121 [info] From claude: 2026-07-09T11:15:01.121Z [INFO] [Stall] classifier_request_started reqId=a3da09f1-f2e4-4e93-b76d-e1799792b3c2 tool=Bash model=claude-sonnet-5 stage=xml_s1 promptTokensEst=[REDACTED]
2026-07-09 16:45:01.122 [info] From claude: 2026-07-09T11:15:01.122Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.205.331; cc_entrypoint=claude-vscode; cch=00000;
2026-07-09 16:45:01.126 [info] From claude: 2026-07-09T11:15:01.125Z [DEBUG] [API REQUEST] /v1/messages x-client-request-id=248c5b49-a6de-475d-8ef8-1589fe91cafc source=side_query
2026-07-09 16:45:03.405 [info] From claude: 2026-07-09T11:15:03.404Z [INFO] [Stall] classifier_request_finished reqId=a3da09f1-f2e4-4e93-b76d-e1799792b3c2 tool=Bash stage=xml_s1 outcome=ok durationMs=2283
2026-07-09 16:45:03.406 [info] From claude: 2026-07-09T11:15:03.406Z [INFO] Slow permission decision: 2321ms for Bash (mode=auto, behavior=allow)
2026-07-09 16:45:03.407 [info] From claude: 2026-07-09T11:15:03.407Z [INFO] [Stall] tool_dispatch_start tool=Bash toolUseId=toolu_01SUeW9Lcd3jwMh2rvPCtzMh permissionDecisionMs=2321
2026-07-09 16:45:03.409 [info] From claude: 2026-07-09T11:15:03.409Z [DEBUG] Spawning shell without login (-l flag skipped)
2026-07-09 16:45:04.336 [info] From claude: 2026-07-09T11:15:04.336Z [INFO] [Stall] tool_dispatch_end tool=Bash toolUseId=toolu_01SUeW9Lcd3jwMh2rvPCtzMh outcome=ok durationMs=929
2026-07-09 16:45:04.343 [info] From claude: 2026-07-09T11:15:04.343Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2026-07-09T11:15:04.343Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2026-07-09 16:45:04.343 [info] From claude: 2026-07-09T11:15:04.343Z [DEBUG] Hooks: Found 0 total hooks in registry
2026-07-09 16:45:04.343 [info] From claude: 2026-07-09T11:15:04.343Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2026-07-09 16:45:04.346 [info] From claude: 2026-07-09T11:15:04.345Z [DEBUG] autocompact: tokens=[REDACTED] level=ok effectiveWindow=947000
2026-07-09 16:45:04.349 [info] From claude: 2026-07-09T11:15:04.349Z [DEBUG] Dynamic tool loading: 0/18 deferred tools included
2026-07-09 16:45:04.354 [info] From claude: 2026-07-09T11:15:04.354Z [DEBUG] attribution header x-anthropic-billing-header: cc_version=2.1.205.23c; cc_entrypoint=claude-vscode; cch=00000; cc_prev_req=req_011CcrPQQNn9tDGbL3Dh9g4C;
2026-07-09 16:45:04.355 [info] From claude: 2026-07-09T11:15:04.355Z [DEBUG] Fast mode unavailable: Fast mode has been disabled by your organization
2026-07-09 16:45:04.355 [info] From claude: 2026-07-09T11:15:04.355Z [DEBUG] Fast mode unavailable: Fast mode has been disabled by your organization
2026-07-09 16:45:04.358 [info] From claude: 2026-07-09T11:15:04.358Z [DEBUG] Fast mode unavailable: Fast mode has been disabled by your organization
2026-07-09 16:45:04.360 [info] From claude: 2026-07-09T11:15:04.359Z [DEBUG] [API:timing] dispatching to firstParty model=claude-sonnet-5
2026-07-09 16:45:04.372 [info] From claude: 2026-07-09T11:15:04.371Z [DEBUG] [API REQUEST] /v1/messages x-client-request-id=599c1d5e-495b-4e2c-ba1a-a5c0fd1c24fd source=sdk
2026-07-09 16:45:05.993 [info] From claude: 2026-07-09T11:15:05.992Z [DEBUG] Stream started - received first chunk
2026-07-09T11:15:05.992Z [DEBUG] [API:timing] first byte after 1635ms
2026-07-09 16:45:15.688 [info] From claude: 2026-07-09T11:15:15.687Z [DEBUG] Fast mode unavailable: Fast mode has been disabled by your organization
2026-07-09 16:45:15.695 [info] Received message from webview: {"type":"request","requestId":"2mj64cvhgk2","request":{"type":"update_session_state","sessionId":"99c543cc-743e-4acc-91b9-a0ccdd6a1fc7","state":"idle","title":"Debug filter application in agent logs"}}
2026-07-09 16:48:01.166 [info] Closing Claude on channel: v3t2pporfi
2026-07-09 16:48:01.167 [error] Error from Claude (on channel v3t2pporfi): Error: Claude Code process exited with code 4294967295
2026-07-09 16:48:01.167 [info] OAuth tokens found in secure storage
2026-07-09 16:52:56.076 [info] Received message from webview: {"type":"request","requestId":"ciacrkwpzh","request":{"type":"open_output_panel"}}
Steps to Reproduce
- Open a Claude Code session in the VS Code extension and use it normally.
- Leave the session idle for an extended period, OR let the machine sleep/
hibernate and then resume.
- Within a few minutes of resuming (or after ~24h of continuous use), the
error appears and the session is force-closed.
Expected behavior:
If this is caused by a routine OAuth token refresh, the extension should
reconnect gracefully without killing the process with a non-zero/wrapped
exit code or forcing a full panel reload — or at minimum should show a
clear "reauthenticating" message rather than a generic crash error.
Actual behavior : Error: Claude Code process exited with code 4294967295
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.205.331
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Claude Code extension version: 2.1.205.331
Entrypoint: claude-vscode
Model in use: claude-sonnet-5
VS Code version:
Version: 1.127.0 (user setup)
Commit: 4fe60c8b1cdac1c4c174f2fb180d0d758272d713
Date: 2026-06-30T10:52:33+02:00
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Windows_NT x64 10.0.26200
OS: Windows 11 23H2
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗