[BUG] The maximum tokens you requested exceeds the model limit of

Status Fixed / completed
Reported on v2.1.7
Maintainer reply None cached
Activity 5 comments · opened Jan 16, 2026 · closed Jan 16, 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?

after updating today claude code via brew upgrade claude-code from 2.1.7 to 2.1.9 whatever i write in claude it goes out of context

<img width="567" height="164" alt="Image" src="https://github.com/user-attachments/assets/94058649-6a71-4bfd-afdd-ee54db43baaf" />

What Should Happen?

should not go out of context

Error Messages/Logs

Steps to Reproduce

update claude via brew upgrade claude-code.
open terminal
run claude code wherever, project or empty folder.
u will get error regarding context

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.7

Claude Code Version

2.1.9

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

5 Comments

github-actions[bot] · 9 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/18554
  2. https://github.com/anthropics/claude-code/issues/8637
  3. https://github.com/anthropics/claude-code/issues/18559

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

movingstudio · 8 months ago

How do I fix this? I have the same error? Tried submitting a report and it just says there's a duplicate issue, but it has no resolution.

Ricard-Kollcaku · 8 months ago

@movingstudio i had misconfigured the thinking token in .zshrc, i had configured as 200000, and new version of claude code was sending 200001 as max token. but sonnet supports up to 200k. just decreased the number to 32k and worked

movingstudio · 8 months ago

Ah that makes sense. Thank you SO much.

github-actions[bot] · 8 months ago

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.