Expand description
Getting a container agent’s container ready for a turn: the container is running, and the provider CLI is installed in it.
This is the first thing a container turn does, inside the turn’s own task
(SubprocessController::spawn_container_turn), NOT inside the RPC handler
that accepted the message: downloading the image takes minutes, and the RPC
engine drops a handler after five seconds, which cancelled the download for
good. The handler only records the ContainerStartup on the controller
and queues the turn.
Spec: docs/specs/SPEC_CONTAINER_AGENTS_AT_PARITY_2026_10_27.md (P0, P1, P2), docs/specs/SPEC_CONTAINER_AGENTS_WORK_FOR_EVERYONE_2026_10_07.md.
Structs§
- Container
Spec 🔒 - What a container agent’s pane says about its container, apart from the services that run it.
- Container
Startup 🔒 - Everything needed to get a container agent’s container ready, owned, so it can outlive the request that asked for it.
- IfDropped 🔒
- Runs
fwhen dropped unless disarmed: closes a pane row whose work was cancelled (a stop drops the start-up future mid-way). - Prestart
Slot 🔒
Enums§
- Prestart 🔒
- Where a block’s pre-start is.
Statics§
- PRESTARTING 🔒
- Blocks whose pre-start is under way, so a second request for one does nothing, and how to end it.
Functions§
- before_
the_ 🔒container_ has_ the_ folder - What a container agent’s turn does to its workspace folder on the host before the container has it: the
folder is marked as a container agent’s, so a host agent given it later gets only the MCP servers AgentMux
writes (
mcp_folder_rule), and signing keys an earlier launch left in its.mcp.jsoncome out. - cancel_
prestart 🔒 - End the pre-start of a pane that is closing, so a start still pulling its image can’t create and run a container for a pane that is gone. The caller stops the container afterwards. Nothing under way: nothing done.
- container_
adapter_ 🔒for_ block - The adapter for the container agent in
block_meta: its container is readied at the start of each turn, and a turn is adocker execin it. SeeContainerStartup::for_blockfor whatenv_varsandworking_dirare used for. - error_
result_ 🔒frame - The
resultframe that ends a turn with an error and carriesmessage. - prestart 🔒
- Begin a new container agent’s start (image, container, CLI) in the background, so its first message finds a warm container. Only for a container agent whose pane has run nothing, and only once its account resolves (the mounts carry the account’s credentials: starting without them would make the wrong container). The first message’s own start-up shares the container’s locks, so nothing is done twice.
- prestart_
applies 🔒 - Whether a pre-start applies: a container agent whose pane has run nothing yet. A pane that is running a turn, or has run one, is left to the turn’s own start-up.
- startup_
step 🔒 - The step the controller runs at the start of each container turn.