Skip to content

Context limit exceeded error suggests too low reserveTokensFloor value (20000) #65839

@matingxiu

Description

@matingxiu

Problem

When the context limit is exceeded, the error message suggests:

To prevent this, increase your compaction buffer by setting agents.defaults.compaction.reserveTokensFloor to 20000 or higher in your config.

However, 20000 appears to be too low and users still experience context limit issues even after setting this value.

Expected Behavior

The suggested reserveTokensFloor value should be high enough to actually prevent context limit exceeded errors in most cases.

Suggestion

Consider increasing the recommended value in the error message, or providing more guidance on what values work for different model context windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions