Skip to content
Back

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-cost
Background status polling3 subagents · every 30s · 1h
Re-read transcript20.83 M
Status ping108.0 K
99%less polling cost over 360 polls, about 6.9% of the limit back for prompts.
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

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.

Terminal
oxyn add polling-cost

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Hour

Three subagents for an hour.

Background status polling3 subagents · every 30s · 1h
Re-read transcript20.83 M
Status ping108.0 K
99%less polling cost over 360 polls, about 6.9% of the limit back for prompts.
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Long

Six subagents over five hours.

Background status polling6 subagents · every 30s · 5h
Re-read transcript467.46 M
Status ping1.08 M
100%less polling cost over 3600 polls, about 100.0% of the limit back for prompts.
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

PollingCost

PropTypeDefaultDescription
agentsu323Background subagents.
everyu3230Seconds between polls.
minutesu3260Window, minutes.
transcriptf6440_000.0Transcript tokens at the start.
growthf64600.0Transcript growth, tokens a minute.
pingf64300.0Tokens a status ping costs.
limitf64300_000_000.0Usage 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 PollingCost from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: PollingCostEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI