Share host cache dirs into agent container, with periodic eviction #30
Labels
No labels
agent
blocked
agent
new
agent
review
agent
working
complexity
high
complexity
low
priority
high
priority
low
priority
medium
risk
high
risk
low
risk
medium
type
bug
type
chore
type
feature
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tfks/fjx#30
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?
The fjx supervisor's dockerSpawnFn (src/supervise.ts:884) shares nothing writable with the host besides ~/.claude{,.json}, ~/.codex, and the project worktree. Every tick re-derives the Deno module cache, the trivy vuln DB (~600 MB), and any other tool caches from scratch in the container's overlay layer. This is slow (cold just validate does a lot of redundant download work) and wasteful of host Docker disk on each tick. A prior fix made /agent-home writable (images/fjx-base/Dockerfile); that unblocks ~/.cache writes but doesn't persist them.
Proposal
Bind-mount a per-project cache root from the host into /agent-home/.cache so Deno/trivy/etc. get cross-tick cache hits, and add an eviction job so it doesn't grow forever.
Mount
Per-project (not per-host) so different projects don't pollute each other, and so removing a project's repo removes its cache too. Strict-serial scheduling means no concurrent-write contention within a project.
Eviction
Acceptance criteria
Out of scope
Open questions