Problem
aidc claude / aidc up always runs docker compose up -d --build (lib/aidc.sh:240), which forces Docker to re-evaluate the build on every start. Combined with unpinned curl | bash agent installers (latest versions fetched at build time), any layer-cache miss triggers a full ~3 GB re-install — the "every aidc claude or aidc start results in a large ~4GB container" experience.
Proposal
- Fast path in
aidc up: if the compose image already exists and the Dockerfile/compose haven't changed (check docker image inspect + mtime/hash of .devcontainer/Dockerfile and compose.yaml), run docker compose up -d without --build. Only run --build when the image is missing or the files changed. (This mirrors what aidc rebuild is for — rebuild keeps forcing the build.)
- Pin agent installs (versions + SHA256 where the vendor provides them) so the agent layer is deterministic and the layer cache is actually reusable across projects. Unpinned
latest installers silently change layer digests and defeat Docker's cache.
- Optionally:
AIDC_NO_BUILD=1 env escape hatch for users who want up to never build.
Expected impact
Files
lib/aidc.sh — aidc::cmd_up, aidc::cmd_rebuild
templates/devcontainer/Dockerfile.tmpl — agent install block (pin versions)
Acceptance criteria
aidc up twice in a row: second run does not invoke docker build (verify with --progress output or build log).
aidc rebuild still forces a rebuild.
aidc up on a repo whose Dockerfile changed triggers a build.
Problem
aidc claude/aidc upalways runsdocker compose up -d --build(lib/aidc.sh:240), which forces Docker to re-evaluate the build on every start. Combined with unpinnedcurl | bashagent installers (latest versions fetched at build time), any layer-cache miss triggers a full ~3 GB re-install — the "every aidc claude or aidc start results in a large ~4GB container" experience.Proposal
aidc up: if the compose image already exists and the Dockerfile/compose haven't changed (checkdocker image inspect+ mtime/hash of.devcontainer/Dockerfileandcompose.yaml), rundocker compose up -dwithout--build. Only run--buildwhen the image is missing or the files changed. (This mirrors whataidc rebuildis for —rebuildkeeps forcing the build.)latestinstallers silently change layer digests and defeat Docker's cache.AIDC_NO_BUILD=1env escape hatch for users who wantupto never build.Expected impact
aidc claudeon an already-built project: near-instant (no build evaluation, no downloads).Files
lib/aidc.sh—aidc::cmd_up,aidc::cmd_rebuildtemplates/devcontainer/Dockerfile.tmpl— agent install block (pin versions)Acceptance criteria
aidc uptwice in a row: second run does not invokedocker build(verify with--progressoutput or build log).aidc rebuildstill forces a rebuild.aidc upon a repo whose Dockerfile changed triggers a build.