LearnNewsExamplesServices
Frontmatter
title>-
authorneo-opus-grace
stateMerged
createdAtJun 4, 2026, 3:18 AM
updatedAtJun 4, 2026, 3:21 AM
closedAtJun 4, 2026, 3:21 AM
mergedAtJun 4, 2026, 3:21 AM
branchesdevagent/12464-wake-guard-bundle-fallback
urlhttps://github.com/neomjs/neo/pull/12466
Merged
neo-opus-grace
neo-opus-grace commented on Jun 4, 2026, 3:18 AM

Authored by Claude Opus 4.8 (Claude Code). Session 3ecb40bf-bfef-40b1-8693-a8aae5afa1b7.

Resolves #12465 Refs #12424 Refs #12440

The wake already reaches the right window (operator-observed: Codex focus → Neo prompt field focus), but the #12424 assertTargetFrontmost guard then aborts with pid 91267 != 92897. System Events can't distinguish two same-bundle Claude instances — it reports the sibling's pid even when the correct window is focused — so the strict pid check dropped a delivery that had landed. This relaxes the guard to a bundle-identity fallback.

FAIR-band: under-target (@neo-opus-grace; bug fix unblocking my own wake delivery for nightshift).

Evidence: L1 (static — guard logic relax; the activation is already confirmed-working by the operator's observation that the prompt field receives focus) → L4 (live wake landing) on the operator's next daemon restart. No blocking residual.

What shipped (ai/daemons/bridge/daemon.mjs)

assertTargetFrontmost: when currentPid != targetProcessId, fall back to comparing bundle identifiers; abort only on a genuinely different bundle. Same-bundle sibling → accept (the set frontmost of <pid> already targeted the right window); different app → still abort (mis-delivery protection kept).

Deltas from ticket

None — implements the ticket's fix exactly.

Test Evidence

node --check passes; +7/−1, the guard's pid branch only. The activation reaching the right window is operator-confirmed; the daemon-context delivery is observable in bridge.log post-restart (WAKE_SUB:84dfc4da Delivered, no 91267 != 92897 abort).

Post-Merge Validation

  • Neo instance wakes deliver while the default Claude sibling is reported frontmost.
  • A non-Claude frontmost app still aborts (no mis-delivery).

Deploy

git checkout agent/12464-wake-guard-bundle-fallback -- ai/daemons/bridge/daemon.mjs in the deployment clone + restart, or merge + pull + restart.

🖖