Skip to content

[BUG] exceed context limit #16580

@gshilin-sdb

Description

@gshilin-sdb

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

A number of times per day I'm getting this error

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"input length and `max_tokens` exceed context limit: 193125 + 21333 >
 200000, decrease input 
    length or `max_tokens` and try again"},"request_id":"req_vrtx_011CWscdZLbCzvTdKUeranGy"}

and claude is unable to do anything afterwards. Even memorize the current state.
The only solution is to restart it.

What Should Happen?

At least ability to memorize current state would be good.

Error Messages/Logs

Steps to Reproduce

It was a long-long-long session with a number of compacting.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

v2.0.76

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

OS: Fedora 43
Terminal: GNOME Terminal 3.56.3 for GNOME 48
Shell: bash

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apibugSomething isn't workinghas reproHas detailed reproduction stepsmemoryplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions