[FEATURE] Expose session metadata (rate limits, token usage, status) to a common local source across all surfaces
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 statusLine hook gives CLI users access to rate limit and session metadata, but the VS Code extension, Desktop App, and API surfaces have no equivalent. Teams running agents across mixed surfaces — which is the norm in enterprise — have no unified way to monitor what's happening.
What exists today
CLI: statusLine hook writes to a local file. Tools like abtop can read it.
VS Code extension: nothing
Desktop App: nothing (see #41456)
API: nothing
Related issues: #41456, #50863, #50286, #40965
Proposed Solution
Write a common local file or socket that all surfaces contribute to — rate limit windows, token usage, session state. The format already exists (abtop-rate-limits.json). The ask is for all surfaces to write to it, not just the CLI.
Why it matters at enterprise scale
Teams need to know when agents are hitting quota, filling context, or stalling — regardless of which surface they're using. This is table stakes for observability and is the kind of instrumentation that will matter as Claude usage scales inside organizations.
Even individual users would want to have this level of observability that can help reduce unnecessary input/output token churn.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
API and model interactions
Use Case Example
I am creating a multi-agent workflow in VS Code locally running on a Python Framework (LangChain / LangGraph. I want to "tune" the agent prompts for token conservation and track inference quality vs generated tokens. This tuning can itself be an agentically-tuned first-line FinOps defense against releasing token-gobbling flows at scale, enabling experimentation with caching and memory before it ever hits the hyperscaler.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗