Skip to content

feat(skills): add SKILL_DATA_DIR per-group persistent state mount#2366

Open
yaniv-golan wants to merge 1 commit into
nanocoai:mainfrom
yaniv-golan:pr/skill-data-dir
Open

feat(skills): add SKILL_DATA_DIR per-group persistent state mount#2366
yaniv-golan wants to merge 1 commit into
nanocoai:mainfrom
yaniv-golan:pr/skill-data-dir

Conversation

@yaniv-golan
Copy link
Copy Markdown
Contributor

Summary

Add a per-group persistent skill data directory at /workspace/skill-data, set as SKILL_DATA_DIR env. 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 in container-runner.ts:buildMounts. Bypasses the operator-side mount allowlist (validateAdditionalMounts) because this is host-managed, not operator-declared.

Documentation

  • New "Persistent Skill Data" subsection in docs/agent-runner-details.md.
  • manage-mounts skill 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

  • Container builds and spawns
  • SKILL_DATA_DIR env var present in container
  • data/v2-sessions/<group-id>/skill-data/ created on first init
  • Survives container restart (file written before restart still readable after)

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant