Reading Three AI Agents' Usage Limits From Their Own Sign-Ins, Without Ever Writing Them

https://hackernoon.imgix.net/images/dp9bUps0p2SugzArHBQQCfeQowc2-y6a3b3m.png

The problem

I use Claude Code, OpenAI's Codex and the Grok CLI every day, each on a subscription plan with its own limits: a session window that resets every few hours, and a weekly cap. Each tool shows its own number, in its own place, only when you ask. More than once I found out a limit was spent in the middle of a task.

I wanted all three numbers in the menu bar, always visible. The catch: none of these vendors offers a public "how much of my plan have I used" API. The numbers exist, because each CLI shows them, but they come from internal endpoints, authorized with the CLI's own sign-in.

So the real problem is this: how do you read another tool's credentials and call its private endpoint, without becoming the weakest link in that tool's security?

This article walks through how gas, an open-source Swift...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more