Container: retire vestigial session-env/ rw bind #138
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#138
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 a maintainer, I want the
session-env/rw bind removed from the container config so that per-agent bind mounts are limited to the ones that actually serve a purpose — right nowsession-env/is dead code that just pollutes the mount list and the agent-env layout on disk.Context
PR #125 landed the rw bind for
$CLAUDE_CONFIG_DIR/projects/, which is where Claude Code 2.1.x actually persists session history. The earliersession-env/bind was added in v2.1.112 back when we thought the CLI wrote session state there; empirically 2.1.114 only ever creates empty UUID sub-dirs inside it and never writes content. The bind has been a no-op since before the projects-bind fix landed.Verification today (2026-04-20): across boss/dev/reviewer/designer/design-reviewer containers, every UUID directory inside
~/.config/claude-hooks/agent-env/<agent>/session-env/is empty. The bind exists, a mkdir per-dispatch fires, nothing ever lands.Acceptance criteria
${credsDir}/session-env:${CONTAINER_CLAUDE_CONFIG_DIR}/session-env:rwmount fromsrc/container-reconcile.ts::dockerRun.--volumeline fromjustfile::containers-rebuild.mkdir -p "$dir/session-env"injustfile::agent-env-sync(keep theprojects/pre-create).mkdir(join(credsDir, "session-env"), …)indockerRun.src/container-reconcile.test.ts: drop any session-env mount entries from the "matching" dockerInspectJson fixtures — they stop being load-bearing.matchesDesiredno longer checkssession-envmount (it already doesn't, but confirm by re-reading).Cleanup on disk (out of scope, but note)
After merge +
just containers-rebuild, operators canrm -rf ~/.config/claude-hooks/agent-env/*/session-env/to reclaim the empty directory tree. Don't bundle that into the PR — ops cleanup.Tests
container-reconcile.test.tstests still pass.dockerRunno longer passessession-envtodocker runargs — search the recorded run call forsession-env, assert absent.Out of scope
session-envfor some future Claude Code version — if a new CLI release starts writing there, we add it back under a new rationale.References
src/container-reconcile.ts:178-180,justfile(two spots).Dependencies
main.