[BUG] 2.1.296: --input-format=stream-json requires --print error on VS Code extension (session resume fails)
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?
Description
After updating the VS Code extension to 2.1.296, resuming an existing session (or starting a new one from the extension) fails immediately with:
Error: --input-format=stream-json requires --print.
The process exits right away, but the VS Code chat panel does not surface this error — it just shows an indefinite loading spinner ("inferring"), making it look like a hang rather than a crash.
Environment
- Extension version: anthropic.claude-code 2.1.296
- Platform: Windows 11 + WSL2 (Ubuntu), VS Code Remote-WSL
- Native binary path:
~/.vscode-server/extensions/anthropic.claude-code-2.1.296-linux-x64/resources/native-binary/claude
What I found
Running the exact command the extension spawns, directly in a terminal, surfaces the real error:
~/.vscode-server/extensions/anthropic.claude-code-2.1.296-linux-x64/resources/native-binary/claude \
--output-format stream-json --verbose --input-format stream-json \
--max-thinking-tokens=31999 --permission-prompt-tool=stdio \
--resume=<session-id> \
--setting-sources=user,project,local --permission-mode=acceptEdits \
--debug --debug-to-stderr --enable-auth-status --no-chrome --replay-user-messages
Error: --input-format=stream-json requires --print.
Looking at extension.js, the ProcessTransport.initialize() method builds the spawn args:
let r=["--output-format","stream-json","--verbose","--input-format","stream-json"];
--print is never pushed into this args array anywhere in that function, so the native binary's own validation (which apparently now requires --print when --input-format=stream-json is set) rejects it immediately.
What Should Happen?
Either:
the extension should pass --print when required, or
the chat panel should surface the process exit error instead of showing an indefinite spinner
Error Messages/Logs
Error: --input-format=stream-json requires --print.
Steps to Reproduce
- Use the VS Code extension with an existing session (
--resume=<session-id>) - Send a message in the chat panel
- The panel shows "inferring" indefinitely with no output
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.283
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_