Context
@tobiu surfaced (2026-06-10 nightshift kickoff): the swarm's local clones drift stale — agents aren't refreshing to dev + pulling + regenerating config at session end. The named remediation: switch to dev (not inside a worktree) → pull → update config files via ai/scripts/setup/initServerConfigs.mjs.
Live latest-open sweep: checked the latest 60 open issues at 2026-06-10T18:38Z; no equivalent found (#12808 is worktree BOOTSTRAP_CONFIGS, distinct; #10063 is the memory-persist hook, distinct).
The Problem
/session-sunset does have a Pre-Sunset Pull (Step 1), but V-B-A against the live workflow shows it is harness-binary-stale and config-incomplete:
- Harness model is outdated (branches on model-family, not topology). Step 1 splits "Shared Checkout (Antigravity/Gemini)" vs "Isolated Worktree (Claude Code)" and tells Claude Code agents to NOT checkout
dev ("would conflict with the main checkout"). But the Claude peers now run in independent full clones (e.g. the opus-vega clone — git rev-parse --git-dir → .git, a main clone, not a linked worktree). There the correct action is the Shared-Checkout path (checkout dev + pull) — but the protocol routes Claude agents away from it → their clones never pull dev → stale clones (the exact friction observed).
- Pull without config-regen. The Shared-Checkout branch runs only
git checkout dev && git pull origin dev — no config regeneration. initServerConfigs.mjs --migrate-config appears only in the operator-facing primary-staleness handover block (worktree case), never as an agent action in the non-worktree path. So an agent that pulls still leaves the gitignored config.mjs operator-overlay stale → daemons (wake-daemon, orchestrator-daemon, DreamService, KB sync) run fresh code against stale config. The block itself states: "A git pull alone is not enough."
The Architectural Reality (V-B-A'd against dev)
.agents/skills/session-sunset/references/session-sunset-workflow.md §Step 1 — the binary Shared Checkout (Antigravity/Gemini) vs Isolated Worktree (Claude Code) discriminator; the agent-facing Shared-Checkout command omits config-regen.
- Same file, Primary-Checkout Staleness Probe block (per
#11013) — the ONLY place initServerConfigs.mjs --migrate-config is named, and only as operator-facing handover prose, not an agent action.
ai/scripts/setup/initServerConfigs.mjs — canonical config bootstrap; --migrate-config reconciles the gitignored config.mjs to new config.template.mjs leaves (runs at npm prepare). Pure git pull updates the committed template, not the operator overlay the daemons read.
- Topology anchor: the discriminator should be "am I in a linked worktree?" (
git rev-parse --git-common-dir / --show-toplevel) — not model family. Worktree → don't checkout dev (push branch); main/independent clone → checkout dev + pull + regen config.
The Fix
Rewrite Step 1 of session-sunset-workflow.md to branch on working-tree topology, not model family:
- Linked worktree (current "Isolated Worktree" guidance): unchanged — do NOT checkout
dev; commit + push the branch; keep the primary-staleness probe handover block.
- Main / independent clone (covers Antigravity, Gemini, AND Claude-in-independent-clone):
git checkout dev && git pull --ff-only origin dev then node ai/scripts/setup/initServerConfigs.mjs --migrate-config as an explicit agent action (not just an operator handover note). Pair the two inseparably; carry the "pull alone is not enough" rationale to the new site.
- Keep the change inside the referenced workflow payload (World Atlas), not the top-level
SKILL.md router (Progressive Disclosure — .agents/skills/create-skill/).
Decision Record impact
none — no ADR governs sunset Step 1; it embodies the "next session boots on fresh infrastructure" principle. Adjacent: #11013 (staleness-probe origin), #11009 (post-extraction Orchestrator.mjs will own a daemon-driven primary-dev-sync auto-pull that eventually obsoletes the manual step — the sunset condition for this guidance).
Acceptance Criteria
Out of Scope
- Daemon-driven auto-sync (
primary-dev-sync periodic task in Orchestrator.mjs) — tracked under the #11013/#11009 follow-up; this fixes the manual sunset step only.
- The
#12849 wake-cursor flood (operationally adjacent — stale config can co-occur with the restart wave — but a distinct delivery-reliability bug).
- Any code change to
initServerConfigs.mjs itself (already supports --migrate-config).
Avoided Traps
- Asserting sunset has NO repo-refresh step. It does (Step 1) — the defect is harness-binary staleness + config-regen omission, not absence (initial framing corrected by reading the live workflow — V-B-A).
- Discriminating by model family. The durable axis is working-tree topology; model-family branching is what stranded the independent-clone case.
- Pull-only. Config regen is load-bearing — daemons read the gitignored overlay;
git pull alone leaves them on stale config.
Related
- #11013 — primary-checkout staleness probe (introduced the config-regen remediation, operator-facing only)
- #11009 — Orchestrator.mjs extraction → future daemon-driven auto-sync
- #12849 — wake-daemon corrupt-cursor flood (operationally adjacent restart-wave context)
Handoff Retrieval Hint: semantic — "session-sunset Step 1 harness-binary staleness independent clone config regen"; structural — .agents/skills/session-sunset/references/session-sunset-workflow.md Step 1.
Origin: 2026-06-10 nightshift kickoff, @neo-opus-vega.
Authored by @neo-opus-vega (Claude Opus 4.8).
Context
@tobiu surfaced (2026-06-10 nightshift kickoff): the swarm's local clones drift stale — agents aren't refreshing to
dev+ pulling + regenerating config at session end. The named remediation: switch todev(not inside a worktree) → pull → update config files viaai/scripts/setup/initServerConfigs.mjs.Live latest-open sweep: checked the latest 60 open issues at 2026-06-10T18:38Z; no equivalent found (
#12808is worktreeBOOTSTRAP_CONFIGS, distinct;#10063is the memory-persist hook, distinct).The Problem
/session-sunsetdoes have a Pre-Sunset Pull (Step 1), but V-B-A against the live workflow shows it is harness-binary-stale and config-incomplete:dev("would conflict with the main checkout"). But the Claude peers now run in independent full clones (e.g. theopus-vegaclone —git rev-parse --git-dir→.git, a main clone, not a linked worktree). There the correct action is the Shared-Checkout path (checkoutdev+ pull) — but the protocol routes Claude agents away from it → their clones never pulldev→ stale clones (the exact friction observed).git checkout dev && git pull origin dev— no config regeneration.initServerConfigs.mjs --migrate-configappears only in the operator-facing primary-staleness handover block (worktree case), never as an agent action in the non-worktree path. So an agent that pulls still leaves the gitignoredconfig.mjsoperator-overlay stale → daemons (wake-daemon,orchestrator-daemon,DreamService, KB sync) run fresh code against stale config. The block itself states: "Agit pullalone is not enough."The Architectural Reality (V-B-A'd against
dev).agents/skills/session-sunset/references/session-sunset-workflow.md§Step 1 — the binary Shared Checkout (Antigravity/Gemini) vs Isolated Worktree (Claude Code) discriminator; the agent-facing Shared-Checkout command omits config-regen.#11013) — the ONLY placeinitServerConfigs.mjs --migrate-configis named, and only as operator-facing handover prose, not an agent action.ai/scripts/setup/initServerConfigs.mjs— canonical config bootstrap;--migrate-configreconciles the gitignoredconfig.mjsto newconfig.template.mjsleaves (runs atnpm prepare). Puregit pullupdates the committed template, not the operator overlay the daemons read.git rev-parse --git-common-dir/--show-toplevel) — not model family. Worktree → don't checkout dev (push branch); main/independent clone → checkout dev + pull + regen config.The Fix
Rewrite Step 1 of
session-sunset-workflow.mdto branch on working-tree topology, not model family:dev; commit + push the branch; keep the primary-staleness probe handover block.git checkout dev && git pull --ff-only origin devthennode ai/scripts/setup/initServerConfigs.mjs --migrate-configas an explicit agent action (not just an operator handover note). Pair the two inseparably; carry the "pull alone is not enough" rationale to the new site.SKILL.mdrouter (Progressive Disclosure —.agents/skills/create-skill/).Decision Record impact
none— no ADR governs sunset Step 1; it embodies the "next session boots on fresh infrastructure" principle. Adjacent:#11013(staleness-probe origin),#11009(post-extractionOrchestrator.mjswill own a daemon-drivenprimary-dev-syncauto-pull that eventually obsoletes the manual step — the sunset condition for this guidance).Acceptance Criteria
git rev-parse --git-common-dir/--show-toplevel), not on model family.node ai/scripts/setup/initServerConfigs.mjs --migrate-config) as an explicit agent action, paired with thedevpull.references/session-sunset-workflow.md(payload), not theSKILL.mdrouter; net loaded-bytes accounted for per the substrate-accretion defense.Out of Scope
primary-dev-syncperiodic task inOrchestrator.mjs) — tracked under the#11013/#11009follow-up; this fixes the manual sunset step only.#12849wake-cursor flood (operationally adjacent — stale config can co-occur with the restart wave — but a distinct delivery-reliability bug).initServerConfigs.mjsitself (already supports--migrate-config).Avoided Traps
git pullalone leaves them on stale config.Related
Handoff Retrieval Hint: semantic — "session-sunset Step 1 harness-binary staleness independent clone config regen"; structural —
.agents/skills/session-sunset/references/session-sunset-workflow.mdStep 1. Origin: 2026-06-10 nightshift kickoff, @neo-opus-vega.Authored by @neo-opus-vega (Claude Opus 4.8).