VSCode: Process crashes (exit code 1) on session resume — no error logged

Resolved 💬 2 comments Opened Mar 8, 2026 by Tianhao-Gu Closed Apr 5, 2026

Bug Description

Claude Code VSCode extension process silently crashes with exit code 1 when resuming certain sessions. Once a session enters this state, every subsequent resume attempt crashes within 200-600ms of the API auth check. No error or stack trace is logged before the crash. Only starting a fresh session resolves it.

Affected Version

  • Extension: anthropic.claude-code-2.1.71-darwin-arm64
  • Platform: macOS Darwin 25.3.0 (Apple Silicon / arm64)

Steps to Reproduce

  1. Use Claude Code in VSCode with a session that accumulates moderate context (~1-1.5MB session file)
  2. The session eventually crashes with exit code 1 after an API call
  3. Attempt to resume the session (either via "Continue" or sending a new message)
  4. Process immediately crashes again — repeat indefinitely

Observed Behavior

9 total crashes across 2 different sessions on 2 different dates (2026-03-06, 2026-03-08):

| Session ID | Session Size | Tool Uses | NotebookEdit? | Crashes |
|---|---|---|---|---|
| c5f0b1f2-... | 1.5MB (365 lines) | Read:22, Edit:10, Agent:4, Bash:5, Grep:15 | No | 3 |
| d8884d08-... | 970KB (304 lines) | Read:13, Edit:17, NotebookEdit:2, Write:2 | Yes (2 calls) | 6 |

Key observations:

  • All crashes happen on session resume ("resume":"<session-id>" in launch params)
  • The second session had NO NotebookEdit calls, ruling out a NotebookEdit-specific bug
  • Larger sessions (up to 23MB, 365+ lines) exist in the same project and work fine
  • No error, exception, or stack trace is ever logged before the crash

Crash Timeline (Detailed)

Every crash follows this exact pattern — API auth completes, then process shuts down within 200-600ms with no intervening error:

# Typical crash sequence (channel s4v3cyywb27, 2026-03-08):
10:13:52.555 launch_claude with resume="d8884d08-..."
10:13:56.815 [API:auth] OAuth token check complete    ← API call initiated
10:13:57.107 LSP server manager shut down successfully ← 292ms later, no API response/error
10:13:57.108 SessionEnd hooks (0 matched)
10:13:57.378 Error: Claude Code process exited with code 1

For comparison, here's the initial crash that corrupted session d8884d08:

# First crash — happened right after a successful NotebookEdit:
10:07:11.238 File written atomically (NotebookEdit succeeded)
10:07:11.238 PostToolUse hooks for NotebookEdit (0 matched)
10:07:11.245 LSP server manager shut down successfully ← immediate shutdown, no next API call
10:07:11.464 Error: Claude Code process exited with code 1

And the other session (c5f0b1f2, no NotebookEdit involved):

# Same pattern on a different session, different date (2026-03-06):
21:09:49.044 [API:auth] OAuth token check complete
21:09:49.657 LSP server manager shut down successfully ← 613ms, no error
21:09:49.941 Error: Claude Code process exited with code 1

What I've Ruled Out

  • Not NotebookEdit-specific: One crashed session had zero NotebookEdit calls
  • Not session size: Sessions up to 23MB work fine; crashes happen at ~1-1.5MB
  • Not API connectivity: Auth check always succeeds; no connection errors (unlike a separate earlier ConnectionRefused incident in the same log)
  • Not hook-related: All hook checks show 0 matchers, 0 matched
  • Not MCP-related: MCP errors (claude-vscode Method not found, Gmail/Calendar auth) appear in all sessions including working ones

Expected Behavior

Either:

  1. The session should resume normally, or
  2. If the session state is somehow corrupted/incompatible, a user-facing error message should be shown instead of silently crashing

Environment Details

Extension: anthropic.claude-code-2.1.71-darwin-arm64
Model: opus
Permission Mode: default
Thinking Level: default_on
Platform: macOS Darwin 25.3.0 (Apple Silicon)
VSCode: Latest stable

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗