[FEATURE] Ability for the agent to read the % of tokens used
Open 💬 0 comments Opened Jun 19, 2026 by jeffdupont
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
The ability to have claude code be able to look up the current % of tokens that gets displayed in the TUI.
Proposed Solution
a context_usage_session_pct and context_usage_weekly_pct field in hook event data
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
API and model interactions
Use Case Example
I leave the code to run over night, but if I run out of tokens in the process, the service pauses until the morning waiting for me to respond. Having the percent in the hook event data would allow me to create a rule to pause for a time until my tokens are available again. I know there's the prompt that already shows up once I reach the limit, but this would allow someone to plan ahead if they know the prompt is going to take time.
Additional Context
_No response_