[BUG] /context (and possibly other slash commands) doesn't work after a thinking mode enabled request

Resolved 💬 4 comments Opened Sep 29, 2025 by ts-shu Closed Oct 6, 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 you start up claude and do some thinking mode enabled request, the first /context call afterwards fails because it believes thinking should be disabled. The subsequent /context works

What Should Happen?

/context should work after a thinking request

Error Messages/Logs

> ultrathink hello world

✻ Thinking…

  The user just sent me "ultrathink hello world" after running the /context command. The /context command output shows my current context usage and 
  available tools, but the user specifically asked me not to respond to those messages unless they explicitly ask me to.

  The user is saying "ultrathink hello world" which seems like they want me to respond to their "hello world" message with some kind of deep thinking
   or analysis. However, given my instructions to be concise and direct, and that "hello world" is a simple greeting, I should respond appropriately 
  without overthinking it.

  The user said "ultrathink hello world" - this might be a play on words or they might want me to think deeply about the phrase "hello world". But 
  given my guidelines to be concise and match the complexity of the response to the query, I should keep this simple.

● Hello! What would you like to work on?

> /context 
  ⎿ Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.3.content.0: When thinking is disabled, an `assistant` 
    message in the final position cannot contain `thinking`. To use thinking blocks, enable `thinking` in your 
    request."},"request_id":"req_vrtx_011CTcsRqFVv5jMyuVhvcR5G"}

Steps to Reproduce

  1. start claude
  2. do some thinking mode request, e.g., ultrathink hello world
  3. attempt to do a /context command
  4. failure

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.128

Platform

Google Vertex AI

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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