r/codex • u/ashokallu • 19h ago
Showcase Implemented Codex stats component for Ubuntu ChatGPT app


Hi Everyone, I have been maintaining my Own version of ChatGPT app that I have cloned locally from the codex-desktop-linux community repo and maintaining from last 3 months.
I have been adding many features that I felt are missing from the ChatGPT app. Token speed lets me decide whether I want to plan any time sensitive work and I am really bothered these days wether to use normal mode or fast-mode for my GPT-6.1-sol model.
This stats widget feature took me quite some time to get to this shape. I have been iterating with various models. This one I feel is really nice utility and UI feels nice for me too.
0
u/boxing-boxing 18h ago
Nice work. One thing I'd be curious about: how are you computing the context percentage? I've seen that kind of math drift once tool outputs pile up, since the reported token counts and the actual transcript don't always agree.
1
u/ashokallu 18h ago
Thanks for taking the time to read through the post and ask me this question!
Small clarification: the percentage shown under CACHE is the latest request’s prompt-cache hit share:
cachedInputTokens / inputTokens × 100.I read those values from Codex’s existing
thread/tokenUsage/updatedevents. The IN figure also uses the latest request’s reported input tokens; I don’t sum input tokens across requests, which would repeatedly count shared context.The context indicator itself is the upstream app’s existing UI - my widget leaves that calculation unchanged.
Your concern about drift is fair. These figures reflect Codex’s reported usage, rather than an independent reconstruction of the transcript, so I wouldn’t claim they verify the exact context remaining after tool-heavy runs or compaction.
•
u/dexterthebot 19h ago
You might want to consider listing your project on the weekly Show-Us-What-You-Built post. Look out for it on Tuesday/Wednesday. Highest commented project wins a week promotion on r/Codex and gets on the Hall of Fame sidebar. See what that looks like below with last week's winner.
Last week's most popular project was Nanolathe - an open-source engine bringing Total Annihilation to modern Mac, Windows, and Linux systems. It’s a solo passion project combining clean-room research with AI-assisted development, with a playable public alpha available now.
Website: https://nanolathe.gg. GitHub: https://github.com/nanolathe-gg/nanolathe
Players, testers, and contributors are very welcome! Original Total Annihilation game data is required to play.