Expand description
Pane notices about an agent’s CLI (SPEC_LAUNCH_CONTEXT_WORKSPACE_RULE_AND_STARTUP_FILES_2026_09_30.md §6.3, phase LC4):
- Install: while
ResolveClinpm-installs the pinned CLI for a pane, anagentmux_cli_installframe says so —installing, theninstalledorfailed, under oneinstall_idso the row updates in place. A pane restored at startup used to install silently. - Version change: each agent’s last-run CLI version is kept in
RECORD_FILE, in the channel directory (record_dir). When the agent’s CLI next starts on a different version, anagentmux_cli_version_changedframe tells the user (from,to, and the version AgentMux pins).
Both are system frames appended to the pane’s output, so they replay
with the transcript, and the digest never reads them (it only reads
assistant/user/result lines). They are for the user; the agent’s context
is unchanged.
Structs§
- LastCli 🔒
Enums§
- Install
State - Where an install stands.
Constants§
- INSTALL_
SUBTYPE - RECORD_
FILE - Per-agent last-run CLI versions, in
record_dir(no schema change: a new column would lock older builds out of a shared store.db). - VERSION_
CHANGED_ SUBTYPE
Statics§
- RECORD_
LOCK 🔒 - Serializes read-modify-write of
RECORD_FILEwithin this srv.
Functions§
- agent_
key_ of_ block - The key an agent’s record is kept under: the block’s
agentId(the agent’s UID, or a provider key for a quick-launch pane).Nonefor a block with no agent. - append_
to_ pane - Append
frametoblock_id’s output (and the agent’s global transcript zone), as the memory-delivery notice does. - install_
frame - An
agentmux_cli_installframe.install_idis the same for every frame of one install, so the pane updates one row. - observe_
and_ notify - Observe
versionfor an agent and, if it changed, append the notice toblock_id’s pane. The agent isagent_idwhen the caller knows it (a new pane resolves its CLI before itsagentIdmeta is written), else the pane’sagentId. The one entry point both sources use: Claude’s ownsystem/initframe, andResolveClifor the other providers. - observe_
version - Record that
agent_key’s CLI just started onversion, and return the version it last ran if that was a different one of the same provider. A first run, or a switch to another provider, records and returnsNone. A record that can’t be read or written is logged and treated as empty: at worst a notice is missed, never a launch. - record_
dir - Where
RECORD_FILElives: the channel directory (~/.agentmux/channels/<channel>/, or a dev build’s own root), next to the shared store that holds the agents it is keyed by. Notdata_dir: an installed build’s data dir is per AgentMux version (channels/<ch>/versions/<v>/data/), so after an upgrade every agent would read as a first run and the upgrade this exists to report would go unnoticed (ReAgent P1 on #4128). - version_
changed_ frame - An
agentmux_cli_version_changedframe.pinnedis the version this AgentMux build installs, so the pane can say whentoisn’t it (a self-update, or a stale install). - version_
token - The version number in a CLI’s
--versionoutput, e.g."2.1.285"from"2.1.285 (Claude Code)"or"codex-cli 0.154.0".Noneif there is none ("unknown", an empty string).