[FEATURE REQUEST] Display Context Size, Session Cost, and Git Branch in Terminal

Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened Apr 5, 2025 · closed Apr 5, 2025
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Description

Add persistent display of current context size, session cost, and git branch in the Claude console/terminal interface.

Motivation

When working with Claude Code, it's important to keep track of:

  • Current context size (to manage token limits)
  • Session cost (for budget management)
  • Git branch (to ensure working in the correct branch)

Having these metrics visible at all times would improve the user experience and help prevent errors.

Proposed Implementation

Add a status bar or information line at the bottom of the terminal that continuously displays:

  • Context size: X tokens used / Y tokens available
  • Session cost: $Z.ZZ (current session)
  • Git branch: [branch name]

This information should be updated in real-time as the session progresses.

Additional Context

Similar functionality exists in other developer tools and IDEs that show git branch and other metrics. Adding these elements would align Claude Code with familiar developer experiences.

View original on GitHub ↗

4 Comments

bcherny collaborator · 1 year ago

Hey there! We intentionally keep the UI minimal — terminal real estate is limited and we want to keep things focused on the conversation you’re having with Claude.

To see cost, run /cost anytime. To see the git branch just ask claude. And context is auto-compacted, so shouldn’t affect performance.

orsenkucher · 1 year ago

@bcherny how about command to see current context size? There is warning before /compact, should be easy to expose without threshold if. Would like to keep of my input tokens spendings🤣

<img width="1180" alt="Image" src="https://github.com/user-attachments/assets/27880864-2d0d-47c7-8ff9-50f25a70d83f" />

tiziano-contorno · 1 year ago

I think it's a "design" choice... You can implement in several ways less distracting that the huge " - I N S E R T - " mode like we have now (a lone "I" would suffice). Having a simple thin line on the bottom filled by context size would be great, or at least the percentage always on and not only before compacting.

github-actions[bot] · 1 year ago

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.