Skip to content

Cost and context

Every session row shows two figures: what the session has cost and how full the model’s context window is. Both are Gluon’s own. Gluon counts each request the agent reports against price and window tables it builds on your machine. The agent’s own figures are only compared with Gluon’s, not shown.

Cost is a running total in dollars. A prefix or suffix says how reliable it is:

Shown Meaning
$0.38 Counted by Gluon from the agent’s requests and a price it knows.
~$1.12 An estimate: a plan’s API-equivalent price, a figure that needed an assumption (Codex’s service tier, for example), or an OpenRouter session’s running figure.
$4.12* The agent’s own total, standing in for a model Gluon has no price for.
$4.12✓ What OpenRouter billed the session. See below.
— Unknown, or the agent reports none.

Context is a percentage of the model’s window, counted the way the agent’s own display counts it. It shows — when unknown, for example after a /compact until the next request.

Gluon never exports prompts, responses or tool content. Only the figures are kept.

  • Claude Code, Codex and Grok Build report each request through their OpenTelemetry export to a listener on 127.0.0.1. Gluon sets it up for the launch. If your environment has telemetry settings of its own, a note says so and the figures show —.
  • OpenCode reports through a plugin that follows OpenCode’s own events.
  • Kimi Code has no telemetry Gluon may set. Gluon asks the official binary to export the session after it exists, reads the token counts from it in memory and deletes the export at once. It refreshes about every 30 seconds and when Kimi exits. On the plan, the cost is Moonshot’s API price (~$). Kimi shows no context percentage.
  • Antigravity shows context only. The context comes from its status line, which needs cost.antigravity_statusline: on in the config and does not work on Windows. Its cost is —: it reports none, and the token totals its status line holds are the conversation’s size, not what the requests billed. A per-request source is not available yet.

How the figures fit together is in Architecture (“Status, cost and context”); each harness’s assumptions are named in the header comment of its file under src/cost/, and gluon cost-report shows them for your sessions. Where a price comes from is in Pricing sources.

OpenRouter bills each request at the provider that served it, so Gluon cannot know the exact price while the session runs. It shows a ~$ running figure. After the session ends, Gluon reads the key’s usage before and after and says in the chat, a minute or so later, what OpenRouter billed. The cost then shows $4.12✓.

gluon cost-report shows what Gluon’s own figures were audited against, with no model calls. Gluon keeps an audit ledger of its figures next to the agents’ own, to find differences. Set cost.audit: off in the config to keep no ledger. The figures are unaffected. gluon uninstall removes the ledger.

No price table ships with Gluon. It builds its own on your machine: when it starts and when an agent launches, in the background, from models.dev, OpenRouter and your installed agents, and keeps them in its state directory. Offline, it keeps the last ones. gluon pricing update does the same in the foreground and says what changed. gluon cost-report shows which tables priced a session. There is no switch to turn the refresh off.