Skip to main content

Module block_identity

Module block_identity 

Source
Expand description

What the spawn environment carries about the agent on a block: the display name and slug, the uid, the workdir.

Structs§

PersistedAgentIdentity
What the server knows about the agent on a block, read from its db_agents row: the identity that will be carried into the process.

Functions§

carry_agent_uid_env
Identity M1 — spec §9.1: carry the UID and the token into the process.
carry_agent_workdir_env
AGENTMUX_AGENT_WORKDIR: the agent’s own workspace, which the host-only “Your workspace” Operator Config entry tells it to clone and work in (SPEC_LAUNCH_CONTEXT_WORKSPACE_RULE_AND_STARTUP_FILES_2026_09_30.md §3.4). Server-set, like AGENTMUX_AUTH_KEY: it is the launch cwd (cmd:cwd), not user configuration, so a cmd:env copy never wins. Host agents only — a container’s cwd is a host path that means nothing inside the image (the key is host-only in agent_env_scope).
carry_block_identity_env
Identity M4b-2 (spec §6.5.8): carry block_id’s row UID and token, and its slug’s identity, into the env of a controller that builds its own (App Server, ACP) instead of going through build_persistent_spawn_env. Same resolution and the same reserved-value rules as that builder (stale values are overwritten, or removed when the block has no row). A synchronous store read and an idempotent token mint, so on a multi-thread runtime worker it runs under block_in_place, as eager resume does (incident #1782).
deleted_agent_of_rowless_block
#3577: the id of the deleted agent block_id names, when the block resolved to no row (identity is None) and its agent was deleted — the builder’s last-read re-check of the gate’s refusal (Codex P1 on #3591). None whenever a row resolved, or the block names nothing deleted.
persisted_agent_identity
The db_agents row for the agent shown on block_id, if it has one, plus that agent’s token.
split_agent_identity_env
Identity M0 — SPEC_AGENT_IDENTITY_CARRIED_NOT_DERIVED_2026_09_23.md §9.1: make the display name and the slug two explicit variables, present on every launch path.