[BUG] /context crashes Claude Code if session is started with thinking on, and then thinking is turned off
Resolved 💬 8 comments Opened Dec 7, 2025 by riyli Closed Feb 14, 2026
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?
/context crashes Claude Code session if thinking is enabled at session start and then disabled.
What Should Happen?
It should show the regular output of /context.
Error Messages/Logs
> /context
✢ Frolicking… (esc to interrupt)
⎿ Tip: Use /agents to optimize specific tasks. Eg. Software Architect, Code Writer, Code Reviewer
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
? for shortcuts
104 | - This tool allows Claude Code to read images (eg PNG, JPG, etc). When reading an image file the contents are presented visually as Claude Code is a multimodal LLM.${oDR()?`
105 | - This tool can read PDF files (.pdf). PDFs are processed page by page, extracting both text and visual content for analysis.`:""}
106 | - This tool can read Jupyter notebooks (.ipynb files) and returns all cells with their outputs, combining code, text, and visualizations.
107 | - This tool can only read files, not directories. To read a directory, use an ls command via the ${SD} tool.
108 | - You can call multiple tools in a single response. It is always better to speculatively read multiple potentially useful files in parallel.
109 | - If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.`});function YqR(R){let T=R.match(/^([^(]+)\(([^)]+)\)$/);if(!T)return{toolName:R};let A=T[1],B=T[2];if(!A||!B)return{toolName:R};return{toolName:A,ruleContent:B}}function dvD(R){return R.match(/^(.+):\*$/)?.[1]??null}function mVT(R){let T=R.permissions||{},A=[],B=[];for(let J of T.allow||[]){let X=YqR(J);if(X.toolName===XC&&X.ruleContent?.startsWith("domain:"))A.push(X.ruleContent.substring(7))}for(let J of T.deny||[]){let X=YqR(J);if(X.toolName===XC&&X.ruleContent?.startsWith("domain:"))B.push(X.ruleContent.substring(7))}let D=["."],H=[],G=[],$=bL.map((J)=>TE(J)).filter((J)=>J!==void 0);H.push(...$);let W=H0R(),_=e9();if(W!==_)H.push(gVT.resolve(W,".claude","settings.json")),H.push(gVT.resolve(W,".claude","settings.local.json"));for(let J of T.allow||[]){let X=YqR(J);if(X.toolName===yH&&X.ruleContent)D.push(X.ruleContent)}for(let J of T.deny||[]){let X=YqR(J);if(X.toolName===yH&&X.rul | ... truncated
error: 400 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
status: 400,
headers: Headers {
"date": "Sun, 07 Dec 2025 04:33:29 GMT",
"content-type": "application/json",
"content-length": "405",
"connection": "keep-alive",
"x-amzn-requestid": "d0c654df-11c0-413a-9573-6b35b7ad2309",
"x-amzn-errortype": "ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/",
},
requestID: null,
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",
},
at generate (/$bunfs/root/claude:109:10360)
at makeRequest (/$bunfs/root/claude:1237:5434)
Bun v1.3.3 (macOS arm64)
Steps to Reproduce
To reproduce:
- Start session via
claudewith thinking on.
- if thinking isn't auto-on, then hit
tab-> end session -> restart session to have thinking immediately on
- Send a message.
- Hit
tabto turn thinking off. - Send a message.
- Send
/context.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.60
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Other
Additional Information
Using Ghostty for terminal.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗