Skip to content

Add configurable token usage threshold alert for agents #44208

Closed as not planned

Description

@azerrayarr-netizen

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem
When a session approaches the token limit, compaction kicks in silently and older context gets summarized. By the time the user notices degraded quality, they've already lost detail from earlier in the conversation. There's no way to proactively know when to start a new session.
Proposed solution
Add a configurable compaction.alert option (e.g. 0.8 for 80%) that triggers a visible warning to the user when token usage crosses the threshold. This could be:

  • A TUI notification/banner
  • An agent-injected message in the conversation
  • A configurable action (e.g. "warn", "auto-compact", "notify")
    Config example
    {
    "compaction": {
    "auto": true,
    "alert": 0.8
    }
    }
    Use case
    Users working on long sessions (debugging, planning, large refactors) would benefit from knowing when to start a fresh chat to maintain conversation quality, rather than discovering context loss after the fact.

Activity

  1. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions