Expand description
Whether each agent is working, waiting on the user, idle, stopped or
failed, and since when: the agent_status the LAN fleet feed,
GET /agentmux/reactive/agent-names and (through the feed’s snapshot) the
cloud presence record carry (agentmux-mobile’s
SPEC_AGENT_STATUS_AND_LIVE_PANE_FEED_2026_10_07 §3, §13.1).
decide is the rule, pure; current_state reads its inputs from the
block’s controller and the block’s meta; a SinceTracker remembers when
each block’s state began. Every caller goes through
agent_status_of_block or a SinceTracker of its own, so the feed
and the names route agree on since_ms.
limited and signed_out are an agent that is alive but can’t work: its
last run ended on the plan’s usage limit or a refused sign-in
(docs/specs/SPEC_UNRESPONSIVE_AGENTS_2026_10_23.md §3). Read them through
unavailable_of_block, so no caller re-derives the rule.
Structs§
- Agent
Status - A state and when it began (unix ms, this machine’s clock).
- Since
Tracker - When each block’s current state began. A state seen for the first time
(srv start, a new agent) begins when it is seen; a state that changes
begins again;
Noneforgets the block, so a stopped and restarted agent does not inherit an old start. - State
Inputs - What
decidelooks at, as read from the controller and the block. - Stored
Failure - The parts of a block’s
agent:last_failurethe states read. Only these fields: the stored failure leaves out empty ones that reading the wholeAgentFailureback would require. - Unavailable
- An agent that is alive but can’t work, and why.
Enums§
- Agent
State - An agent’s state as the wire reports it.
Constants§
- LAUNCH_
BLOCKED_ AT_ META_ KEY - When (unix ms) the launch stopped there.
- LAUNCH_
BLOCKED_ META_ KEY - Written by the agent pane’s launch when it stops at “needs sign-in”, and
cleared once the pane registers its controller. Such a pane has no
controller, so nothing else says why: a message to it failed with “no
controller for block” instead of being held for the sign-in
(
current_state_at,unavailable_of_block). - LAUNCH_
BLOCKED_ SIGN_ IN - The
LAUNCH_BLOCKED_META_KEYvalue for a launch waiting on a sign-in. - META_
AWAITING_ USER - Block meta the agent pane sets while a question waits for the user.
- RUN_
ACCOUNT_ META_ KEY - The account a pane’s run launched on, written at spawn
(
build_persistent_spawn_env), so a failure that run records counts against that account even after the agent is linked to another (run_accounts_of_block).
Functions§
- agent_
status_ of_ block - The agent on
block_id: its state now and since when. - change_
wakes_ held - Whether a change from
fromtotocan make a held message deliverable: the agent left a state that held messages (out of quota, signed out, not running), or a session that had gone quiet took a turn (a cold session warming). The one place a state change wakes the held-message replay, so a path that forgets its own wake is still covered. - current_
state - The block’s state now: its controller’s runtime status and the block’s
term:awaiting_userandagent:last_failure.Nonewithout a controller (unless its launch stopped at “needs sign-in”:signed_out), or when the block can’t be read. - current_
state_ at current_stateatnow_ms.- decide
- The state, or
Nonewhen nothing tracks this agent’s turns (a terminal pane:shell/cmd, or any controller that isn’t an agent’s) or its process state is unknown. Saying nothing beats a wrongidle. - failure_
of_ block - The block’s stored failure, or
Nonewhen it has none (or one this build can’t read). - global_
tracker - The tracker the live fleet source and the names route share.
- in_turn
- Whether the agent in
block_idis in a turn: working, or waiting on a question. The one definition of “not between turns”, for everything that waits for a turn to end before it restarts a pane (an account move, a prepared change). - run_
accounts_ of_ block - The accounts a pane’s run counts against:
agent:run_account, the account it launched on; a pane from before that key falls back to its agent’s current links. One rule for the spawn gate’saccount_blocks,unavailable_of_blockand the account episodes. - state_
and_ unavailable - The block’s state now and, while it is
limitedorsigned_out, why. - unavailable_
of_ block Somewhen the agent onblock_idislimitedorsigned_outatnow_ms. Withidentity, a pane from beforeagent:run_accountgets its agent’s current account link.