Authored by Claude Opus 4.8 (Claude Code) as @neo-opus-grace, /lead-role. MC session f5432f03-d2b6-4bc0-a7b5-9fbdafe4b7b9.
Refs #12524, #12434
Context
Operator PRIO-0 (2026-06-04): @neo-opus-vega's wakeups don't work — osascript "resume vega" spawns a fresh local Claude Code session every ~10m (the loop @tobiu flagged), and a @neo-opus-grace wake mis-routed (focus-stole) into @neo-opus-ada's session (opus-4.7's evidence). The wake safety gate is currently disabled (trippedBy @neo-opus-grace) to stop the resume-spawns; this ticket is the path to safely re-enabling it.
The Problem
All claude-family identities (@neo-opus-grace, @neo-opus-ada, @neo-opus-vega) resolve to a generic appName:'Claude' / Tab-3 osascript target in the wake/resume routing. But distinct per-identity Claude instances already exist via --user-data-dir (verified via ps: …/.claude-instances/Neo, …/.claude-instances/neo-opus-vega). The routing never uses that per-identity key → osascript activates "Claude" generically → the wrong/shared instance:
- "resume vega" → a fresh ephemeral Tab-3 session (the 10m loop), never a persistent addressable vega.
- a wake for one claude identity → focus-steals into whichever claude session is active (the opus-4.7 mis-route).
Affects both paths: bridge wake-delivery (ai/daemons/bridge/daemon.mjs) AND resumeHarness resume (ai/scripts/lifecycle/resumeHarness.mjs + harnessRouting.mjs).
The Architectural Reality
ai/scripts/lifecycle/harnessRouting.mjs (from #12524): FAMILY_HARNESS_TARGETS.claude = {adapter:'osascript', appName:'Claude', freshSessionShortcut:'n'} + applyHarnessMetadataDefaults adds tabShortcut:'3'. Same for all claude identities — no per-identity differentiation.
resumeHarness.mjs + harnessRouting.mjs + bridge/daemon.mjs never reference --user-data-dir / CWD (grep = zero).
- The addressable key exists + is live: distinct
--user-data-dir per identity (.claude-instances/<id>).
- #12524 (#12434) made routing identity-derived (
modelFamily) but not instance-addressable — it keeps the generic target. This is the #12524 follow-on.
The Fix
Wire the wake/resume routing to target the per-identity Claude instance by its --user-data-dir (the addressable key that already exists), instead of generic appName:'Claude'/Tab-3. Apply to both the bridge wake-delivery and resumeHarness resume paths.
Acceptance Criteria
Out of Scope
- The #12434/#12524 routing-SSOT refactor (separate).
- The memory team-default (#12527/#12532).
- Off-box/cloud wake (vega runs locally per the verified
--user-data-dir instance).
Evidence
ps: distinct --user-data-dir instances (.claude-instances/Neo, .claude-instances/neo-opus-vega) — the lever exists (per @neo-opus-ada).
@neo-opus-ada's wake-mis-route (a @neo-opus-grace wake into his session) — the bridge-path symptom.
- vega's ~10m resume-spawn loop — the resume-path symptom.
- #12524 diff:
resolveHarnessTargetForIdentity('@neo-opus-vega') → generic osascript/Claude/Tab-3 (the PR's own test).
Related
- Refs #12524, #12434 (routing base; this extends identity-derived → instance-addressable).
- Wake safety gate currently disabled — this is the re-enable path.
Origin Session ID: f5432f03-d2b6-4bc0-a7b5-9fbdafe4b7b9
Retrieval Hint: "per-identity osascript instance addressing user-data-dir wake routing"
Authored by Claude Opus 4.8 (Claude Code) as @neo-opus-grace, /lead-role. MC session
f5432f03-d2b6-4bc0-a7b5-9fbdafe4b7b9.Refs #12524, #12434
Context
Operator PRIO-0 (2026-06-04):
@neo-opus-vega's wakeups don't work — osascript "resume vega" spawns a fresh local Claude Code session every ~10m (the loop @tobiu flagged), and a@neo-opus-gracewake mis-routed (focus-stole) into@neo-opus-ada's session (opus-4.7's evidence). The wake safety gate is currently disabled (trippedBy@neo-opus-grace) to stop the resume-spawns; this ticket is the path to safely re-enabling it.The Problem
All claude-family identities (
@neo-opus-grace,@neo-opus-ada,@neo-opus-vega) resolve to a genericappName:'Claude'/ Tab-3 osascript target in the wake/resume routing. But distinct per-identity Claude instances already exist via--user-data-dir(verified viaps:…/.claude-instances/Neo,…/.claude-instances/neo-opus-vega). The routing never uses that per-identity key → osascript activates "Claude" generically → the wrong/shared instance:Affects both paths: bridge wake-delivery (
ai/daemons/bridge/daemon.mjs) AND resumeHarness resume (ai/scripts/lifecycle/resumeHarness.mjs+harnessRouting.mjs).The Architectural Reality
ai/scripts/lifecycle/harnessRouting.mjs(from #12524):FAMILY_HARNESS_TARGETS.claude={adapter:'osascript', appName:'Claude', freshSessionShortcut:'n'}+applyHarnessMetadataDefaultsaddstabShortcut:'3'. Same for all claude identities — no per-identity differentiation.resumeHarness.mjs+harnessRouting.mjs+bridge/daemon.mjsnever reference--user-data-dir/ CWD (grep = zero).--user-data-dirper identity (.claude-instances/<id>).modelFamily) but not instance-addressable — it keeps the generic target. This is the #12524 follow-on.The Fix
Wire the wake/resume routing to target the per-identity Claude instance by its
--user-data-dir(the addressable key that already exists), instead of genericappName:'Claude'/Tab-3. Apply to both the bridge wake-delivery and resumeHarness resume paths.Acceptance Criteria
--user-data-dir-derived identity).@neo-opus-adaruns as a distinct instance and likely knows the mechanism.Out of Scope
--user-data-dirinstance).Evidence
ps: distinct--user-data-dirinstances (.claude-instances/Neo,.claude-instances/neo-opus-vega) — the lever exists (per@neo-opus-ada).@neo-opus-ada's wake-mis-route (a@neo-opus-gracewake into his session) — the bridge-path symptom.resolveHarnessTargetForIdentity('@neo-opus-vega')→ generic osascript/Claude/Tab-3 (the PR's own test).Related
Origin Session ID: f5432f03-d2b6-4bc0-a7b5-9fbdafe4b7b9 Retrieval Hint: "per-identity osascript instance addressing user-data-dir wake routing"