You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose provider usage limits to agents through an MCP tool #39185
T3 Code already fetches subscription usage for each provider and shows it in Usage → Limits. For Claude it calls api/oauth/usage with the Claude Code login token (apps/server/src/usage/cliproxyApi.ts), and similar code covers Codex and other providers. None of this is available through the T3 MCP tools, so an agent running inside T3 can't check how much quota is left.
Request
Add a read-only MCP tool, for example t3_usage_read, that returns the usage data T3 already collects, for each provider and account:
Plan name.
Each limit window (session or 5-hour, weekly for all models, weekly per model) with percent used, reset time and window length.
Optionally a provider filter, defaulting to the provider of the current thread.
Why
Budget-aware long runs. Agents could pace or pause multi-hour work on their own, for example to stop at a given share of the weekly allowance, instead of the user running /usage and pasting in the result.
Fewer API calls. Coordinators could read T3's cached snapshot instead of each agent calling the provider separately.
Delegation choices.delegate_task could pick a provider that has quota left.
Notes
It returns only numbers T3 already shows; it never exposes tokens or credentials.
It can return T3's cached reading, so agent polling doesn't add calls to the provider.
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.
Activity
juliusmarminge commentedon Nov 19, 2026
Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.