The budget panel said $189 left. The console said $291. Both numbers were wrong. A developer building a Claude Code status-pane plugin found that its budget display and the provider's console reported conflicting remaining balances ($189.20 versus $291.77) because the pane compared a real spend figure against an unmeasured placeholder budget of $200 and blended two incompatible accounting sources — the OpenAI-compatible billing endpoint and the new-api console's quota fields. The fix replaces arithmetic reconciliation with a discriminated union tagging each figure by origin ('console' or 'billing') and a merge function that only carries values across snapshots of the same origin, so the two accountings can never be silently combined. Our little status pane said $10.80 spent of $200.00, $189.20 left . The provider's console, open in the next tab, said $291.77 remaining . Same account, same day. Both numbers were wrong, and for different reasons. This is the write-up of finding the number that is actually true, and of the one-line-shaped design change that stops the pane from ever mixing two accountings again. It's a plugin for the Claude Code agent harness: a mod that registers a UI pane and redraws it on a timer. It shows the account's remaining balance next to the rate-limit windows, the context fill, and the session cost. It runs in TypeScript, it is loaded as source at session start, and it has a test suite that drives it through a mocked engine. The provider is a reseller running new-api https://github.com/Calcium-Ion/new-api , the open-source console that a lot of LLM API resellers are built on its ancestor, one-api, behaves the same way . That detail matters later. The pane compared a spend figure against budgetUsd , a config value with a default of 200 : js const DEFAULT BUDGET USD = 200 Nobody measured that 200. It was a placeholder that shipped, and because it was rendered with two decimal places next to a real spend number, it read as data. The pane confidently announced that 189 dollars were left, which is exactly the kind of wrong answer that is worse than "unknown" — you act on it. The spend figure came from the billing API: GET /v1/dashboard/billing/usage {"total usage": 3004} // cents That endpoint is the OpenAI-compatible one, and on this provider it reports a different number from the console. More on that below. The console exposes the account itself: GET /api/user/self Authorization: Bearer