claude-code - 💡(How to fix) Fix [BUG] CLI/extension version mismatch causes silent crash surfaced as "Interrupted · What should Claude do instead?" [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54097Fetched 2026-04-28 06:39:20
View on GitHub
Comments
2
Participants
2
Timeline
11
Reactions
0
Author
Timeline (top)
labeled ×6commented ×2cross-referenced ×2closed ×1

Error Message

[ERROR] TypeError: Cannot read properties of null (reading 'effortLevel') at hH0 (cli.js:1845:3909) at ew (cli.js:2207:4166) ...

Root Cause

This is caused by a version mismatch between the CLI (2.0.76, managed via nix) and the VSCode extension (2.1.118). The extension sends an effort-level configuration in its spawn payload that 2.0.76 does not handle — it reads null where 2.1.x expects an object, throws, and the session dies. The error is completely invisible to the user.

Fix Action

Fix / Workaround

Workaround: Update the CLI to 2.1.x to match the extension version. (this was not an obvious fix since I had just updated my flake lockfile 3 days ago and this was working fine, broken on monday)

Code Example

[ERROR] TypeError: Cannot read properties of null (reading 'effortLevel')
    at hH0 (cli.js:1845:3909)
    at ew (cli.js:2207:4166)
    ...

---

[ERROR] TypeError: TypeError: Cannot read properties of null (reading 'effortLevel')
    at hH0 (file:///nix/store/4bmhj54qyccbs7m43vfv804j5dff6aw9-claude-code-2.0.76/lib/node_modules/@anthropic-ai/claude-code/cli.js:1845:3909)
    at ew (file:///nix/store/4bmhj54qyccbs7m43vfv804j5dff6aw9-claude-code-2.0.76/lib/node_modules/@anthropic-ai/claude-code/cli.js:2207:4166)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async file:///nix/store/.../cli.js:2709:1990
    at async file:///nix/store/.../cli.js:2709:2831
    at async J07 (file:///nix/store/.../cli.js:2640:4939)
    at async rK1 (file:///nix/store/.../cli.js:2640:3678)
    at async file:///nix/store/.../cli.js:2709:3796
    at async file:///nix/store/.../cli.js:2625:3877


The debug log also shows startup completing successfully immediately before the crash, confirming auth, MCP, and connection are all fine — the crash happens specifically at `UserPromptSubmit`, on every message.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Every message sent in Claude Code (both terminal and VSCode panel) immediately returns "Interrupted · What should Claude do instead?" with no other error message or indication of what went wrong. The session appears to connect and initialize successfully, then fails silently on every first message.

The actual error, only visible in ~/.claude/debug/latest, is:

[ERROR] TypeError: Cannot read properties of null (reading 'effortLevel')
    at hH0 (cli.js:1845:3909)
    at ew (cli.js:2207:4166)
    ...

This is caused by a version mismatch between the CLI (2.0.76, managed via nix) and the VSCode extension (2.1.118). The extension sends an effort-level configuration in its spawn payload that 2.0.76 does not handle — it reads null where 2.1.x expects an object, throws, and the session dies. The error is completely invisible to the user.

What Should Happen?

Either:

  • The CLI should handle a null effort config gracefully (null guard), or
  • The CLI/extension should detect the version mismatch at spawn time and surface a clear error ("CLI version X is incompatible with extension version Y, please update") rather than crashing silently

At minimum, the crash should not surface to the user as "Interrupted · What should Claude do instead?" — that message implies the user interrupted something, which is misleading when the underlying process died from an unhandled exception.

Error Messages/Logs

[ERROR] TypeError: TypeError: Cannot read properties of null (reading 'effortLevel')
    at hH0 (file:///nix/store/4bmhj54qyccbs7m43vfv804j5dff6aw9-claude-code-2.0.76/lib/node_modules/@anthropic-ai/claude-code/cli.js:1845:3909)
    at ew (file:///nix/store/4bmhj54qyccbs7m43vfv804j5dff6aw9-claude-code-2.0.76/lib/node_modules/@anthropic-ai/claude-code/cli.js:2207:4166)
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async file:///nix/store/.../cli.js:2709:1990
    at async file:///nix/store/.../cli.js:2709:2831
    at async J07 (file:///nix/store/.../cli.js:2640:4939)
    at async rK1 (file:///nix/store/.../cli.js:2640:3678)
    at async file:///nix/store/.../cli.js:2709:3796
    at async file:///nix/store/.../cli.js:2625:3877


The debug log also shows startup completing successfully immediately before the crash, confirming auth, MCP, and connection are all fine — the crash happens specifically at `UserPromptSubmit`, on every message.

Steps to Reproduce

  1. Install claude-code CLI at version 2.0.76 via nix (or any package manager pinned to 2.0.76)
  2. Install VSCode extension version 2.1.118
  3. Open any workspace in VSCode with the Claude Code panel
  4. Send any message — including trivial ones like say hello
  5. Observe: "Interrupted · What should Claude do instead?" immediately, every time
  6. Check ~/.claude/debug/latest to find the actual error hidden there

The same crash occurs in the terminal CLI directly (claude --model haiku, then say hello) — this is not VSCode-specific. The mismatch alone is sufficient to trigger it.

Workaround: Update the CLI to 2.1.x to match the extension version. (this was not an obvious fix since I had just updated my flake lockfile 3 days ago and this was working fine, broken on monday)

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

https://github.com/alycda/dotfiles/commit/ce8a4b8163b0d71b8deef0b522110418a1b09548

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

Additional Information

OS: macOS (nix-darwin, Apple Silicon M-series) Terminal/Shell: VS Code integrated terminal + OSX Terminal

The CLI is managed via nix-darwin/home-manager. The nix claude-code package was pinned to 2.0.76 while the VSCode extension auto-updated to 2.1.118, creating the mismatch. Users managing the CLI via nix or other package managers with pinned versions are likely to hit this whenever the extension auto-updates past a breaking change boundary. The effortLevel property appears to have been introduced in the 2.1.x series (changelog notes effort-level features throughout 2.1.x) and is not null-guarded in 2.0.76.

extent analysis

TL;DR

Update the CLI to version 2.1.x to match the VSCode extension version and resolve the version mismatch causing the silent crash.

Guidance

  • Verify the version mismatch by checking the CLI version (2.0.76) and the VSCode extension version (2.1.118) to confirm they do not match.
  • Check the debug log at ~/.claude/debug/latest for the actual error message indicating a TypeError due to a null effortLevel property.
  • Consider updating the nix package manager to allow for automatic updates of the claude-code package to prevent future version mismatches.
  • If updating the CLI is not immediately possible, consider downgrading the VSCode extension to a version compatible with the current CLI version as a temporary workaround.

Example

No code snippet is necessary for this issue, as the solution involves updating the CLI version rather than modifying code.

Notes

This solution assumes that updating the CLI to version 2.1.x will resolve the issue. However, if other dependencies or configurations are involved, additional steps may be necessary.

Recommendation

Apply the workaround by updating the CLI to version 2.1.x to match the VSCode extension version, as this directly addresses the root cause of the issue: the version mismatch between the CLI and the extension.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] CLI/extension version mismatch causes silent crash surfaced as "Interrupted · What should Claude do instead?" [2 comments, 2 participants]