Context
Operator V-B-A on 2026-05-17 surfaced that resources/content/sandman_handoff.md now exists in the canonical checkout, but the other active harness checkouts are not reliably seeing it.
This is not a greenfield bootstrap feature. Exact predecessor #10591 is closed and its implementation is present: ai/scripts/bootstrapWorktree.mjs already exports GITIGNORED_FILES_TO_LINK, includes resources/content/sandman_handoff.md, and wires symlinkGitignoredFiles() under --link-data. The remaining friction is operationalization and startup guidance: active independent clones can still be missing the symlink or can carry a stale real file from before #10591.
The Problem
The current active-clone evidence shows the failure mode #10591 was meant to prevent:
- Canonical checkout has a fresh
resources/content/sandman_handoff.md runtime artifact.
- Codex checkout has no local file/symlink at that path.
- Antigravity checkout has a real file at that path, with older mtime and different hash than canonical.
That means agents can still normalize sandman_handoff.md absence/staleness during boot even though the canonical daemon output exists. The mid-session daemon-update case makes copies specifically wrong: if the daemon rewrites the canonical handoff, a copied file inside an independent clone immediately becomes stale; a symlink remains live.
The Architectural Reality
resources/content/sandman_handoff.md is gitignored and canonical-writer-owned. bootstrapWorktree.mjs correctly treats it as a gitignored single-file substrate, not tracked content and not an entire resources/content/ directory symlink.
The current substrate already encodes the right primitive:
.gitignore ignores resources/content/sandman_handoff.md.
ai/scripts/bootstrapWorktree.mjs documents the single-file symlink rationale and allows the file under GITIGNORED_FILES_TO_LINK.
symlinkGitignoredFiles() is conservative: it links missing destinations, reports already-linked symlinks, skips absent canonical source, and skips real destination files with a warning instead of clobbering possible local state.
The gap is the operational/startup layer around that primitive.
The Fix
- Update
AGENTS_STARTUP.md worktree/bootstrap guidance so agents know --link-data also covers gitignored single files, specifically resources/content/sandman_handoff.md, not just .neo-ai-data/.
- Clarify independent-clone usage: non-canonical clones must provide
--canonical-root <canonical checkout> or NEO_AI_CANONICAL_ROOT before expecting the handoff symlink to exist.
- Clarify the stale-real-file case: if an independent clone has a real
resources/content/sandman_handoff.md, preserve/remove it deliberately and rerun the link step; do not copy over it and do not symlink the parent resources/content/ directory.
- Verify the active Codex clone gets a symlink to canonical. Coordinate Antigravity remediation if outside-workspace mutation needs operator approval.
- Do not reimplement #10591 unless V-B-A proves the current primitive fails; this ticket is about startup/operationalization first.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
AGENTS_STARTUP.md bootstrap guidance |
#10591 + bootstrapWorktree.mjs JSDoc |
Agents understand --link-data links .neo-ai-data/ plus gitignored single-file handoffs |
If canonical source absent, warn/continue; if local real file exists, preserve and require deliberate remediation |
Update startup section and Sandman handoff note |
V-B-A with current clone state + bootstrapWorktree.mjs code |
| Active Codex/Antigravity clone file state |
#10591 operational contract |
resources/content/sandman_handoff.md is a symlink to canonical, so daemon rewrites are live |
Local real file preserved until explicitly removed |
Startup note documents remediation |
ls -l, readlink, and hash/mtime checks |
Acceptance Criteria
Out of Scope
- Rebuilding the #10591
symlinkGitignoredFiles() implementation.
- Scheduling Sandman / Golden Path runs; that belongs to the orchestrator/Sandman cadence work.
- Changing boot-time hard-refusal semantics from #11179 / #11260.
- Symlinking the parent
resources/content/ directory.
- Manually editing
sandman_handoff.md; it is daemon/generated runtime output.
Avoided Traps
- Trap: treat this as a missing bootstrap feature — rejected. #10591 already shipped the primitive.
- Trap: copy the file into each clone — rejected. Daemon rewrites canonical mid-session, making copies stale.
- Trap: overwrite a real local handoff file silently — rejected.
bootstrapWorktree.mjs intentionally preserves real files and asks for deliberate removal.
- Trap: fold into #11260/#11179 — rejected. Those tickets cover boot-preflight semantics and are peer-assigned; this ticket covers active-clone symlink operationalization.
Related
- #10591 — closed predecessor that implemented the per-file symlink primitive.
- #11260 — related boot-preflight skill relocation, but not this operationalization slice.
- #11179 — related boot hard-refusal predicate, assigned to Gemini.
ai/scripts/bootstrapWorktree.mjs
AGENTS_STARTUP.md
Origin Session ID: 6e5b995a-c68e-4179-840c-a4cc48d449da
Handoff Retrieval Hint: sandman_handoff bootstrapWorktree cross-clone symlink active clone stale real file canonical-root
Context
Operator V-B-A on 2026-05-17 surfaced that
resources/content/sandman_handoff.mdnow exists in the canonical checkout, but the other active harness checkouts are not reliably seeing it.This is not a greenfield bootstrap feature. Exact predecessor #10591 is closed and its implementation is present:
ai/scripts/bootstrapWorktree.mjsalready exportsGITIGNORED_FILES_TO_LINK, includesresources/content/sandman_handoff.md, and wiressymlinkGitignoredFiles()under--link-data. The remaining friction is operationalization and startup guidance: active independent clones can still be missing the symlink or can carry a stale real file from before #10591.The Problem
The current active-clone evidence shows the failure mode #10591 was meant to prevent:
resources/content/sandman_handoff.mdruntime artifact.That means agents can still normalize
sandman_handoff.mdabsence/staleness during boot even though the canonical daemon output exists. The mid-session daemon-update case makes copies specifically wrong: if the daemon rewrites the canonical handoff, a copied file inside an independent clone immediately becomes stale; a symlink remains live.The Architectural Reality
resources/content/sandman_handoff.mdis gitignored and canonical-writer-owned.bootstrapWorktree.mjscorrectly treats it as a gitignored single-file substrate, not tracked content and not an entireresources/content/directory symlink.The current substrate already encodes the right primitive:
.gitignoreignoresresources/content/sandman_handoff.md.ai/scripts/bootstrapWorktree.mjsdocuments the single-file symlink rationale and allows the file underGITIGNORED_FILES_TO_LINK.symlinkGitignoredFiles()is conservative: it links missing destinations, reports already-linked symlinks, skips absent canonical source, and skips real destination files with a warning instead of clobbering possible local state.The gap is the operational/startup layer around that primitive.
The Fix
AGENTS_STARTUP.mdworktree/bootstrap guidance so agents know--link-dataalso covers gitignored single files, specificallyresources/content/sandman_handoff.md, not just.neo-ai-data/.--canonical-root <canonical checkout>orNEO_AI_CANONICAL_ROOTbefore expecting the handoff symlink to exist.resources/content/sandman_handoff.md, preserve/remove it deliberately and rerun the link step; do not copy over it and do not symlink the parentresources/content/directory.Contract Ledger Matrix
AGENTS_STARTUP.mdbootstrap guidancebootstrapWorktree.mjsJSDoc--link-datalinks.neo-ai-data/plus gitignored single-file handoffsbootstrapWorktree.mjscoderesources/content/sandman_handoff.mdis a symlink to canonical, so daemon rewrites are livels -l,readlink, and hash/mtime checksAcceptance Criteria
AGENTS_STARTUP.mdexplicitly states thatnode ai/scripts/bootstrapWorktree.mjs --link-datalinksresources/content/sandman_handoff.mdas a gitignored single-file substrate.AGENTS_STARTUP.mddocuments independent-clone usage with--canonical-root <canonical checkout>/NEO_AI_CANONICAL_ROOTfor Codex and Antigravity-style sibling clones.AGENTS_STARTUP.mddocuments stale real-file remediation forresources/content/sandman_handoff.md: preserve/remove intentionally, rerun--link-data, never symlinkresources/content/as a parent directory.resources/content/sandman_handoff.mdas a symlink to the canonical file, verified byls -l/readlink.bootstrapWorktree.mjslogic changes unless V-B-A demonstrates the existing #10591 implementation does not satisfy the contract.Out of Scope
symlinkGitignoredFiles()implementation.resources/content/directory.sandman_handoff.md; it is daemon/generated runtime output.Avoided Traps
bootstrapWorktree.mjsintentionally preserves real files and asks for deliberate removal.Related
ai/scripts/bootstrapWorktree.mjsAGENTS_STARTUP.mdOrigin Session ID: 6e5b995a-c68e-4179-840c-a4cc48d449da
Handoff Retrieval Hint:
sandman_handoff bootstrapWorktree cross-clone symlink active clone stale real file canonical-root