feat(skills): add SKILL_DATA_DIR per-group persistent state mount#2366
Open
yaniv-golan wants to merge 1 commit into
Open
feat(skills): add SKILL_DATA_DIR per-group persistent state mount#2366yaniv-golan wants to merge 1 commit into
yaniv-golan wants to merge 1 commit into
Conversation
Skills that need state across container restarts (caches, OAuth tokens, small databases) now have a dedicated home: /workspace/skill-data, mounted from data/v2-sessions/<group-id>/skill-data/ (RW, per-group). The env var SKILL_DATA_DIR points at it. Survives restarts; isolated per agent group. Distinct from /workspace/agent (the agent's user-facing working dir) and /workspace (session DBs + heartbeat). Created in group-init at first spawn; mount wired in container-runner buildMounts. Bypasses the operator-side mount allowlist (validateAdditionalMounts) because this is host-managed, not operator-declared. Documentation: - docs/agent-runner-details.md: new "Persistent Skill Data" subsection - .claude/skills/manage-mounts/SKILL.md: enumerate all built-in host-managed mounts (workspace, agent, container.json, skill-data, .claude, global, /app/skills, /app/src) so an operator auditing per-group write surface sees the complete picture, not just the operator-allowlist entries. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a per-group persistent skill data directory at
/workspace/skill-data, set asSKILL_DATA_DIRenv. Skills that need state across container restarts (caches, OAuth tokens, small databases, etc.) now have a dedicated home distinct from/workspace/agent(the agent's user-facing working dir) and/workspace(session DBs + heartbeat).Mounted from
data/v2-sessions/<group-id>/skill-data/(RW, per-group). Created in group-init at first spawn; mount wired incontainer-runner.ts:buildMounts. Bypasses the operator-side mount allowlist (validateAdditionalMounts) because this is host-managed, not operator-declared.Documentation
docs/agent-runner-details.md.manage-mountsskill enumerates all built-in host-managed mounts (workspace,agent,container.json,skill-data,.claude,global,/app/skills,/app/src) so an operator auditing per-group write surface sees the complete picture, not just the operator-allowlist entries.Test plan
SKILL_DATA_DIRenv var present in containerdata/v2-sessions/<group-id>/skill-data/created on first init🤖 Generated with Claude Code