Agent should have visibility into token usage and context cap proximity
Summary
In agentic sessions, Claude has no visibility into current token usage, remaining context, or billing cap proximity. This is a meaningful gap for long-running tasks — the agent can't warn you when you're running low, can't self-manage session length, and can't answer basic questions like \"how much of my budget did this use?\"
Expected behavior
Claude Code operates as a closed private loop with elevated trust. Exposing usage metadata to the agent (e.g. via system prompt injection or a dedicated tool) would make it meaningfully more agentic without any obvious privacy or security downside.
Concretely, the agent should be able to:
- Report current token/context usage when asked
- Warn proactively when approaching a cap
- Self-manage verbosity or session length based on remaining budget
Current behavior
The agent has zero visibility into usage. Asking \"how close am I to my cap?\" returns nothing useful.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗