[BUG] Automatic compression does not work, and context limit error is displayed
Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Mar 26, 2025 · closed Mar 27, 2025
Environment
- Platform (select one):
- [ ] Anthropic API
- [○] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version:0.2.54
- Operating System: macOS 15.3.2(24D81)
- Terminal: iTerm2 Build 3.5.11
Bug Description
Today, after updating to Claude Code 0.2.54, the automatic context compression hasn't worked at all, and I'm getting the error: 'API Error: input length and 'max_tokens' exceed context limit: 187577 + 20000 > 204698, decrease input length'.
Steps to Reproduce
- Update to Claude Code 0.2.54
- Operate under normal usage conditions until the context becomes large
- When automatic compression should occur, the above error is displayed
Expected Behavior
When the context size becomes large, the automatic compression feature should work, allowing operations to continue without errors.
Actual Behavior
getting the error: 'API Error: input length and 'max_tokens' exceed context limit: 187577 + 20000 > 204698, decrease input length'.
Additional Context
In previous versions, automatic compression functioned without issues.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗