Expand description
Which container image an agent runs, and what happens when it can’t be had.
- The default and the legacy image names, and the fallback between them.
- Classifying a failed pull into something a person can act on, instead of passing bollard’s text through.
- An anonymous registry check (“could the daemon pull this?”) for the create flow, which has to decide before anything is pulled.
Spec: docs/specs/SPEC_CONTAINER_AGENTS_WORK_FOR_EVERYONE_2026_10_07.md.
Structs§
- Bearer
Challenge - The pieces of a
WWW-Authenticate: Bearer ...challenge. - Image
Ref - A parsed image reference: where to ask, which repository, which tag or digest.
Enums§
- Pull
Failure - Why a pull failed, as far as the daemon’s text lets us tell.
Constants§
- CONTAINER_
CLI_ DIR - Where the provider CLI is installed inside the container.
- DEFAULT_
AGENT_ IMAGE - The public base image: everything a container agent needs except the provider CLI, which is installed on first start.
- LEGACY_
AGENT_ 🔒IMAGE_ REPO - Repository of the earlier image that bundled Claude Code. It is private, so only machines that already hold it can use it.
Functions§
- better_
access - The better of two answers for “can this be had”: something usable beats something unknown, which beats a refusal.
- check_
image_ access - Whether
imagecan be had here. A stored legacy image is also checked against the base image it falls back to, so the answer matches what a start would actually do. - classify_
pull_ error - Classify a pull error from the daemon’s HTTP status (when it had one) and text.
- cli_
install_ failure_ message - The sentence for a provider CLI that couldn’t be installed in the container.
- docker_
error_ message - The sentence for any other Docker failure while starting the container.
- docker_
unreachable_ message - The sentence for a Docker daemon that isn’t answering.
- is_
legacy_ agent_ image - Whether
imageis the private legacy image, at any tag. - looks_
like_ daemon_ unreachable - Whether a Docker error is the daemon being unreachable, not a request it refused.
- parse_
bearer_ challenge - Parse a Bearer challenge;
Nonefor any other scheme or a missing realm. - parse_
image_ ref - Split
imagethe way Docker does.Nonefor a reference we won’t probe (a local or port-qualified registry, which may well speak plain HTTP). - pull_
failure_ message - The sentence for a failed pull. Names the image, says what happened, and
says what to do next. Never carries the daemon’s raw text except for
Other, where there is nothing better to say. - resolve_
container_ image - The image a stored
agent:container_imagevalue means: empty is the default. - split_
challenge_ 🔒params - Split on commas that are outside double quotes (a scope can hold
,). - truncate 🔒