Containers: integration fixes before first flip — CMD + credentials mount path #27
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As an operator flipping an agent from host mode to container mode for
the first time, I want the Dockerfile +
just containers-rebuild+runAgentto actually work end-to-end, so I can pilot container modewithout discovering two blocker bugs one at a time.
Follow-up to #18 / #19 / #20 (PRs #23 / #22 / #21). The three stories
shipped separately and were never exercised in a live end-to-end path.
Reading the landed code surfaces two integration bugs that would each
stop the first container from running.
Acceptance criteria
Bug 1 — Dockerfile has no long-running
CMDDockerfileends with a directive that keeps the container alive(e.g.
CMD ["sleep", "infinity"]). Without it,docker run -d … <image>creates the container and immediately exits —docker execfails,
just containers-uphas nothing to start.Bug 2 — credentials mount path mismatch between
justfileandsrc/container.tsjust containers-rebuildmust mount the host credentials file atthe exact in-container path
runAgentexpects, which isCONTAINER_CREDENTIALS_TARGETfromsrc/container.ts—/home/claude/.config/claude-code/.credentials.json. Today therecipe mounts to
/root/.claude/.credentials.json:ro, which theclaudeuser cannot read (different user, different path) and theClaude CLI isn't looking at anyway.
agents.json(
agents.<name>.container.credentials_host_path) with the samefallback
container.ts:defaultHostCredentialsPath()uses, so bothsides of the mount agree with zero config on the default path.
Tests
src/container.test.tsgains a test for the recipe/container-pathagreement: either assert the constant name, or pull the
--volumestring from the rendered recipe and parse it.
justcommand) that proves theround-trip:
just containers-rebuild reviewer→docker exec claude-hooks-reviewer bun /opt/claude-code/cli.js --versionmust succeed.
Docs
README.md(ordocs/runner-setup.md) section on first-timepilot: provision per-agent creds file,
docker buildx buildlocally,
just containers-rebuild reviewer, add"container": {"enabled": true}toconfig/agents.json, restart service.Out of scope
(tracked in #26).
Focus here is on fixing the plumbing so ONE agent can be piloted.
References
Dependencies
main