Context
This ticket exists because the post-merge validation path for #10663 was falsified before we restarted the bridge.
On 2026-05-03, @tobiu manually tested Codex Desktop with the composer unfocused and observed:
- Pressing
Space when the Codex prompt field is not focused applies a focus outline but does not focus the composer.
- Pressing
Enter behaves similarly: outline / focus affordance, not usable composer focus.
- Printable keys such as
r can move focus into the prompt, but if the prompt already contains text, the key replaces the existing prompt input. Printable-key seeding is therefore destructive and cannot be used before the bridge's Cmd+A / Cmd+X clear path.
This invalidates the live-behavior hypothesis behind #10662 / PR #10663 for Codex. Unit coverage correctly proves that the daemon emits activate -> Space -> Cmd+A, but the live Codex app shows Space is not a safe composer-focus primitive.
Immediate mitigation already applied by @neo-gpt:
- Wake safety gate remains
tripped with the updated Codex Space/Enter failure reason.
@neo-gpt's WAKE_SUB:f9a09dfd-37de-40e5-8857-6cd2c7373232 subscription was changed to harnessTarget: 'disabled' to prevent unsafe UI wake injection while preserving Memory Core coordination.
The Problem
The bridge daemon's osascript delivery path is focus-dependent and destructive:
- Activate app.
- Optionally emit tab/focus seed keys.
- Clear current target with
Cmd+A / Cmd+X.
- Paste the wake payload and press Enter.
For Codex Desktop, no currently validated key seed can guarantee that step 3 targets the composer. Space and Enter are non-destructive but insufficient. Printable keys can focus but mutate or replace user prompt text. Therefore Codex UI wake delivery must fail closed until a verified direct composer-focus primitive or non-UI delivery adapter exists.
Leaving the merged #10663 Codex Space default as if it were sufficient is dangerous for two reasons:
- It can give future agents a false green signal that Codex prompt landing is fixed.
- If the Codex bridge-daemon subscription is re-enabled prematurely, osascript can still operate on thread history or other focused UI rather than the composer.
The Architectural Reality
Relevant code and state:
ai/scripts/bridge-daemon.mjs now defaults focusSeedKey = 'space' for appName === 'Claude' || appName === 'Codex' after PR #10663.
test/playwright/unit/ai/scripts/bridge-daemon.spec.mjs verifies Codex emits activate -> Space -> Cmd+A and does not emit Cmd+3.
test/playwright/unit/ai/mcp/server/memory-core/services/WakeSubscriptionService.spec.mjs verifies focusSeedKey: 'space' can round-trip for Codex metadata.
@neo-gpt's live subscription currently remains active but harnessTarget is disabled as a runtime safety mitigation.
- #10517 is the medium-term non-UI routing lane for Codex app-server delivery (
turn/start, turn/steer, thread/inject_items) and should not be duplicated here.
The bridge layer owns the immediate fail-closed behavior; #10517 owns the durable app-server routing architecture.
The Fix
Implement a narrow safety correction for Codex UI wake delivery:
- Remove or neutralize the Codex default
focusSeedKey: 'space' claim in bridge-daemon.mjs so the code no longer implies Space is sufficient for Codex composer focus.
- Add a fail-closed guard for
appName === 'Codex' on the osascript bridge path unless an explicitly validated non-destructive Codex focus primitive is configured in metadata.
- Keep Claude's Space seed intact and keep Antigravity on the verified
Cmd+Shift+I path.
- Preserve
@neo-gpt's disabled bridge-daemon subscription until a safe delivery path exists.
- Point future Codex delivery work to #10517 rather than extending blind key-seed experiments.
Acceptance Criteria
Out of Scope
- Implementing the Codex app-server adapter itself. That belongs to #10517 or a narrower sub-ticket under #10517.
- Retesting Claude Desktop prompt focus. Claude remains covered by #10660 / #10661.
- Changing Antigravity / Gemini delivery. Antigravity remains green via
Cmd+Shift+I.
- Heartbeat reactivation,
WAKE_GATE_OVERRIDE=1, or fresh-session recovery. Those stay blocked until the full matrix is green and @tobiu explicitly flips the gate.
Avoided Traps
- Trap: try another printable key seed such as
r. Rejected. Printable keys can replace existing Codex prompt text when the composer is unfocused, so they are not safe pre-clear focus primitives.
- Trap: treat unit ordering tests as matrix green evidence. Rejected. The unit test proves emitted osascript order only; live Codex behavior falsified the focus assumption.
- Trap: duplicate #10517. Rejected. This ticket is only the immediate fail-closed correction for unsafe Codex UI wake. #10517 remains the durable app-server / wakePolicy routing lane.
- Trap: re-enable heartbeat because #10663 merged. Rejected. The merge did not produce live prompt-landing proof; the gate remains tripped.
Related
- #10649 — Wake prompt-landing matrix; Codex row remains red.
- #10662 / PR #10663 — Codex Space seed quick-fix hypothesis, now live-falsified.
- #10660 / PR #10661 — Claude Space seed, still valid for Claude.
- #10517 — Medium-term Codex app-server / HarnessPresence routing lane.
- #10650 — Wake Substrate Incident Protocol; matrix green is required before reactivation.
- #10647 — Original wake incident safety tree epic, now closed but still the incident context.
Origin Session ID
Origin Session ID: d9cd4943-3285-47a6-b629-c05a9a2a38e4
Retrieval Hint
query_raw_memories("Codex Space Enter focus outline printable key replaces prompt focusSeedKey") and query_raw_memories("Codex collapsed-sidebar #10663 Space seed failed manual validation").
Duplicate sweep performed before creation:
- Local content sweep found adjacent tickets #10658, #10660, #10644, #10517, but no exact ticket for live-falsified Codex Space seed fail-closed correction.
- Latest 20 open GitHub tickets were reviewed for title/author/labels; #10517 is related but medium-term routing, not this immediate safety correction.
- Knowledge Base ticket query returned no relevant documents for this exact framing.
Context
This ticket exists because the post-merge validation path for #10663 was falsified before we restarted the bridge.
On 2026-05-03, @tobiu manually tested Codex Desktop with the composer unfocused and observed:
Spacewhen the Codex prompt field is not focused applies a focus outline but does not focus the composer.Enterbehaves similarly: outline / focus affordance, not usable composer focus.rcan move focus into the prompt, but if the prompt already contains text, the key replaces the existing prompt input. Printable-key seeding is therefore destructive and cannot be used before the bridge'sCmd+A/Cmd+Xclear path.This invalidates the live-behavior hypothesis behind #10662 / PR #10663 for Codex. Unit coverage correctly proves that the daemon emits
activate -> Space -> Cmd+A, but the live Codex app shows Space is not a safe composer-focus primitive.Immediate mitigation already applied by @neo-gpt:
trippedwith the updated Codex Space/Enter failure reason.@neo-gpt'sWAKE_SUB:f9a09dfd-37de-40e5-8857-6cd2c7373232subscription was changed toharnessTarget: 'disabled'to prevent unsafe UI wake injection while preserving Memory Core coordination.The Problem
The bridge daemon's osascript delivery path is focus-dependent and destructive:
Cmd+A/Cmd+X.For Codex Desktop, no currently validated key seed can guarantee that step 3 targets the composer. Space and Enter are non-destructive but insufficient. Printable keys can focus but mutate or replace user prompt text. Therefore Codex UI wake delivery must fail closed until a verified direct composer-focus primitive or non-UI delivery adapter exists.
Leaving the merged #10663 Codex Space default as if it were sufficient is dangerous for two reasons:
The Architectural Reality
Relevant code and state:
ai/scripts/bridge-daemon.mjsnow defaultsfocusSeedKey = 'space'forappName === 'Claude' || appName === 'Codex'after PR #10663.test/playwright/unit/ai/scripts/bridge-daemon.spec.mjsverifies Codex emitsactivate -> Space -> Cmd+Aand does not emitCmd+3.test/playwright/unit/ai/mcp/server/memory-core/services/WakeSubscriptionService.spec.mjsverifiesfocusSeedKey: 'space'can round-trip for Codex metadata.@neo-gpt's live subscription currently remains active butharnessTargetis disabled as a runtime safety mitigation.turn/start,turn/steer,thread/inject_items) and should not be duplicated here.The bridge layer owns the immediate fail-closed behavior; #10517 owns the durable app-server routing architecture.
The Fix
Implement a narrow safety correction for Codex UI wake delivery:
focusSeedKey: 'space'claim inbridge-daemon.mjsso the code no longer implies Space is sufficient for Codex composer focus.appName === 'Codex'on the osascript bridge path unless an explicitly validated non-destructive Codex focus primitive is configured in metadata.Cmd+Shift+Ipath.@neo-gpt's disabled bridge-daemon subscription until a safe delivery path exists.Acceptance Criteria
bridge-daemon.mjsno longer presents Codex Space seeding as a validated default composer-focus fix.Cmd+A/Cmd+Xwhen composer focus is unproven.Cmd+Shift+Iroute remains covered and unchanged.@neo-gptwake subscription remains disabled until a verified safe Codex path exists.Out of Scope
Cmd+Shift+I.WAKE_GATE_OVERRIDE=1, or fresh-session recovery. Those stay blocked until the full matrix is green and @tobiu explicitly flips the gate.Avoided Traps
r. Rejected. Printable keys can replace existing Codex prompt text when the composer is unfocused, so they are not safe pre-clear focus primitives.Related
Origin Session ID
Origin Session ID: d9cd4943-3285-47a6-b629-c05a9a2a38e4
Retrieval Hint
query_raw_memories("Codex Space Enter focus outline printable key replaces prompt focusSeedKey")andquery_raw_memories("Codex collapsed-sidebar #10663 Space seed failed manual validation").Duplicate sweep performed before creation: