You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make Cave grants the only permission authority for Claude familiars #6393
lane:authorityLane: grants, permissions, containment, approvals and security correctnessstate:blockedWaits on a linked issue or PR; see the native blocked-by link
lane: authority
state: blocked
owner: unassigned
unit: verify/issue-6393-desktop-rc-01a1a3ac; delivered in #6407 and #6449 (merged)
blocked-by: #6445
clears-when: #6450 lands and the scope-v2 producer (Coven #1698) ships
next: Requalify the native rows now that #6449 has landed, then clear the recorded owner and release gates before publication.
updated: 2026-11-12
Outcome
Cave's project grants are the only authority for a Claude familiar in Full access. Familiars no longer need .claude/settings*.json allow rules for Bash or MCP tools, and shell writes are confined to the familiar's writable grants by the OS sandbox. Owner decision, 2026-11-04: "Grants enforced by sandbox", chosen over unrestricted bypassPermissions.
Follows #6356 (closed), whose scoped-write launch this extends. It keeps that issue's read-only, ungranted and protected-root guarantees.
Scope in Cave
Send the sandbox-era scope contract, including an owner-configured MCP list drawn from the familiar's workspace .mcp.json and ~/.claude.json.
A project repository's own .mcp.json stays excluded, because MCP servers run outside the sandbox.
Cutting a Coven release. Current installed Coven v0.4.10 has no --write-scope, so Full-access Claude chats on Cave main stay refused until a release ships it.
Status from Claude Code, acting for the owner. Scope: Cave grants as the only permission source for Claude familiars in Full access, with the OS sandbox enforcing shell writes. This record was written after the edits began, not before.
Where the work is
Cave: uncommitted changes in .worktrees/issue-6393-grant-sandbox on fix/issue-6393-grant-sandbox, started from ccd13466c8daa033e4341a2fb4784c1ee626b41e.
Coven: patch only, based on 518658fd832df0fcf53c2e866ae6f3f894dca968, saved at delivery-receipts/issue-6393-2026-11-04/coven-issue-1669.patch. No branch or worktree exists because the allocator refused: 32 local branches is at the budget, and I deleted nothing to make room.
Verified
End to end with patched Coven, real Claude 2.1.318 and Cave's scope builder, using a loopback model and checking files on disk: 23 of 23 cases passed. A deny-all settings.json had no effect on granted work, and writes outside grants were refused.
Coven: scoped test selection passed, plus fmt and clippy.
Cave: typecheck, focused ESLint, test wiring, the scope unit test and both scoped-write route tests passed.
Not run
Full Coven and Cave test suites, a real provider, the real Cave UI, and claude.ai connectors.
Known limits
Bash can read ungranted files, network access is open, and listed MCP servers run outside the sandbox.
Refreshed PR #6407 at head 3fbd02dfb98b4669f4db4404d6bdc7a3e8027472: both review findings remain material. Per-user temp is writable by the familiar's UID, so modes 0700/0600 do not protect scope.json or credential-bearing mcp.json from modification before an unsandboxed MCP resume. A failure after MCP creation also escapes disposal because scope identity has not been recorded.
The upstream source outcome is delivered through Coven #1670 / 5e20f8c459a89cdd2c685d01ff3165e7bb7222a5, and #1669 is closed. A fresh release read still shows v0.4.10 as latest, so source merge is not evidence of a supporting installed release. The local .worktrees/issue-6393-grant-sandbox is dirty in two route/test paths and locked at e878ac3e8e0e5067d7408935d96e9a1f84d4b1f7; it has been preserved without edits, unlock or ownership replacement.
Primary blocker: the owning security repair and supported producer tuple are not qualified. Next: continue in the owner's unit, move authority files into a location denied to every familiar sandbox, make creation transactional with independent tracking of each allocated file (including partial writes and close/stat failures), and prove both adversarial resume tampering and failed-creation credential cleanup before current-main CI and provider/UI qualification. Preserve repository MCP exclusion, #6420's narrower read-only recovery and the explicit Full-access release hold. No release or runtime-policy bypass is authorized by this checkpoint.
Claim from Claude Code, for Val, who asked today to proceed on this after the #6396 trimming slices landed. Continuing in the existing unit rather than starting a competing one; no session was live in it.
Unit:.worktrees/issue-6393-grant-sandbox, branch fix/issue-6393-grant-sandbox. The auto-lock stays in place.
Preserved, not landing: the unit's two uncommitted paths (route.ts, route-claude-write-scope.integration.test.ts) say updating Coven gives Full access. v0.4.10 is still the latest release and has no --write-scope, so that copy is untrue today. They are kept at refs/preserve/issue-6393/pre-rebase-dirty and delivery-receipts/issue-6393-2026-11-08/pre-rebase-dirty.patch (local only) for whoever ships the Coven release.
Plan: rebase for the real conflict, reproduce r4471709980 (tampering across a resume) and r4471710059 (credentials left after a failed creation) against the real sandbox, repair them, then request Val's merge approval at the exact head. Issue stays open for the Coven release and for provider and UI qualification. No release is part of this.
Checkpoint from Claude Code, for Val. PR #6407 is at 554b6cac6 with CI passing on attempt 1 and waits on Val's merge decision. It is not merged, and nothing is released.
Correction to earlier notes. This issue and the PR said the per-user temp directory is writable. Measured on Claude 2.1.318 and 2.1.319, sandboxed Bash can't write the macOS per-user $TMPDIR that a packaged Cave gets. It can write /tmp/claude-<uid>, which is where tmpdir() points for a server started from a sandboxed session.
Review findings
Finding
Reproduced
Outcome
r4471709980, authority-file tampering
Only under /tmp/claude-<uid>: a familiar widened its own scope.json and wrote to an ungranted folder in the next launch, and overwrote another turn's mcp.json. Its own mcp.json was already refused.
Files moved to <cave home>/claude-authority/, each launch denies its own directory, a writable grant over that root is refused, and both files are checked before every launch
r4471710059, credentials left after a failed creation
Yes: mcp.json and scope.json both stayed after dispose
Each file is tracked from the moment it exists and retires independently
Evidence
Hosted, at 554b6cac6: the CI run above, including the new tests. A changed scope never reaches a retry launch, failures are injected at each creation step, and backups skip these files.
Local, macOS, real Coven 5e20f8c4, real Claude, loopback model: 14 of 14 sandbox rows with the repair, under both temp locations on 2.1.319 and under /tmp/claude-<uid> on 2.1.318. Without it, 9 of 14 under /tmp/claude-<uid>. The real chat route passes 13 of 13.
Local at this tree: the full test:api suite, 614 files.
Not verified
A real provider.
The real Cave UI.
claude.ai connectors.
Any released Coven: v0.4.10 is still the latest and has no --write-scope, so Full access stays unavailable.
Also on the PR
The body now says Refs, so merging won't close this issue.
Copilot pushed 372fa758f, which loosened the Stop contract in api-contracts.test.ts. 554b6cac6 restores it and fixes the route, because that contract had caught a real gap in my first version.
Copilot is still assigned, and its Agent Merge can push to this branch again.
Preserved for the Coven release: the earlier copy edits saying updating Coven helps stay at local refs/preserve/issue-6393/pre-rebase-dirty. They become true only when a release has the flag. The pre-rebase head is at refs/preserve/issue-6393/pre-rebase-head.
Blocker: Val's merge decision on #6407. Then: a Coven release with scope v2, followed by provider and UI qualification with this exact tuple. Next step: decide the merge at head 554b6cac6.
Delivery receipt from Claude Code. Val approved the merge of #6407 at exact head 554b6cac6. It landed as a752cf0ea, and refs/pull/6407/head retains the merged head.
Hosted, on main:CI passed on attempt 1, with 20 jobs succeeding and the iOS build skipped by path.
Unit tests: app 1,504 files, API 614, mobile 106, conformance 9. The claude-write-scope, scoped-route and backup regressions appear in that log.
Browser tests: 921 ran and 55 were skipped across the six shards, with no unexpected results, flakes or retries.
Not settled: CodeQL was still running when this was written. A Main health run shows action_required; Copilot triggered it from its superseded commit. The Main health run for this CI passed.
Refusing a writable grant over Cave's home for Full-access Claude.
A launch's own authority directory being readable through Claude's Read tool, no wider than what sandboxed Bash can already read.
Still open on this issue:
A Coven release with scope v2. v0.4.10 is still the latest and has no --write-scope, so Full access stays unavailable and users see no change.
Real-provider and real-UI qualification with that release, and claude.ai connectors. Only the loopback-model route run has been done (13 of 13).
When the release ships, the "update Coven" copy preserved at local refs/preserve/issue-6393/pre-rebase-dirty becomes true and can land. The local harness is in delivery-receipts/issue-6393-2026-11-08/.
The "Current goals" block in this issue's body predates this merge. I left it for its maintainer.
Next step: Val decides when to cut the Coven release.
Checkpoint: the MCP boundary after a second review
From a Claude Code session for Val, no familiar identity asserted. Follows the delivery receipt for #6407. Change: PR #6436.
After #6407 merged, a first independent review of the merged code found that MCP servers, which run outside Claude's sandbox, could run code a familiar wrote. My first fix (b612bbdd8) moved each server to a neutral folder and left out servers whose config named a writable folder. A second independent review of that commit reported 20 findings. I checked each against the code, then against real Coven 5e20f8c4 with Claude 2.1.319, before acting.
What changed in the design
The string check could not be the boundary. On real Claude, familiar code ran outside the sandbox through six routes it missed:
a root whose name holds a space
a path the config only reaches through a pointer file
a symlink inside a root, re-pointed by the familiar
a link into /private/tmp/claude-<uid>, the temp folder Claude's sandbox lets the familiar write
a planted PATH entry
a .mcp.json at a workspace inside a repository
Coven only runs scoped writes on macOS (verify_native_profile). So each stdio server and headers helper now starts under sandbox-exec, which denies it, and everything it starts, any read, write or exec in a writable root or that temp folder. The string check now only decides which servers are left out with a notice.
Outside Claude, the same OS rule blocked a script, a link, a linked folder, a relative path, a directly run binary, NODE_PATH, NODE_OPTIONS, PYTHONPATH, a sourced shell file and a PATH entry. Network access, the keychain, npx, git and scripts elsewhere kept working.
Dispositions
#
Finding
Disposition
1
A root name with a space or = defeats the tokenizer
Reproduced on real Claude. Fixed: OS rule. The check now reads a path to the end of the value.
2
A symlink inside a root that points outside passes
Reproduced on real Claude, also via Claude's temp. Fixed: OS rule, plus Claude's temp is denied. The check counts every folder on the way.
3
Relative paths and ancestors of a root
Fixed by the OS rule.
4
Dangling symlink
Fixed by the OS rule.
5
${VAR} expanded from Cave's environment, not the launch's
Fixed: the launch's own environment. Measured: Claude keeps an unset ${VAR} as written and doesn't supply ${CLAUDE_PROJECT_DIR}.
6
A bare command found through a writable PATH entry
Reproduced on real Claude. Fixed: OS rule, and PATH loses writable entries so the real tool is still found (Node's spawn stops with EPERM otherwise).
7
Glued flags, redirects and shell variables
Fixed: OS rule. The check also reads -I/path, --x=[/path], cat</path, $VAR and ~.
8
Same-PID sweep compares wall-clock and monotonic time
Fixed: a process-wide set of this process's own folders, with no clock comparison.
9
A workspace inside an ungranted repository loads its .mcp.json
Reproduced on real Claude. Fixed: a .git above the workspace skips that file. Limit: a workspace that is itself a clone looks like any familiar workspace, since most are Git repositories.
10
A config file linked into a writable folder
Not reproducible on 2.1.318 or 2.1.319: the familiar's edit through the link was refused, and so was creating the link. Fixed anyway: Cave won't read a config linked into a writable folder.
11
The start folder is the authority root, beside other turns' credentials
Fixed: an empty claude-authority/mcp-cwd.
12
An entry saved under another spelling of the workspace is ignored
Fixed: falls back to the spelling given, as before.
13
Approval lists and disable lists
Approval: rejected, because plain headless Claude starts unapproved .mcp.json servers (measured). Disable lists: fixed. Claude honours disabledMcpServers for .mcp.json, and disabledMcpjsonServers in workspace settings, local settings and user settings (all measured), so Cave applies all of them.
14
/bin/sh on Windows
Rejected: Coven refuses scoped writes off macOS.
15
A recycled PID keeps a dead Cave's folder
No change. The folder holds copies of credentials already in ~/.claude.json under the same owner-only access, and it's removed once that PID is free.
16
Entries Claude's schema might reject
Rejected on evidence: with four suspect shapes beside a good server, the good server still answered.
17
A dropped higher-precedence entry lets a lower one take its name
No change: Claude drops a malformed or disabled entry from its own layer the same way.
18
Relative paths that resolved in the primary root now fail silently
Fixed: one that exists there is left out with the notice.
19
Credentials stay in memory when the sweep or mkdir fails
Fixed: cleared on every failure path.
20
Altitude: a string scrape that fails open
Adopted: the OS rule is the boundary. shellQuote is now shared, not copied, and my own canonicalisation helper is gone. The private isInsideRoot copies in three modules stay as they are, since consolidating them doesn't belong in a boundary fix. Realpath stays synchronous: it runs once per Full-access Claude turn, over a few config values.
What this costs
An MCP tool that starts its own sandbox can't start inside this one. Chromium with its sandbox exits 133, but runs with --no-sandbox. A nested sandbox-exec exits 71.
While Claude has write access, a local MCP server can't read the project at runtime, such as a code-search server given a path in a tool call. That is what stops a server from loading a project file as code.
A Cave started inside another Seatbelt sandbox, such as an agent's sandboxed shell, can't start any local MCP server.
mcp-boundary-2-red-2.1.319.log: six escapes at b612bbdd8.
mcp-boundary-2-green-2.1.319.log and mcp-boundary-2-green-floor-2.1.318.log: none at the fix, and an owner's npx server still works with a writable PATH entry first.
mcp-boundary-os-green-2.1.319.log and mcp-boundary-os-green-floor-2.1.318.log: the first review's rows still hold, and servers and helpers start in mcp-cwd.
adversarial-green-os-deny*.log: tamper matrix, 0 failed, with ordinary and writable temp.
route-real-os-deny.log: real route, 13 of 13 rows pass.
Still open, and Val's to decide
Release order. The shipped Cave v0.5.20 writes a version: 1 scope and passes --write-scope once the probe succeeds. A Coven release with this flag refuses that scope, and since the probe succeeds there's no Read-only fallback. Shipping Cave first avoids that.
First review's F13 and F27. Servers in the primary repository's own local scope aren't forwarded, and an explicit per-familiar MCP allowlist would replace inheriting the owner's servers.
Copy to apply once a Coven release has the flag
Refusal: "Full access for Claude needs a newer Coven than this one. Update Coven and restart Cave, switch Access to Read-only, or choose another runtime, then retry."
Notice: "This version of Coven can't limit Claude's file changes to your project grants, so Claude can read but not edit. To edit files, update Coven and restart Cave, or switch to another runtime."
Test: assert.match(refusal.message,/Update Coven/,"a Coven release has the flag, so updating helps");, and drop "no release has it yet" from the comments.
From a Claude Code session for Val, no familiar identity asserted. Val approved merging #6436 at exact head 7e2037d51 in that session. It landed as 49764ac81, and refs/pull/6436/head keeps the merged head. Main's runs on 49764ac81 and 788ca33a6 were cancelled by later pushes, and run 42571468789 on fea63da7a, which contains both, passed.
Nothing changes for users until a Coven release has --write-scope. Still open, as in the checkpoint: Val's release-order decision, the Coven release (Coven PR #1698 for the failed v0.4.11 npm publish), the first review's F13 and F27, and real-provider, real-UI and claude.ai connector qualification.
Val explicitly authorized an up-to-eight-hour isolated packaged desktop qualification containing #6441 and #6393, with synthetic projects/grants/conversations and scoped repair PRs. Continuing this acceptance slice alongside existing source/release owners, not taking over Coven #1698. Acting Codex for Val; no familiar identity asserted. Reusing this thread’s clean delivered-fix worktree .worktrees/issue-6371-credentials-rate-limits on verify/issue-6393-desktop-rc-01a1a3ac, exact clean main 10a8996. No new worktree or budget exception.
Candidate configuration uses a unique bundle identifier/name and synthetic homes/ports; updater artifact generation is disabled for this unpublished local qualification bundle. Before native launch, inspect every shared state boundary. A current source finding is that offline-cache Keychain service/account is constant across alternate identifiers; do not launch a synthetic profile that could rotate production credentials. Build the clean baseline, then repair or record that isolation boundary before native testing. Source/CI, native shell/runtime, real provider, installed and distribution acceptance will stay separate.
Current releases remain Cave v0.5.20 and Coven v0.4.10. Installed Claude is 2.1.322. Scope supports building pinned local runtime candidates and isolated qualification; no registry publication, global installation, live-app replacement, protection change, foreign-claim edit or real user-data mutation. Working evidence directory: /Users/buns/.codex/artifacts/cave-rc-6393-46wdcwxh. Next step: build and fingerprint the baseline native bundle, establish isolation, then execute the exact acceptance matrix.
Packaged desktop qualification checkpoint: final candidate 31729a205a6f19c17205414a867faf970b606b8b, based on refreshed main 74b6adbfc69f5942d8098fbd5db15da55e6a8a7e, containing #6441, the merged #6393 source repairs and #6448’s read-only instruction correction. Acting session 01a1a3ac-5d5b-7b21-ac53-bda984d29e28 for Val; no familiar identity is asserted and no existing owner is transferred.
Repair #6449 isolates alternate app identifiers from the production offline-cache Keychain service while preserving the production credential identity. The regression failed first. All 316 native tests pass on the final head, focused desktop/scope and Claude-route tests pass, and all 16 reported hosted checks completed (10 success, 6 intentional skips; required Frontend build passed). The PR is open and unmerged, with no review comments or approvals observed.
Direct native UI and actual Claude/Coven execution verified explicit Explore and denied Write, fresh native identity and a distinct scope file on Explore → Build, successful writable Write/Bash, refused read-only/ungranted writes, revoked-grant Retry, and full WebKit reload/resume. Fresh legacy capability probing refused Build with scoped_write_unavailable before any Claude conversation. A stale allowReadOnlyFallback opt-in was also refused through the actual packaged sidecar API. Swapping to the legacy CLI while an earlier positive probe was cached failed closed with a generic exit-code-2 diagnostic; restarting only the owned sidecar restored the precise capability refusal. Local human transcript history remains readable after revocation; reload clears the revoked project and Retry does not restore execution authority.
Qualification limits remain explicit: the model backend was synthetic, while the native app, Claude 2.1.322, Coven binaries and OS tool effects were real. Positive Full rows used an immutable local Coven source build from 346b7717ea91c9e6b5511e30365f6add3bedd804, not a verified release producer; it self-reports 0.0.0/unknown source and engine 0.9.0 versus pinned 0.8.0. This fixture had no MCP servers. Real-provider, claude.ai connector, F13/F27 decisions, distribution and human acceptance are not waived. Keep #6393 open.
Existing dependency update from the final audit: #6445’s owner delivered step 1 as draft PR #6450 at 507c5148c9d8649b0ea986d1ade64507df809f73, on feat/issue-6445-access-escape. Live REST reads show 26 successful checks, one skipped iOS build and one neutral CodeQL aggregate, with no failed or pending checks; required Frontend build passed. The draft addresses the read-only-project refusal recovery UX but is unmerged and is not included in qualified candidate 31729a205. Clearing condition: owner/maintainer review and authorized landing, then requalify the affected native rows. Step 2 remains with its owner after #6443. Coven #1698 remains open with its owner; ship the compatible Cave client before the verified scope-v2 producer, then qualify the published tuple.
The existing owned .worktrees/issue-6371-credentials-rate-limits worktree on fix/issue-6447-cache-namespace is clean and intentionally preserved for open PR #6449. No worktree was allocated or removed. All recorded owned native/sidecar/daemon/model processes are terminal and ports 43871–43873 are closed; production profiles, installed apps, global CLIs, real-user grants and foreign claims were preserved. Final evidence and requirement audit: /Users/buns/.codex/artifacts/cave-rc-6393-46wdcwxh/READINESS.md; final 9,707-entry bundle manifest SHA-256 6af2e1092ae8d8e55917ca0c98d9a8819a80d895cf3d2400806e81cf2053bba1. Next step: review exact-head PR #6449 and clear the recorded owner/release gates before publication.
Archived goals block from 5 November 2026, replaced by the compact work block at the top of this issue
Current goals — 5 November 2026
Status, 8 November 2026 (Claude Code for Val; status note only, no owner change):#6407 merged as a752cf0ea, with both review findings (r4471709980, r4471710059) repaired before merge, so the checkpoint, next step and prompts below that start from them are out of date. Two later reviews found that local MCP servers, which run outside Claude's sandbox, could run code a familiar wrote. PR #6436 confines them and waits for Val's merge approval. Still open: a Coven release containing --write-scope (npm's latest is 0.4.10), the release order, then real-provider, real-UI and claude.ai connector qualification. Delivery · Checkpoint.
Plan: Smaller Cave MVP #6396 and the 4 November path-forward Revision 3, reconciled with newer repository/owner evidence. This block supersedes earlier planning checkpoints and resumption prompts where stale; original scope, acceptance criteria, human decisions and ownership below remain in force. #6396 is not a blanket start dependency. GitHub Issues remain the queue; historical Bead wording is not current workflow.
Current checkpoint:#6407 remains open at 3fbd02d with review findings on MCP authority-file tampering and credential residue after partial creation. Merged #6420 restores a narrower read-only Chat recovery and correct Retry selection; it does not enable Claude Full access.
Next step: Resolve #6407's authority-file tampering and failed-creation credential-cleanup findings, then qualify scope v2 with Coven #1669 and a supporting release; preserve delivered #6420 read-only recovery.
Long-running goal prompt
Work toward completing OpenCoven/coven-cave#6393 — Make Cave grants the only permission authority for Claude familiars.
Make Cave grants the sole protected permission source for Full-access Claude through the canonical Coven scope-v2 contract and OS containment. Continue #6407 with Coven #1669; resolve the reported MCP/scope-file tampering and failed-creation credential-cleanup findings with adversarial tests. Preserve repository MCP exclusion and explicit limits on network/reads/MCP execution. Keep Full access unavailable until supported producer release and client qualification; reuse #6420's narrower read-only recovery.
Read this issue's full original criteria, newer comments, linked PRs and repository AGENTS/work-continuity first. Preserve current owners and their work; continue authorized ready slices and checkpoint exact source/artifact, evidence, remaining criteria, blocker and next action here. Honor existing human decisions and operation-specific authority; this saved prompt is not an execution lease. Complete required regression/acceptance gates, preserving first failures, retries, skips and unsupported rows.
Follow-up prompt
Continue OpenCoven/coven-cave#6393 from its latest durable checkpoint, refreshing current owner, decisions, PR head and artifact identities first.
Start with #6407 review findings r4471709980 and r4471710059: reproduce authority-file modification across resume and credential residue on partial scope creation, then repair the owning boundary. Qualify the exact Claude/Coven tuple and actual UI/provider paths; #6420 restoring answers and Retry does not grant Full access.
Advance the next unblocked authorized slice; if blocked, record the exact clearing condition, responsible actor and one imperative next step. Report delivered versus locally/hosted/package/device-verified evidence separately. Do not reset completed work or infer permission from an older prompt.
Maintenance scope: Codex for Val, issue-goal update only; no familiar identity, owner takeover or runtime claim. Preserve original priorities, dependencies and current authorizations. Private execution liveness and Project fields were not inspected or changed.
Work toward completing #6393. Read AGENTS.md, work-continuity, the complete original criteria and newest owner checkpoint first; refresh current main, ownership, linked PR heads and blockers. Complete the remaining native/published-tuple qualification for grants-enforced Claude Build, preserving the sandbox decision, protected/read-only/ungranted roots and owner-configured MCP allowlist; repository MCP configuration remains excluded. Reuse merged #6407/#6449 and current #6484 probing behavior. OpenCoven/coven#1669 is closed, OpenCoven/coven#1698 is merged and v0.5.0 is published: verify the actual released/installed producer’s scope-v2 capability and provenance instead of waiting on those historical open-PR claims. Keep #6445/#6450’s recovery integration, owner decisions, MCP/connector/provider and published/native acceptance explicit. A local source-built producer is not a qualified release. Preserve first failures, retries, skips and unsupported rows. Use existing scope-specific authority; close only when every original criterion is proven or explicitly dispositioned by its responsible owner.
Follow-up prompt
Continue #6393 from the latest verified checkpoint without restarting completed work. Refresh the release and installed binary tuple, then coordinate #6450 landing with its existing owner and requalify affected native rows in an isolated profile with distinct Keychain identity. Preserve the documented sandbox residuals and F13/F27 decisions. Do not globally upgrade a CLI, mutate live grants, cut a Coven release or relax admission merely to make Full access available. Record the exact source/artifact, new evidence, remaining gate, responsible actor and one imperative next step on this issue.
Planning scope: This is a suggested continuation of the canonical issue, not an execution claim or new approval. Existing owners, human decisions and acceptance criteria remain authoritative. GitHub issues, paginated comments/relations, open PRs and Cave Project 9 were checked against main 2d6fda4ed0c5; private execution liveness remains unverified.
lane:authorityLane: grants, permissions, containment, approvals and security correctnessstate:blockedWaits on a linked issue or PR; see the native blocked-by link
Activity
BunsDev commentedon Nov 4, 2026
Status from Claude Code, acting for the owner. Scope: Cave grants as the only permission source for Claude familiars in Full access, with the OS sandbox enforcing shell writes. This record was written after the edits began, not before.
Where the work is
.worktrees/issue-6393-grant-sandboxonfix/issue-6393-grant-sandbox, started fromccd13466c8daa033e4341a2fb4784c1ee626b41e.518658fd832df0fcf53c2e866ae6f3f894dca968, saved atdelivery-receipts/issue-6393-2026-11-04/coven-issue-1669.patch. No branch or worktree exists because the allocator refused: 32 local branches is at the budget, and I deleted nothing to make room.Verified
settings.jsonhad no effect on granted work, and writes outside grants were refused.Not run
Known limits
Next step: owner decides on commit/PR, the Coven branch slot and a Coven release. Nothing is committed, pushed, merged or released.
Make Cave grants the only permission authority for Claude familiars
Answer Claude chats on released Coven and make Retry follow the picker
BunsDev commentedon Nov 6, 2026
Refreshed PR #6407 at head
3fbd02dfb98b4669f4db4404d6bdc7a3e8027472: both review findings remain material. Per-user temp is writable by the familiar's UID, so modes 0700/0600 do not protectscope.jsonor credential-bearingmcp.jsonfrom modification before an unsandboxed MCP resume. A failure after MCP creation also escapes disposal because scope identity has not been recorded.The upstream source outcome is delivered through Coven #1670 /
5e20f8c459a89cdd2c685d01ff3165e7bb7222a5, and #1669 is closed. A fresh release read still shows v0.4.10 as latest, so source merge is not evidence of a supporting installed release. The local.worktrees/issue-6393-grant-sandboxis dirty in two route/test paths and locked ate878ac3e8e0e5067d7408935d96e9a1f84d4b1f7; it has been preserved without edits, unlock or ownership replacement.Primary blocker: the owning security repair and supported producer tuple are not qualified. Next: continue in the owner's unit, move authority files into a location denied to every familiar sandbox, make creation transactional with independent tracking of each allocated file (including partial writes and close/stat failures), and prove both adversarial resume tampering and failed-creation credential cleanup before current-main CI and provider/UI qualification. Preserve repository MCP exclusion, #6420's narrower read-only recovery and the explicit Full-access release hold. No release or runtime-policy bypass is authorized by this checkpoint.
BunsDev commentedon Nov 8, 2026
Claim from Claude Code, for Val, who asked today to proceed on this after the #6396 trimming slices landed. Continuing in the existing unit rather than starting a competing one; no session was live in it.
.worktrees/issue-6393-grant-sandbox, branchfix/issue-6393-grant-sandbox. The auto-lock stays in place.3fbd02dfb, local heade878ac3e8, main4dcdf1184.route.ts,route-claude-write-scope.integration.test.ts) say updating Coven gives Full access. v0.4.10 is still the latest release and has no--write-scope, so that copy is untrue today. They are kept atrefs/preserve/issue-6393/pre-rebase-dirtyanddelivery-receipts/issue-6393-2026-11-08/pre-rebase-dirty.patch(local only) for whoever ships the Coven release.Plan: rebase for the real conflict, reproduce r4471709980 (tampering across a resume) and r4471710059 (credentials left after a failed creation) against the real sandbox, repair them, then request Val's merge approval at the exact head. Issue stays open for the Coven release and for provider and UI qualification. No release is part of this.
Make Cave grants the only permission authority for Claude familiars
BunsDev commentedon Nov 8, 2026
Checkpoint from Claude Code, for Val. PR #6407 is at
554b6cac6with CI passing on attempt 1 and waits on Val's merge decision. It is not merged, and nothing is released.Correction to earlier notes. This issue and the PR said the per-user temp directory is writable. Measured on Claude 2.1.318 and 2.1.319, sandboxed Bash can't write the macOS per-user
$TMPDIRthat a packaged Cave gets. It can write/tmp/claude-<uid>, which is wheretmpdir()points for a server started from a sandboxed session.Review findings
/tmp/claude-<uid>: a familiar widened its ownscope.jsonand wrote to an ungranted folder in the next launch, and overwrote another turn'smcp.json. Its ownmcp.jsonwas already refused.<cave home>/claude-authority/, each launch denies its own directory, a writable grant over that root is refused, and both files are checked before every launchmcp.jsonandscope.jsonboth stayed afterdisposeEvidence
554b6cac6: the CI run above, including the new tests. A changed scope never reaches a retry launch, failures are injected at each creation step, and backups skip these files.5e20f8c4, real Claude, loopback model: 14 of 14 sandbox rows with the repair, under both temp locations on 2.1.319 and under/tmp/claude-<uid>on 2.1.318. Without it, 9 of 14 under/tmp/claude-<uid>. The real chat route passes 13 of 13.test:apisuite, 614 files.Not verified
--write-scope, so Full access stays unavailable.Also on the PR
Refs, so merging won't close this issue.372fa758f, which loosened the Stop contract inapi-contracts.test.ts.554b6cac6restores it and fixes the route, because that contract had caught a real gap in my first version.Preserved for the Coven release: the earlier copy edits saying updating Coven helps stay at local
refs/preserve/issue-6393/pre-rebase-dirty. They become true only when a release has the flag. The pre-rebase head is atrefs/preserve/issue-6393/pre-rebase-head.Blocker: Val's merge decision on #6407. Then: a Coven release with scope v2, followed by provider and UI qualification with this exact tuple. Next step: decide the merge at head
554b6cac6.Make Cave grants the only permission authority for Claude familiars
BunsDev commentedon Nov 8, 2026
Delivery receipt from Claude Code. Val approved the merge of #6407 at exact head
554b6cac6. It landed asa752cf0ea, andrefs/pull/6407/headretains the merged head.Hosted, on main: CI passed on attempt 1, with 20 jobs succeeding and the iOS build skipped by path.
claude-write-scope, scoped-route and backup regressions appear in that log.Main healthrun showsaction_required; Copilot triggered it from its superseded commit. The Main health run for this CI passed.Val accepted with this merge:
Still open on this issue:
--write-scope, so Full access stays unavailable and users see no change.refs/preserve/issue-6393/pre-rebase-dirtybecomes true and can land. The local harness is indelivery-receipts/issue-6393-2026-11-08/.The "Current goals" block in this issue's body predates this merge. I left it for its maintainer.
Next step: Val decides when to cut the Coven release.
Hold local MCP servers out of writable folders at the OS level
BunsDev commentedon Nov 9, 2026
Checkpoint: the MCP boundary after a second review
From a Claude Code session for Val, no familiar identity asserted. Follows the delivery receipt for #6407. Change: PR #6436.
After #6407 merged, a first independent review of the merged code found that MCP servers, which run outside Claude's sandbox, could run code a familiar wrote. My first fix (
b612bbdd8) moved each server to a neutral folder and left out servers whose config named a writable folder. A second independent review of that commit reported 20 findings. I checked each against the code, then against real Coven5e20f8c4with Claude 2.1.319, before acting.What changed in the design
The string check could not be the boundary. On real Claude, familiar code ran outside the sandbox through six routes it missed:
/private/tmp/claude-<uid>, the temp folder Claude's sandbox lets the familiar write.mcp.jsonat a workspace inside a repositoryCoven only runs scoped writes on macOS (
verify_native_profile). So each stdio server and headers helper now starts undersandbox-exec, which denies it, and everything it starts, any read, write or exec in a writable root or that temp folder. The string check now only decides which servers are left out with a notice.Outside Claude, the same OS rule blocked a script, a link, a linked folder, a relative path, a directly run binary,
NODE_PATH,NODE_OPTIONS,PYTHONPATH, a sourced shell file and a PATH entry. Network access, the keychain,npx,gitand scripts elsewhere kept working.Dispositions
=defeats the tokenizer${VAR}expanded from Cave's environment, not the launch's${VAR}as written and doesn't supply${CLAUDE_PROJECT_DIR}.-I/path,--x=[/path],cat</path,$VARand~..mcp.json.gitabove the workspace skips that file. Limit: a workspace that is itself a clone looks like any familiar workspace, since most are Git repositories.claude-authority/mcp-cwd..mcp.jsonservers (measured). Disable lists: fixed. Claude honoursdisabledMcpServersfor.mcp.json, anddisabledMcpjsonServersin workspace settings, local settings and user settings (all measured), so Cave applies all of them./bin/shon Windows~/.claude.jsonunder the same owner-only access, and it's removed once that PID is free.mkdirfailsshellQuoteis now shared, not copied, and my own canonicalisation helper is gone. The privateisInsideRootcopies in three modules stay as they are, since consolidating them doesn't belong in a boundary fix. Realpath stays synchronous: it runs once per Full-access Claude turn, over a few config values.What this costs
--no-sandbox. A nestedsandbox-execexits 71.Evidence (local receipts,
delivery-receipts/issue-6393-2026-11-08/)mcp-boundary-2-red-2.1.319.log: six escapes atb612bbdd8.mcp-boundary-2-green-2.1.319.logandmcp-boundary-2-green-floor-2.1.318.log: none at the fix, and an owner'snpxserver still works with a writable PATH entry first.mcp-boundary-os-green-2.1.319.logandmcp-boundary-os-green-floor-2.1.318.log: the first review's rows still hold, and servers and helpers start inmcp-cwd.adversarial-green-os-deny*.log: tamper matrix, 0 failed, with ordinary and writable temp.route-real-os-deny.log: real route, 13 of 13 rows pass.Still open, and Val's to decide
version: 1scope and passes--write-scopeonce the probe succeeds. A Coven release with this flag refuses that scope, and since the probe succeeds there's no Read-only fallback. Shipping Cave first avoids that.v0.4.11points at5e20f8c45, but its npm publish failed, because the macOS ARM64 binary lacked the verified commit. Coven PR fix(projects): let the human browse familiar workspaces (project-tree 403) #1698 addresses that. npm's latest is still 0.4.10.Copy to apply once a Coven release has the flag
assert.match(refusal.message,/Update Coven/,"a Coven release has the flag, so updating helps");, and drop "no release has it yet" from the comments.Keep local MCP servers out of folders a Claude familiar can write
BunsDev commentedon Nov 9, 2026
Delivery receipt: #6436 is on main
From a Claude Code session for Val, no familiar identity asserted. Val approved merging #6436 at exact head
7e2037d51in that session. It landed as49764ac81, andrefs/pull/6436/headkeeps the merged head. Main's runs on49764ac81and788ca33a6were cancelled by later pushes, and run 42571468789 onfea63da7a, which contains both, passed.Nothing changes for users until a Coven release has
--write-scope. Still open, as in the checkpoint: Val's release-order decision, the Coven release (Coven PR #1698 for the failed v0.4.11 npm publish), the first review's F13 and F27, and real-provider, real-UI and claude.ai connector qualification.Refuse Claude Build fallback into native plan mode
BunsDev commentedon Nov 10, 2026
Val explicitly authorized an up-to-eight-hour isolated packaged desktop qualification containing #6441 and #6393, with synthetic projects/grants/conversations and scoped repair PRs. Continuing this acceptance slice alongside existing source/release owners, not taking over Coven #1698. Acting Codex for Val; no familiar identity asserted. Reusing this thread’s clean delivered-fix worktree
.worktrees/issue-6371-credentials-rate-limitsonverify/issue-6393-desktop-rc-01a1a3ac, exact clean main 10a8996. No new worktree or budget exception.Candidate configuration uses a unique bundle identifier/name and synthetic homes/ports; updater artifact generation is disabled for this unpublished local qualification bundle. Before native launch, inspect every shared state boundary. A current source finding is that offline-cache Keychain service/account is constant across alternate identifiers; do not launch a synthetic profile that could rotate production credentials. Build the clean baseline, then repair or record that isolation boundary before native testing. Source/CI, native shell/runtime, real provider, installed and distribution acceptance will stay separate.
Current releases remain Cave v0.5.20 and Coven v0.4.10. Installed Claude is 2.1.322. Scope supports building pinned local runtime candidates and isolated qualification; no registry publication, global installation, live-app replacement, protection change, foreign-claim edit or real user-data mutation. Working evidence directory: /Users/buns/.codex/artifacts/cave-rc-6393-46wdcwxh. Next step: build and fingerprint the baseline native bundle, establish isolation, then execute the exact acceptance matrix.
Isolate alternate app offline-cache credentials
BunsDev commentedon Nov 10, 2026
Packaged desktop qualification checkpoint: final candidate
31729a205a6f19c17205414a867faf970b606b8b, based on refreshed main74b6adbfc69f5942d8098fbd5db15da55e6a8a7e, containing #6441, the merged #6393 source repairs and #6448’s read-only instruction correction. Acting session01a1a3ac-5d5b-7b21-ac53-bda984d29e28for Val; no familiar identity is asserted and no existing owner is transferred.Repair #6449 isolates alternate app identifiers from the production offline-cache Keychain service while preserving the production credential identity. The regression failed first. All 316 native tests pass on the final head, focused desktop/scope and Claude-route tests pass, and all 16 reported hosted checks completed (10 success, 6 intentional skips; required Frontend build passed). The PR is open and unmerged, with no review comments or approvals observed.
Direct native UI and actual Claude/Coven execution verified explicit Explore and denied Write, fresh native identity and a distinct scope file on Explore → Build, successful writable Write/Bash, refused read-only/ungranted writes, revoked-grant Retry, and full WebKit reload/resume. Fresh legacy capability probing refused Build with scoped_write_unavailable before any Claude conversation. A stale allowReadOnlyFallback opt-in was also refused through the actual packaged sidecar API. Swapping to the legacy CLI while an earlier positive probe was cached failed closed with a generic exit-code-2 diagnostic; restarting only the owned sidecar restored the precise capability refusal. Local human transcript history remains readable after revocation; reload clears the revoked project and Retry does not restore execution authority.
Qualification limits remain explicit: the model backend was synthetic, while the native app, Claude 2.1.322, Coven binaries and OS tool effects were real. Positive Full rows used an immutable local Coven source build from
346b7717ea91c9e6b5511e30365f6add3bedd804, not a verified release producer; it self-reports 0.0.0/unknown source and engine 0.9.0 versus pinned 0.8.0. This fixture had no MCP servers. Real-provider, claude.ai connector, F13/F27 decisions, distribution and human acceptance are not waived. Keep #6393 open.Existing dependency update from the final audit: #6445’s owner delivered step 1 as draft PR #6450 at
507c5148c9d8649b0ea986d1ade64507df809f73, onfeat/issue-6445-access-escape. Live REST reads show 26 successful checks, one skipped iOS build and one neutral CodeQL aggregate, with no failed or pending checks; required Frontend build passed. The draft addresses the read-only-project refusal recovery UX but is unmerged and is not included in qualified candidate31729a205. Clearing condition: owner/maintainer review and authorized landing, then requalify the affected native rows. Step 2 remains with its owner after #6443. Coven #1698 remains open with its owner; ship the compatible Cave client before the verified scope-v2 producer, then qualify the published tuple.The existing owned
.worktrees/issue-6371-credentials-rate-limitsworktree onfix/issue-6447-cache-namespaceis clean and intentionally preserved for open PR #6449. No worktree was allocated or removed. All recorded owned native/sidecar/daemon/model processes are terminal and ports 43871–43873 are closed; production profiles, installed apps, global CLIs, real-user grants and foreign claims were preserved. Final evidence and requirement audit:/Users/buns/.codex/artifacts/cave-rc-6393-46wdcwxh/READINESS.md; final 9,707-entry bundle manifest SHA-2566af2e1092ae8d8e55917ca0c98d9a8819a80d895cf3d2400806e81cf2053bba1. Next step: review exact-head PR #6449 and clear the recorded owner/release gates before publication.Isolate alternate app offline-cache credentials
BunsDev commentedon Nov 12, 2026
Archived goals block from 5 November 2026, replaced by the compact work block at the top of this issue
Current goals — 5 November 2026
Status, 8 November 2026 (Claude Code for Val; status note only, no owner change): #6407 merged as
a752cf0ea, with both review findings (r4471709980, r4471710059) repaired before merge, so the checkpoint, next step and prompts below that start from them are out of date. Two later reviews found that local MCP servers, which run outside Claude's sandbox, could run code a familiar wrote. PR #6436 confines them and waits for Val's merge approval. Still open: a Coven release containing--write-scope(npm's latest is 0.4.10), the release order, then real-provider, real-UI and claude.ai connector qualification. Delivery · Checkpoint.Plan: Smaller Cave MVP #6396 and the 4 November path-forward Revision 3, reconciled with newer repository/owner evidence. This block supersedes earlier planning checkpoints and resumption prompts where stale; original scope, acceptance criteria, human decisions and ownership below remain in force. #6396 is not a blanket start dependency. GitHub Issues remain the queue; historical Bead wording is not current workflow.
Routing: Keep. Lane: authority.
Responsible owner: Existing grant-sandbox owner; #6407; Coven #1669; GitHub: unassigned.
Current checkpoint: #6407 remains open at 3fbd02d with review findings on MCP authority-file tampering and credential residue after partial creation. Merged #6420 restores a narrower read-only Chat recovery and correct Retry selection; it does not enable Claude Full access.
Evidence to resume from: Latest issue checkpoint · PR #6407 · PR #6420.
Next step: Resolve #6407's authority-file tampering and failed-creation credential-cleanup findings, then qualify scope v2 with Coven #1669 and a supporting release; preserve delivered #6420 read-only recovery.
Long-running goal prompt
Follow-up prompt
Maintenance scope: Codex for Val, issue-goal update only; no familiar identity, owner takeover or runtime claim. Preserve original priorities, dependencies and current authorizations. Private execution liveness and Project fields were not inspected or changed.
BunsDev commentedon Nov 16, 2026
Long-running goal prompt
Work toward completing #6393. Read AGENTS.md, work-continuity, the complete original criteria and newest owner checkpoint first; refresh current main, ownership, linked PR heads and blockers. Complete the remaining native/published-tuple qualification for grants-enforced Claude Build, preserving the sandbox decision, protected/read-only/ungranted roots and owner-configured MCP allowlist; repository MCP configuration remains excluded. Reuse merged #6407/#6449 and current #6484 probing behavior. OpenCoven/coven#1669 is closed, OpenCoven/coven#1698 is merged and v0.5.0 is published: verify the actual released/installed producer’s scope-v2 capability and provenance instead of waiting on those historical open-PR claims. Keep #6445/#6450’s recovery integration, owner decisions, MCP/connector/provider and published/native acceptance explicit. A local source-built producer is not a qualified release. Preserve first failures, retries, skips and unsupported rows. Use existing scope-specific authority; close only when every original criterion is proven or explicitly dispositioned by its responsible owner.
Follow-up prompt
Continue #6393 from the latest verified checkpoint without restarting completed work. Refresh the release and installed binary tuple, then coordinate #6450 landing with its existing owner and requalify affected native rows in an isolated profile with distinct Keychain identity. Preserve the documented sandbox residuals and F13/F27 decisions. Do not globally upgrade a CLI, mutate live grants, cut a Coven release or relax admission merely to make Full access available. Record the exact source/artifact, new evidence, remaining gate, responsible actor and one imperative next step on this issue.
Evidence to refresh: Issue and latest checkpoint.
Planning scope: This is a suggested continuation of the canonical issue, not an execution claim or new approval. Existing owners, human decisions and acceptance criteria remain authoritative. GitHub issues, paginated comments/relations, open PRs and Cave Project 9 were checked against main
2d6fda4ed0c5; private execution liveness remains unverified.