[Feature Request] Add context window token metrics to status line JSON
It would be useful to include remaining context window information in the JSON data passed to the status line command. Currently, the status line receives model info, cost tracking, and session metadata, but there's no way to display context usage.
Suggested additions to the status line JSON:
- context.used - tokens consumed in current context
- context.remaining - tokens remaining before context limit
- context.total - total context window size for current model
- context.percentage - percentage of context used
This would allow users to monitor context consumption directly in their terminal without running /cost, which is helpful for long sessions or when working with large codebases.
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/11535
- https://github.com/anthropics/claude-code/issues/12520
- https://github.com/anthropics/claude-code/issues/10436
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been automatically closed as a duplicate of #11535.
If this is incorrect, please re-open this issue or create a new one.
🤖 Generated with Claude Code
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.