Context
PR #13405 implements a narrow mitigation discovered during #13287 recovery: Codex direct-message wake payloads land in the composer but the final Enter submit can be consumed by transient composer UI left active by pasted A2A digests, especially digests containing @peer mentions. The parent #13287 remains the L4 live matrix for prompt lands + submits + starts a turn across direct-message, pure-heartbeat, and mixed-message-heartbeat scenarios.
This ticket exists to repair the close-target topology: #13405 can honestly close this leaf when the L2 osascript sequence and daemon tests are green, while #13287 stays open for the L4 host matrix.
Live latest-open sweep: checked latest 20 open issues on 2026-06-16T02:31Z; found parent #13287 and adjacent wake/stale-process issues, but no equivalent narrow Escape-before-Enter / composer-popover leaf. A2A in-flight sweep: checked latest 30 messages across all read states immediately before creation; only the existing #13287 lane claim and #13405 review-response thread overlapped this scope. Semantic ticket sweep: ask_knowledge_base for Codex wake Escape before Enter direct-message submit osascript leaf ticket #13287 #13405 surfaced #13287 and older Codex focus-seed/app-server context, but no duplicate leaf ticket.
Release classification: v13.1 Agent Harness reliability close-target repair, boardless; parent #13287 owns the release-relevant live validation outcome.
The Problem
#13287 cannot be honestly auto-closed by #13405 because the live Codex Desktop submit/start-turn proof remains L4 host-gated. But agent PR body lint requires a Resolves #N close-target for delivered work, and the close-target remediation substrate explicitly rejects a bare Refs #13287 downgrade.
Without a narrow leaf, the PR is forced between two bad shapes: auto-close the parent before the L4 matrix, or fail body lint with only Refs #13287.
The Architectural Reality
ai/daemons/wake/daemon.mjs owns the macOS osascript delivery sequence for Codex wake payloads.
test/playwright/unit/ai/daemons/wake/daemon.spec.mjs owns the backend sequence contract for Codex direct-message and mixed-message wake delivery.
learn/agentos/process/evidence-ladder.md allows lower-level delivery PRs only when evidence class and residuals are explicit.
.agents/skills/pr-review/references/close-target-remediation.md says split or re-scope to a fully delivered leaf rather than downgrading an agent PR to bare Refs.
- #13287 remains the L4 parent validation issue.
The Fix
Deliver the narrow backend mitigation already present in PR #13405:
- Add a Codex-only
Escape keystroke after wake payload paste and before Enter submit.
- Keep the change scoped to Codex
osascript; do not alter Claude, Antigravity, tmux, webhook, or app-server adapters.
- Extend the existing wake daemon unit coverage to assert the Codex sequence is
paste -> Escape -> Enter.
- Leave #13287 open via
Refs #13287 for the live Codex Desktop matrix.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
Codex osascript delivery sequence |
ai/daemons/wake/daemon.mjs |
Codex direct wake closes transient composer UI with Escape before pressing Enter. |
If no popover is present, Escape should be harmless; L4 matrix must watch for any future Codex behavior that clears composer text. |
PR body + #13287 matrix notes. |
Unit sequence assertion + L4 residual on #13287. |
| Wake daemon Codex sequence tests |
test/playwright/unit/ai/daemons/wake/daemon.spec.mjs |
Direct-message and mixed-message Codex tests assert paste -> Escape -> Enter. |
Non-Codex adapters remain unchanged and covered by existing tests. |
Test evidence in PR #13405. |
Focused and full wake daemon unit suite. |
| Parent validation topology |
#13287 + evidence ladder + close-target remediation |
#13405 resolves this L2 leaf and references #13287 for L4. |
If L4 fails after merge, #13287 stays open and gets a follow-up defect instead of resurrecting this leaf. |
PR body close-target section. |
closingIssuesReferences points only at this leaf. |
Decision Record impact
None. This is aligned with the existing Evidence Ladder and close-target remediation rules.
Acceptance Criteria
Out of Scope
- Proving live Codex Desktop submits and starts a turn without human Enter.
- Closing #13287.
- Replacing
osascript with a native Codex app-server submit route.
- Changing wake retry/read-state behavior.
Related
Parent: #13287
Implementing PR: #13405
Related route-restore leaf: #13395
Origin Session ID: 09850a49-643e-42cc-81dc-b2b38bf6f3a1
Retrieval Hint: "#13405 Codex wake Escape before Enter composer popover osascript close-target leaf #13287"
Context
PR #13405 implements a narrow mitigation discovered during #13287 recovery: Codex direct-message wake payloads land in the composer but the final Enter submit can be consumed by transient composer UI left active by pasted A2A digests, especially digests containing
@peermentions. The parent #13287 remains the L4 live matrix for prompt lands + submits + starts a turn across direct-message, pure-heartbeat, and mixed-message-heartbeat scenarios.This ticket exists to repair the close-target topology: #13405 can honestly close this leaf when the L2 osascript sequence and daemon tests are green, while #13287 stays open for the L4 host matrix.
Live latest-open sweep: checked latest 20 open issues on 2026-06-16T02:31Z; found parent #13287 and adjacent wake/stale-process issues, but no equivalent narrow Escape-before-Enter / composer-popover leaf. A2A in-flight sweep: checked latest 30 messages across all read states immediately before creation; only the existing #13287 lane claim and #13405 review-response thread overlapped this scope. Semantic ticket sweep:
ask_knowledge_baseforCodex wake Escape before Enter direct-message submit osascript leaf ticket #13287 #13405surfaced #13287 and older Codex focus-seed/app-server context, but no duplicate leaf ticket.Release classification: v13.1 Agent Harness reliability close-target repair, boardless; parent #13287 owns the release-relevant live validation outcome.
The Problem
#13287 cannot be honestly auto-closed by #13405 because the live Codex Desktop submit/start-turn proof remains L4 host-gated. But agent PR body lint requires a
Resolves #Nclose-target for delivered work, and the close-target remediation substrate explicitly rejects a bareRefs #13287downgrade.Without a narrow leaf, the PR is forced between two bad shapes: auto-close the parent before the L4 matrix, or fail body lint with only
Refs #13287.The Architectural Reality
ai/daemons/wake/daemon.mjsowns the macOSosascriptdelivery sequence for Codex wake payloads.test/playwright/unit/ai/daemons/wake/daemon.spec.mjsowns the backend sequence contract for Codex direct-message and mixed-message wake delivery.learn/agentos/process/evidence-ladder.mdallows lower-level delivery PRs only when evidence class and residuals are explicit..agents/skills/pr-review/references/close-target-remediation.mdsays split or re-scope to a fully delivered leaf rather than downgrading an agent PR to bareRefs.The Fix
Deliver the narrow backend mitigation already present in PR #13405:
Escapekeystroke after wake payload paste and before Enter submit.osascript; do not alter Claude, Antigravity, tmux, webhook, or app-server adapters.paste -> Escape -> Enter.Refs #13287for the live Codex Desktop matrix.Contract Ledger
osascriptdelivery sequenceai/daemons/wake/daemon.mjsEscapebefore pressing Enter.test/playwright/unit/ai/daemons/wake/daemon.spec.mjspaste -> Escape -> Enter.closingIssuesReferencespoints only at this leaf.Decision Record impact
None. This is aligned with the existing Evidence Ladder and close-target remediation rules.
Acceptance Criteria
osascriptwake delivery sends Escape after paste and before Enter.Resolvesfor this leaf andRefs #13287for the parent L4 matrix.Out of Scope
osascriptwith a native Codex app-server submit route.Related
Parent: #13287 Implementing PR: #13405 Related route-restore leaf: #13395
Origin Session ID: 09850a49-643e-42cc-81dc-b2b38bf6f3a1
Retrieval Hint: "#13405 Codex wake Escape before Enter composer popover osascript close-target leaf #13287"