Containers: per-agent runtime + state volumes #19
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#19
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, I want each worker (boss, dev, reviewer) to run inside its own long-lived Docker container with an empty
$HOMEand a dedicated named volume for its cache / worktrees / sessions, so that agents cannot scrape host credentials and their persistent state survives container restarts.Split out of the original containerisation story (#17).
Acceptance criteria
Runtime model
claude-hooks-boss,claude-hooks-dev,claude-hooks-reviewer$HOMEis an empty volume owned by the image's non-rootclaudeuser — no.claude.json, no.credentials.json, no.config/claude-hooksinsideFORGEJO_ACCESS_TOKENenv var at container start, read on the host from~/.config/claude-hooks/tokens/<name>and passed viadocker run -e. Token files are never bind-mounted into the container.~/.claude/.credentials.json) into$CLAUDE_CONFIG_DIR/.credentials.json. Rotating on the host propagates without container restart.docker exec(decide vs. Unix-socket bridge and document)State persistence
claude-hooks-<name>-statecache/,worktrees/,sessions.json— same layout as today, rooted in the volumeclaude-hooks integration
runAgentspawns the Claude Agent SDK viadocker exectargeting the agent's containerSecurity invariants (testable)
ls -la ~shows only image-provided filesgrep -r "<stand-in-token>" /returns nothingdocker inspectconfirms no bind-mount references the interactive user's~/.claude/or~/.config/claude-hooks/tokens/Tests
just qastill passes without the Docker daemon running (host-only unit tests)Out of scope
justrecipes, systemd, rolling updates, docs — #20References
bab386a)Dependencies
main