Skip to main content

Module cli_notice

Module cli_notice 

Source
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 ResolveCli npm-installs the pinned CLI for a pane, an agentmux_cli_install frame says so — installing, then installed or failed, under one install_id so 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, an agentmux_cli_version_changed frame 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.

Enums§

ContainerStartState
Where a container agent’s start-up is.
InstallState
Where an install stands.

Constants§

AGENT_READY_SUBTYPE
Subtype of the frame that says a container agent is ready and waiting for its first message.
CONTAINER_CACHES_SUBTYPE
CONTAINER_IMAGE_SUBTYPE
CONTAINER_LIMIT_SUBTYPE
CONTAINER_START_SUBTYPE
Subtype of the frames that say how a container agent’s container is coming up.
INSTALL_SUBTYPE
MCP_LEFT_OUT_SUBTYPE
Subtype of the frame that names the MCP servers a host agent is not given from its folder’s own file.
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

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). None for a block with no agent.
agent_ready_frame
An agentmux_agent_ready frame: a container agent’s container and CLI are up and nothing is on its way to it, so the pane waits for the user’s first message. seconds is the whole start-up.
append_line_to_pane
append_to_pane for a frame already serialized to its one line (no trailing newline).
append_to_pane
Append frame to block_id’s output (and the agent’s global transcript zone), as the memory-delivery notice does.
container_caches_frame
An agentmux_container_caches frame: the cache volumes of a container agent (a developer agent’s cargo registry and build output) hold bytes, more than the warning level. agent is the agent’s id and name, for the row’s button.
container_image_frame
An agentmux_container_image frame: the container runs an older agent image than this AgentMux (state outdated), has just been removed on request so the next message starts it from the current one (updated), or was moved to the current one by AgentMux itself while the agent was idle (auto_updated).
container_limit_frame
An agentmux_container_limit frame: a container’s CPU or memory limit changed (state changed, by by), something in the container was stopped for going over its memory limit (oom), or the daemon refused a limit (failed, with error). agent is the agent’s id and name, for the row’s button. memory_mb and cpus are the limits in force; each frame is its own row.
container_start_frame
An agentmux_container_start frame. start_id is the same for every frame of one start-up, so the pane updates one row. percent is how much of the image has arrived, once the daemon has said.
install_frame
An agentmux_cli_install frame. install_id is the same for every frame of one install, so the pane updates one row.
mcp_left_out_frame
An agentmux_mcp_left_out frame: a container agent can write the folder of the host agent on block_id, so the agent takes nothing of the folder’s own configuration (mcp_folder_rule, host_agent_files). names are the servers its folder’s own .mcp.json lists besides the agent’s, folder is what else of the folder is not loaded, by kind and count, and no_path are the agent’s own servers left out because their command has no path outside the folder.
observe_and_notify
Observe version for an agent and, if it changed, append the notice to block_id’s pane. The agent is agent_id when the caller knows it (a new pane resolves its CLI before its agentId meta is written), else the pane’s agentId. The one entry point both sources use: Claude’s own system/init frame, and ResolveCli for the other providers.
observe_version
Record that agent_key’s CLI just started on version, 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 returns None. 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_FILE lives: 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. Not data_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_changed frame. pinned is the version this AgentMux build installs, so the pane can say when to isn’t it (a self-update, or a stale install).
version_token
The version number in a CLI’s --version output, e.g. "2.1.285" from "2.1.285 (Claude Code)" or "codex-cli 0.154.0". None if there is none ("unknown", an empty string).