[BUG] `/context` command fails after resuming session due to thinking block requirement
Resolved 💬 3 comments Opened Dec 18, 2025 by gabyorel Closed Dec 22, 2025
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?
When using the /context command after resuming a CC session, the command fails with an HTTP 400 error about missing thinking blocks.
The issue appears to be that thinking blocks are not being preserved when the session is exited and resumed.
What Should Happen?
The /context command should work normally after resuming a session, just as it does in a fresh session.
Error Messages/Logs
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.0.type: Expected `thinking` or `redacted_thinking`, but found `text`. When `thinking` is enabled, a final `assistant` message must start with a thinking block. We recommend you include thinking blocks from previous turns. To avoid this requirement, disable `thinking`. Please consult our documentation at https://docs.claude.com/en/docs/build-with-claude/extended-thinking"},"request_id":"req_011CWE2kYf1cFV8iUGL4kA7Q"}
at W9.generate (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:460:11051)
at jT.makeStatusError (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:807:2195)
at jT.makeRequest (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:807:5420)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
· Incubating…FPB (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:957:4682)
at async myA (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:2106:95)
at async fZ5 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:2106:2329)
at async Promise.all (index 6)
at async NH0 (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:2106:2970)
at async Object.call (file:///usr/lib/node_modules/@anthropic-ai/claude-code/cli.js:3639:454)
Steps to Reproduce
- Start a new CC session
- Send a first message and wait for the response
- Run
/contextcommand works - Exit the session
- Resume the session
- Run
/contextcommand fails
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.72
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗