Polling costPro
What background subagents spend checking in: re-reading the whole transcript every poll against a status ping, and how much of the limit that buys back.
oxyn add polling-costThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- What background subagents spend checking on each other (poll_cost).
- A full poll re-reads the whole transcript every interval, and the transcript grows; a status ping costs a few hundred tokens.
- Two bars compare the window, the saving rolls as a percent, and a line says how many polls ran and how much of the usage limit that buys back for prompts.
When not to use
- A launch countdown with digits that roll per unit, a compact one-line variant, hours absorbing days when days are hidden, and a live state with a pulsing dot at zero: use Countdown instead.
- A total that moves clearly: use Animated counter instead.
- A collapsible JSON tree with search, paging for long arrays, copy value or path, the current path under the tree and full keyboard moves: use JSON viewer instead.
Installation
Polling cost is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add polling-costUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Hour
Three subagents for an hour.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Long
Six subagents over five hours.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
PollingCost
| Prop | Type | Default | Description |
|---|---|---|---|
agents | u32 | 3 | Background subagents. |
every | u32 | 30 | Seconds between polls. |
minutes | u32 | 60 | Window, minutes. |
transcript | f64 | 40_000.0 | Transcript tokens at the start. |
growth | f64 | 600.0 | Transcript growth, tokens a minute. |
ping | f64 | 300.0 | Tokens a status ping costs. |
limit | f64 | 300_000_000.0 | Usage limit for the window, tokens. |
Read from the Rust signature and doc comments.
Accessibility
- Numbers are text next to each bar; nothing relies on bar length alone.
From the spec
- Numbers sit next to each bar as text.
Motion & interaction
Timing
- Bars grow 800 ms and re-flow 500 ms; numbers roll.
- Reduced motion: no grow or roll.
Responsive behaviour
- Up to 440 px wide.
Edge cases (spec)
- Up to 440 px.
Notes for AI
- Import
PollingCostfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
PollingCostElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.