LearnNewsExamplesServices
Frontmatter
id13291
titlePin Codex wake submit boundary in tests and matrix
stateClosed
labels
bugaitestingarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 15, 2026, 4:24 AM
updatedAtJun 15, 2026, 8:44 AM
githubUrlhttps://github.com/neomjs/neo/issues/13291
authorneo-gpt
commentsCount0
parentIssue13012
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 15, 2026, 8:44 AM

Pin Codex wake submit boundary in tests and matrix

Closed v13.1.0/archive-v13-1-0-chunk-3 bugaitestingarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 15, 2026, 4:24 AM

Context

PR #13290 correctly pins the Codex wake boundary discovered while investigating #13287: prompt insertion / adapter command success is not the same as prompt submission and turn start.

During review, Ada and Grace both identified a close-target problem: #13290 used Resolves #13287, but #13287 is the live behavioral ticket for AC2, where actionable A2A message wakes may land in Codex without submitting. That live L4 behavior remains open. This ticket gives #13290 a truthful leaf close-target for the L2 work it fully delivers, while #13287 remains open as the behavioral investigation and live validation home.

The Problem

Agent PR body lint requires at least one Resolves #N line for agent-authored PRs. Without a narrower leaf, the only available close-target was #13287, which would prematurely close the operator-reported live-submit bug even though the PR explicitly declares the L4 residual.

The concrete substrate problem solved by #13290 is narrower and complete: the wake system lacked a precise, test-backed boundary between:

  • a wake payload landing or being accepted by an adapter;
  • the payload being submitted into Codex;
  • a Codex turn actually starting without the operator pressing Enter.

The Architectural Reality

V-B-A source sweep before creation:

  • #13287 is open and assigned to @neo-gpt; it remains the live behavioral tracking ticket for heartbeat-vs-A2A Codex submission.
  • Active @neo-gpt wake subscription V-B-A via manage_wake_subscription({action:'list'}) on 2026-06-15 showed one active bridge-daemon route with metadata {appName:'Codex', tabShortcut:null, focusSeedKey:'r'} and no explicit adapter, so the live route defaults to macOS osascript, not an explicit codex-app-server route.
  • ai/daemons/wake/daemon.mjs#deliverDigest() chooses the adapter from subscription metadata, not from event type; heartbeat and message events coalesced into the same subscription use the same adapter branch.
  • ai/daemons/wake/daemon.mjs#buildWakeDigest() intentionally emits different payload shapes: pure heartbeat digests append the lifecycle directive, while message/task/permission digests omit it.
  • ai/docs/wake-prompt-landing-matrix.md now needs an explicit submitted/turn-start row so adapter success cannot be reported as full wake success.

The Fix

Fully deliver the L2 boundary pin implemented by PR #13290:

  • Add an explicit Prompt Submitted / Turn Starts criterion to ai/docs/wake-prompt-landing-matrix.md.
  • Update the Codex app-server daemon JSDoc/log wording so send-message-v2 success is classified as dispatch/injection proof, not full submit/turn-start proof.
  • Add wake-daemon unit coverage proving the Codex UI osascript route includes paste plus key code 36 for direct message wakes and mixed message+heartbeat digests.
  • Keep #13287 open for live Codex L4 validation and root-cause work.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
ai/docs/wake-prompt-landing-matrix.md Wake prompt landing matrix + #13287 AC2 Matrix distinguishes prompt landing from prompt submission / turn start. If a future adapter can prove turn start directly, the matrix row remains the evidence slot rather than being removed. Matrix row. Doc diff plus review audit.
ai/daemons/wake/daemon.mjs#deliverViaCodexAppServer() Current Codex CLI app-server route send-message-v2 success is dispatch/injection proof only. If Codex gains a submit-capable app-server command, a separate behavior ticket should update the route and evidence class. JSDoc/log wording. Unit coverage for command dispatch classification.
ai/daemons/wake/daemon.mjs#deliverDigest() Codex osascript path Existing wake daemon delivery contract Backend intent for Codex UI bridge includes paste plus Enter (key code 36) for message-shaped wake digests. This is L2 intent proof only; live Codex UI submission remains #13287. Existing Anchor & Echo comments stay authoritative. Focused daemon unit tests.
#13287 live behavior Operator observation + live wake evidence Remains open until AC2 L4 evidence proves actionable A2A message wakes submit and start a turn. #13290 must not close #13287. PR body retargets to this ticket and references #13287 as related. Live/manual Codex validation handled on #13287.

Decision Record impact

Aligned with ADR 0002 / wake-substrate standards. No ADR amendment: this ticket clarifies evidence taxonomy and adapter success semantics; it does not change the wake substrate architecture.

Acceptance Criteria

  • The wake matrix contains an explicit prompt submitted / turn starts criterion distinct from prompt landing and adapter dispatch.
  • Codex app-server send-message-v2 daemon wording does not overclaim full submission or turn-start proof.
  • Codex UI bridge unit coverage proves direct A2A message wake digests include paste plus Enter intent.
  • Codex UI bridge unit coverage proves mixed message+heartbeat digests include paste plus Enter intent and omit the heartbeat-only lane directive.
  • PR #13290 uses this issue as its Resolves close-target and keeps #13287 open via Related / Refs semantics.

Out of Scope

  • Proving live Codex Desktop prompt submission and turn start for actionable A2A message wakes. That remains #13287.
  • Changing the active @neo-gpt wake subscription adapter.
  • Reworking stale retry/read-state behavior from #13281 / PR #13285.
  • Adding a new submit-capable Codex app-server command.

Avoided Traps

  • Do not close #13287 from an L2 unit/doc boundary pin. #13287 is the live behavioral bug and still needs L4 evidence.
  • Do not infer that codex debug app-server send-message-v2 submits a turn. Current evidence supports injection/dispatch only.
  • Do not infer adapter divergence from heartbeat-vs-message symptoms unless live route metadata proves different adapters; current route metadata does not.

Related

  • PR #13290: implements this ticket.
  • #13287: live Codex A2A message wake submit / turn-start investigation.
  • #13012: Agent Harness epic.
  • #13067 / PR #13073: Codex app-server adapter route.
  • #13281 / PR #13285: stale retry read-state behavior, adjacent but not duplicate.

Release classification: post-release Agent Harness reliability; not v13 release-blocking.

Duplicate sweep: live latest-open GitHub sweep at 2026-06-15T02:23:59Z checked the latest 20 open issues with number/title/author/labels/url. #13287 is related but broader and intentionally remains open; no equivalent L2 boundary-pin leaf was found. Live GitHub search for Codex wake boundary submit intent Enter matrix returned no open issues. A2A in-flight claim sweep at 2026-06-15T02:23:59Z checked the latest 30 messages across read states; no competing [lane-claim] / [lane-intent] for this split-ticket scope was present. KB ticket search for Codex wake submission boundary send-message-v2 key code 36 issue duplicate surfaced older Codex wake/app-server context (#10664, #10649, #10666, #10517, #10662) but no current equivalent leaf.

Origin Session ID: 019ec8a7-1f8e-75a3-b223-fe59cc444776

Retrieval Hint: "PR #13290 Codex wake submit boundary matrix send-message-v2 key code 36 #13287 close-target"