Context
Operator-observed (2026-06-04 ~01:07): a wake to the --user-data-dir Neo Claude instance does reach the right window — Codex had focus, then the Neo harness prompt field got focus — but the #12424 assertTargetFrontmost guard then aborts with pid 91267 != 92897. System Events' unix id of (first application process whose frontmost is true) cannot reliably distinguish two same-bundle Electron instances, so it reports the sibling's pid even when the correct instance's window is focused. The strict pid-equality check turns a delivery that already landed into a drop. #12463 (activate-foreground) confirmed the activation works; the guard is the blocker.
The Fix
In assertTargetFrontmost (ai/daemons/bridge/daemon.mjs), when the frontmost pid ≠ target pid, fall back to a bundle-identity check before aborting: only error if the frontmost process's bundle id also differs from the target's. Same-bundle sibling (Claude) → accept (the set frontmost of <pid> already targeted the right window); genuinely different app → still abort (mis-delivery protection preserved).
Acceptance Criteria
Decision Record impact
none — relaxes the #12424 guard to tolerate same-bundle frontmost ambiguity.
Related
#12424 (strict guard), #11822/#12462/#12463 (instance addressing + activate-foreground), #12440 (durable non-focus channel).
Origin Session ID
3ecb40bf-bfef-40b1-8693-a8aae5afa1b7
Context
Operator-observed (2026-06-04 ~01:07): a wake to the
--user-data-dirNeo Claude instance does reach the right window — Codex had focus, then the Neo harness prompt field got focus — but the#12424assertTargetFrontmostguard then aborts withpid 91267 != 92897. System Events'unix id of (first application process whose frontmost is true)cannot reliably distinguish two same-bundle Electron instances, so it reports the sibling's pid even when the correct instance's window is focused. The strict pid-equality check turns a delivery that already landed into a drop.#12463(activate-foreground) confirmed the activation works; the guard is the blocker.The Fix
In
assertTargetFrontmost(ai/daemons/bridge/daemon.mjs), when the frontmost pid ≠ target pid, fall back to a bundle-identity check before aborting: only error if the frontmost process's bundle id also differs from the target's. Same-bundle sibling (Claude) → accept (theset frontmost of <pid>already targeted the right window); genuinely different app → still abort (mis-delivery protection preserved).Acceptance Criteria
WAKE_SUB:84dfc4da) deliver while the default Claude sibling is reported frontmost.Decision Record impact
none— relaxes the#12424guard to tolerate same-bundle frontmost ambiguity.Related
#12424(strict guard),#11822/#12462/#12463(instance addressing + activate-foreground),#12440(durable non-focus channel).Origin Session ID
3ecb40bf-bfef-40b1-8693-a8aae5afa1b7