t3code icon indicating copy to clipboard operation
t3code copied to clipboard

feat: add usage / quota visibility for Codex sessions and accounts

Open Fanzzzd opened this issue 8 months ago • 18 comments

I’d like T3 Code to surface usage information so users can better understand cost/rate-limit consumption while working.

Why

For long-running coding sessions it is hard to tell:

  • how much usage a thread consumed
  • whether the current account is close to rate limits
  • whether a model/service-tier choice is still appropriate

Requested scope

  • Show per-thread or per-turn token usage when available.
  • Show account-level rate limit / credits / quota information when available from the provider.
  • Add a lightweight usage summary in the UI, ideally without overwhelming the chat view.

Suggested UX

  • Thread-level token usage near the thread/session metadata
  • Account usage summary in sidebar or settings/account area
  • Refresh or auto-update on relevant provider events

Suggested acceptance criteria

  • Users can inspect current thread/session usage without opening logs.
  • Users can inspect account-level quota or rate-limit status when the provider exposes it.
  • The UI degrades gracefully when the provider does not expose usage data.

Relevant code context

  • apps/server/src/codexAppServerManager.ts
  • apps/server/src/provider/Layers/CodexAdapter.ts
  • apps/web/src/components/ChatView.tsx

Reference implementation ideas

  • CodexMonitor exposes local usage snapshots, thread token usage, and account rate-limit views.
  • Codex app-server events include account and token-usage style notifications that look relevant to this problem.

Fanzzzd avatar Mar 07 '26 02:03 Fanzzzd

Not planned at this time. If yall have any examples of similar open sources apps doing it well, share them here.

maria-rcks avatar Mar 08 '26 03:03 maria-rcks

This is important, and every app should have this since it's important to switch threads every time you reach the window context limit, because most of the models lose accuracy after compact the best example is codex and every CLI

nassimna avatar Mar 08 '26 03:03 nassimna

@nassimna im mainly talking about usage visibility, sorry for not being clear on my previous message

maria-rcks avatar Mar 08 '26 03:03 maria-rcks

A pie chart, similar to what GitHub Copilot uses, might fit well with the current UI of T3 Code.

Image

Sayrix avatar Mar 13 '26 19:03 Sayrix

@Fanzzzd @maria-rcks

I’ve implemented this for Codex and I’m planning to open a PR. It looks like an L-XL sized change, and I’ve attached screenshots for context.

I should mention I’m currently unvouched, so please let me know if that affects whether you’d like me to open the PR.

This is the settings panel: Image

This is the ContextWindowMeter: Image

Aditya190803 avatar Mar 30 '26 09:03 Aditya190803

I don't think we need to expose it in the chat view, it just feels awkward to have it when you hover a gauge which shows 35 to see aa completely unrelated percentage for a completely unrelated metric.

but i do think we could expose it under the provider view. UI there could probably use a little work to expose both the session and weekly limits. and we should do it for claude as well!

if ur up for it i can review the pr

juliusmarminge avatar Mar 31 '26 02:03 juliusmarminge

Sure, I can take that on.

Could you clarify what you mean by session limits? Are you referring to the context window or something else. @juliusmarminge

Aditya190803 avatar Mar 31 '26 06:03 Aditya190803

both codex and claude have 2 buckets, one burst (often referred to as session limit) and one weekly

Image Image

juliusmarminge avatar Mar 31 '26 07:03 juliusmarminge

Hey @juliusmarminge — I’ve opened a PR for this here: https://github.com/pingdotgg/t3code/pull/1605

Could you check it out when you get a chance?

Aditya190803 avatar Apr 01 '26 06:04 Aditya190803

Why not show it in the model picker, similar to how the Codex App does it?

sethigeet avatar Apr 02 '26 18:04 sethigeet

What is the status on this?

LukasKH avatar Apr 24 '26 21:04 LukasKH

The PR is open and ready to be merged It just needs approval from Julius. He will review it after returning from Miami.

Aditya190803 avatar Apr 25 '26 03:04 Aditya190803

Looking forward to this, as I use this feature in claude code web quite a bit. Image

Note the fields seem to change quite a bit as features change. For example, today there is a weekly Fable allowance on my subscription. But next week that may not exist.

jonocodes avatar Jul 15 '26 16:07 jonocodes

+1 on wanting this, and some additional user perspective:

On Claude Max ($100) and GPT Plus ($20), I have a pretty good feel for how much I can get done, but I still end up checking pretty frequently, especially as I get closer to the limit. I can imagine the GPT $100+ and Claude Max 5x plans hardly ever feeling the need to check this, but here on these lower plans I definitely feel the need to keep a closer eye on it. In Settings->Providers would be better than nothing, but ideally it's visible in the chat interface, and I kinda dig the context window one Aditya showed ... perhaps a setting?

Related - this is especially desirable as an extra data point as currently the sessions kinda just stay in limbo with no indication as to why when usage runs out

@Aditya190803 glad to help if you need anything

NicL9923 avatar Jul 19 '26 17:07 NicL9923

@juliusmarminge If I may be so bold ^. Will be keeping a close eye to respond quickly to any feedback/etc provided y'all don't have any blocking objections. Scoped to Claude/Codex only as those are more straightforward and I'd have to guess the main two providers used

NicL9923 avatar Jul 23 '26 03:07 NicL9923

Anyone working one this? Much needed feature

haseeb-heaven avatar Jul 31 '26 05:07 haseeb-heaven

Image

What do you think!

elijahbutler avatar Jul 31 '26 17:07 elijahbutler

May consider using Codexbar cli for this https://github.com/steipete/CodexBar/blob/main/docs/cli.md

I have been using it a bit as it seems to be a good abstraction to fetch quotas across providers.

jonocodes avatar Jul 31 '26 18:07 jonocodes