Expand description
Finding out that a limited agent can work again when nothing else will say
so. A stored usage limit ends at its reset, a clean turn, a sign-in or an
account move; if the account was changed out of band (the plan was raised,
the limit was lifted by hand) none of those happens, and every message to
the agent stays held. So a message that must not wait (urgent, or naming a
task that waits on the agent) is still held, and in addition one small
turn is started on the pane. A clean turn clears the failure and wakes the
replay, which then sends what was held; a turn that fails again leaves the
agent limited and the message held. The message itself never rides the
probe, so a failed turn loses nothing. Spec:
docs/specs/SPEC_AGENT_AVAILABILITY_ONE_STATE_2026_10_26.md.
Enumsยง
Constantsยง
- CHECK_
STAGGER_ ๐MS - The pause between the starts of the check turns of one account.
- PERSON_
CHECK_ ๐EVERY_ MS - The least time between two checks a personโs message starts on one agent.
- PROBE_
EVERY_ ๐MS - The least time between two probes of one agent.
- PROBE_
NOTE ๐ - What the agent is asked; any reply is a clean turn.
- PROBE_
WINDOW_ ๐MS - How long after it started a probeโs turn is taken to still be running.
Staticsยง
- LAST_
PROBE ๐ - PROBING ๐
- The panes with a probe turn in flight, and when it began.
Functionsยง
- check_
limited ๐ - โCheck nowโ for the panes
block_ids: each one out of quota gets a check turn (check_now), staggered by account.Okwhen its check started, runs, or starts in a moment;Errsays why not (not out of quota, a route out of credits, not registered). The way to say โthe plan changed, look againโ, so nobody needs to know that an urgent message is what starts one. - check_
now ๐ - Starts a check turn on the agent of
block_idbecause a personโs message waits for it: it does not wait for the 15-minute slot a message between agents does, but one turn runs at a time and a new one starts no sooner than a minute after the last. The message itself never rides the turn. - maybe_
probe ๐ - After
reqwas held for a limited agent: start a probe turn if it warrants one and the agentโs slot is free. - stagger_
delays ๐ - How long after the first each check of one account starts: the first at once, the others
CHECK_STAGGER_MSapart, so the agents of an account do not all start a turn in the same second.accounts[i]is paneiโs account (None: its own). - start_
check ๐ - take_
person_ ๐check - Takes the right to start a check on
block_id, and marks its turn in flight (the hold lasts until it clears the limit,unavailable_while_probing).falsewhen one runs or ran less thanPERSON_CHECK_EVERY_MSago. - take_
slot ๐ - Takes the probe slot of
keyif its last probe is at leastPROBE_EVERY_MSago;falseleaves it as it was. - unavailable_
while_ ๐probing - The limit of the agent on
block_idwhile its probe turn runs. A turn in flight makes the paneworking, so the usual check would let a replay pass release held messages into the probe, and a probe that fails would lose them. The hold lasts until the probe clears the stored failure (a clean turn) orPROBE_WINDOW_MShas passed. BLOCKING. - wants_
probe ๐ - Whether a held message to this agent warrants a probe: the agent is out of quota until a known reset (without one, messages are delivered and a turn finds out), and the message cannot wait.