Skip to content

Latest commit

 

History

History
60 lines (49 loc) · 2.79 KB

ADR006.md

File metadata and controls

60 lines (49 loc) · 2.79 KB

ADR006: Agents as Dev Container Features

Status

Accepted. Supersedes ADR002, ADR004, and ADR005.

Context

Coding agents are the reason these images exist, and they used to be baked into them: every published image except base carried every agent CLI, and container creation installed a fixed plugin set into every container.

A project that wanted one agent got all of them. A project that wanted different plugins had to fork the post-create script. And every agent release meant rebuilding every image, because the agents were part of the images rather than something added to them.

Decision

Agent CLIs are distributed as Dev Container Features, one per agent, from faangbait/dnf-features. A project adds the agents it wants on top of a published image. Each feature pins its agent's version at install time and takes that agent's plugins as options.

The images keep the agents' state, not the agents: the shared portable-agents volume, the environment that points each agent's configuration into it, and the post-create step that links agent home directories into it. Tooling that existed only to serve the baked-in agents (pipx, bun) is retired.

The images also keep the agent-neutral files every agent should start from, without placing them where any one agent looks. The Containerfile's userland-payload stage bakes the oci-env skill (a pinned release of faangbait/agent-skills) into /usr/local/share/agent-skills/ and etc/AGENTS.md into /usr/local/share/agentsmd/AGENTS.md. Each agent's feature links them into that agent's own locations (for Claude Code, /etc/claude-code/CLAUDE.md and its skills directory) when it installs.

Consequences

  • Images are smaller and no longer rebuild when an agent ships a release. The install cost moves to the consuming devcontainer's first build.
  • Projects choose their agents and plugins without changing this repository. Nothing is installed by default, so a project that wants the old plugin baseline has to ask for it.
  • Agent state persists only if the image's post-create runs before the features' own. That holds for configs that use a published image; a build:-based config runs its own post-create last, so its first create installs plugins before the volume is ready.
  • base carries no agent state volume. Agent work belongs on agents or a language image.
  • The org policy and the oci-env skill reach an agent only through that agent's feature. An image with no agent feature has them on disk but loaded by nothing; in particular /etc/claude-code/CLAUDE.md no longer exists in the image itself.
  • Anything inside the image that called an agent (remindme) can no longer assume one is installed.