claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] /context command doesn't work if the previous prompt has 'ultrathink' in it.

Open TikkanadityaSiddartha opened this issue 1 year ago • 5 comments

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 doesn't show the context usage and throws a 400 error.

What Should Happen?

I need to be able the see the memory consumption by different resources with this command.

Error Messages/Logs

> /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_XXXX"}

Steps to Reproduce

Go to an existing project.

Switch to Sonnet 4.5 and ask for it to provide project analysis and ask it to 'Ultrathink'. Make sure that 'Ultrathink' is in the prompt.

After the analysis is complete and the response is provided by Claude, try /context to see the error.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.0.126

Claude Code Version

2.0.0

Platform

Google Vertex AI

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

TikkanadityaSiddartha avatar Sep 29 '25 23:09 TikkanadityaSiddartha

I think this was a bug before today's release, been annoying me all week as I keep forgetting about it. You can get round it by Tabbing to turn thinking off, then running /context again.

I'm using the Console interface from Windows.

Crichen avatar Sep 30 '25 14:09 Crichen

you need to send /context again when think mode is on

fallonou1999 avatar Sep 30 '25 15:09 fallonou1999

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 06 '25 10:12 github-actions[bot]

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] avatar Jan 08 '26 10:01 github-actions[bot]

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Jan 16 '26 14:01 github-actions[bot]