fleet.bulk-stop from the agent caller: its own block and its workers stop at once, every
other agent’s opens the override window (pending in the answer) and stops when it runs out.
A staged rollout can’t be applied to those windows (they all open at once), so it is refused
when any target is another agent’s.
Every pane of the agent whose definition id is agent_id, in every
window and tab of this instance, running or not (a pane whose agent has
stopped, a pane in a window nobody is looking at): where it is open, as
open_agent_panes reports it. window_ids is empty for a pane no window
shows. One agent should have one pane; a caller that is about to make one
(an import, a restore, a drag) asks this first and reuses what it finds
instead of creating a second.
agent.send from a connection: the text goes into the agent’s input unmarked, as the person’s own turn, so only the
AgentMux window sends it. An agent reaches another agent with the Message tool, which is delivered as a jekt.
The environment an agent.send spawn is given: cmd:env through
build_persistent_spawn_env, exactly as the agentinput path builds it
— identity gate, MuxBus token, wrapper auth, agent identity (UID + token
for a row-backed block, AGENTMUX_AGENT_ID from agentName when
cmd:env lacks it), git identity, tools PATH. Identity M4b-1 (spec
§6.5.8); factored out so the carriage is testable.
As agentinput does first: a harness other than Claude Code is not started on the host in a folder a
container agent can write (mcp_folder_rule), and the pane is told why. A Claude turn there goes on, and the
pane is told which servers of the folder’s own file it is not given. Asked off the async workers (it reads
the disk).
Where each of block_ids is open: its agent, tab, and the windows
showing its workspace. The agent is resolved like the rest of srv
resolves a block’s agent (instance_get_active_for_block: agentId,
the legacy agent:id, a template-launched row, the latest launch on the
block) so a pane from an older build is not reported closed (Codex P1 on
#4127); the raw meta id is the fallback when that finds no row. Blocks
with no resolvable agent or no parent tab are skipped. Workspaces and
windows are read once for the whole list.
The answer when agent.stop on cmd.block_id opened an override window for the agent caller
(a connection’s registered agent, empty for the window), or None when the stop is immediate:
the window’s own, the agent’s own block, or a worker it opened.
An agent’s connection ends processes only under its own block or a worker’s it opened. Another
agent’s go through agent.stop, which gives the person their override window, so killing them
directly would skip it.
agent.open-panes: every agent pane in this instance, wherever it is.
A renderer only knows the panes in its own window, so “is this agent
open?” asked of a renderer misses one in a floating or other window —
My agents then offered a reattach for an agent that was live, and the
second pane could never run (SPEC_AGENT_SAME_PROCESS_DUPLICATE_PANE_
RECOVERY_2026_10_01.md §2 G0). Same source as agent.tracked-blocks.
ambient.outcomes: how ambient calls have ended since srv started, so “the
swarm has been blank for an hour” is visible without a database copy
(SPEC_AMBIENT_SWARM_SUMMARY_HARDENING_2026_10_02.md section 5.8).
swarm.other-instances: this machine’s other channels (the host-global shared
registry) and the LAN hosts (the LAN discovery peer list), with their agents’
names (Phases 1 and 2 of SPEC_SWARM_OTHER_HOSTS_AND_CHANNELS_2026_10_02.md)
and, where their instance reports it, their state (Phase 4). No content, no
credentials and no addresses. A peer’s agent’s account is named only when the
same account is signed in here, and then by this machine’s own label for it.
Core agent.stop logic, factored out so fleet.bulk-stop
(server/app_api/fleet.rs) can loop it per target instead of
duplicating the controller-lookup/stop/status-read sequence.
The agent an override window is opened for, when caller (a connection’s registered agent,
empty for the person’s window) acts on block_id that is another agent’s: Some(by), the caller’s
uid (its name when it has none). None for the window itself, the agent’s own block and a worker
it opened, which it ends at once.