Skip to content

Share prime-agent's state dir with the sandbox, like pi - #84

Merged
technicalpickles merged 1 commit into
mainfrom
safe-tool-profiles
Oct 22, 2026
Merged

technicalpickles merged 1 commit into
mainfrom
safe-tool-profiles

Conversation

@technicalpickles

Copy link
Copy Markdown
Owner

Summary

  • safe prime-agent now uses the real ~/.prime/agent (sessions, settings, skills), granted in a new tools/prime-agent.sb, the same way pi shares ~/.pi. One history whether or not a run was sandboxed.
  • The daemon socket and kernel venv stay in the tool's private root. A shared socket would let an unsandboxed prime-agent attach to the sandboxed daemon, and the venv is code an unsandboxed run would import.
  • ADR 0064 gets the exception written down, with the known gaps (lease and worker files shared with an unsandboxed run, a /login credential readable in the sandbox). Dedicated caches are parked, so SAFE_XDG_ISOLATE is off for prime-agent for now.

Test plan

  • Run safe prime-agent doctor from a terminal outside Claude's sandbox. If an old daemon is running, prime-agent shutdown first, since it pins the profile it started with.
  • Not run yet: safe can't nest inside Claude's sandbox. So far I've only checked that the .sh passes shellcheck and the new grant shows up in safehouse --stdout.

🤖 Generated with Claude Code

Grant the real ~/.prime/agent in tools/prime-agent.sb instead of redirecting
it. The daemon socket and kernel venv stay in the private root so a sandboxed
run and an unsandboxed one never share a daemon or an importable venv. Record
the exception in ADR 0064.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@technicalpickles
technicalpickles merged commit db22a1f into main Oct 22, 2026
1 check passed
@technicalpickles
technicalpickles deleted the safe-tool-profiles branch October 22, 2026 16:06
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