Expand description
Where a new agent runs: the runtime, container_image, memory_mb and cpus of Agents spawn (a worker) and
Agents create (a named agent from a template).
Without them a worker runs as its leader does (copy_definition keeps the type and the image), and a created agent
as its template says. With them, the new agent can run in a container when its caller runs on the host. The
protections are the ones the rest of the container API has: a container caller starts only container agents
(a container is not a way to a host process) and does not set limits (it asks a host agent, as for its own), and
a container is refused when Docker is not there, with the reason.
Structs§
- Container
Plan 🔒 - A container agent as asked for: the image, and the limits to store (
None: leave them automatic).
Enums§
- Placement 🔒
- Where the new agent runs.
Constants§
- SETTING_
DEFAULT_ RUNTIME - The per-user setting for where a new agent runs when the call does not say:
container(the default) ornative. Spec: docs/specs/SPEC_AGENT_MODEL_ROUTES_ANY_MODEL_SPAWN_AND_SWITCH_2026_11_06.md section 10.
Functions§
- apply 🔒
- Make
def(just inserted) a container agent asplansays, and store its limits. A native placement on a definition that was a container one (a template’s) isagent_typeandenvironmentback to the host’s. - decide 🔒
- Check what
askwants, without making anything.caller_in_container: the asking agent runs in a container.source_in_containerandsource_image: how the source (the leader, or the template) runs, whichruntimeandcontainer_imagedefault to.docker: whether a container can be made here, or why not. - decide_
here 🔒 decidefor a callercallerand a source defined bysource, asking this machine whether Docker is there.provideris the harness the new agent runs. A call that says nothing about where gets the setting’s default: a container, when the harness has an image and Docker answers, and otherwise as its source runs (never refused, since nobody asked for a container). A caller or a source that already runs in a container keeps what it did.- default_
is_ 🔒container - Whether the setting leaves a new agent in a container: everything but
native(orhost) does. - has_
container_ 🔒image - Whether the harness has a container image. The same list as
containerSupportedin the frontend’sdefaults/cli-catalog.ts: only Claude Code has an image built, so every other harness stays native.