Feature Request: Display remaining context in status line and before plan approval
Summary
Add visibility of remaining context/token budget in two places:
- In the status line JSON data
- When prompting user for plan approval
Motivation
Status Line Context Display
Currently, the status line receives JSON with model info, costs, and session metrics, but there's no information about remaining context window. Users would benefit from seeing at a glance how much of their token budget remains, especially during long sessions.
Plan Approval Context Display
When Claude Code enters plan mode and asks the user to approve a plan with ExitPlanMode, it would be helpful to show how much context is remaining. This helps users make informed decisions about whether to:
- Proceed with the current plan
- Request a more concise plan if context is low
- Start a new session if needed
Proposed Solution
For Status Line
Add token budget fields to the status line JSON input:
{
"context": {
"total_tokens": 200000,
"used_tokens": 24864,
"remaining_tokens": 175136,
"usage_percentage": 12.4
}
}
This would allow users to display remaining context in their custom status line scripts.
For Plan Approval
When showing the plan approval prompt, include context information:
[Plan content...]
Context Usage: 45,000 / 200,000 tokens (155,000 remaining)
Do you want to proceed with this plan? [y/n]
Benefits
- Better session management - Users can see when they're running low on context
- Informed decisions - Know when to start fresh vs continue
- Transparency - Clear visibility into resource usage
- Proactive planning - Adjust verbosity/approach based on remaining budget
Current Workarounds
- Use
/usagecommand periodically (but requires manual checking) - No workaround for plan approval context display
---
Environment:
- Claude Code version: Latest
- Using custom status line configuration
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗