Context
This leaf exists to close the implementation slice discovered while working #13287. The live regression ticket still needs L4 Codex UI evidence, but the current durable route substrate has a narrower bug: @neo-gpt wake subscriptions can remain on the platform-default osascript path even after the Codex app-server adapter exists.
Live latest-open sweep: checked the latest 20 open GitHub issues on 2026-06-15; no equivalent leaf ticket found. The only overlapping open item is #13287, which remains the parent live-evidence ticket. Semantic KB sweep found the closed/ancestor adapter work in #13067, plus older Codex wake ancestors, but no current ticket for template + migration drift. Local content sweep found #13067 as precedent and #13077 as adjacent adapter-agnostic retry work, not a duplicate. A2A in-flight claim sweep could not run because this Codex surface exposes no list_messages tool; #13287 has a public lane-claim fallback comment for this exact slice.
The Problem
#13067 added the codex-app-server adapter path, and ai/scripts/lifecycle/harnessRouting.mjs already uses that adapter for GPT fresh-session recovery. But the committed @neo-gpt AgentIdentity.subscriptionTemplate still lacked harnessTargetMetadata.adapter, and ai/scripts/migrations/migrateWakeSubscriptions.mjs only reconciled appName / tabShortcut from durable AgentIdentity rows.
That leaves existing durable WAKE_SUBSCRIPTION rows with {appName:'Codex', focusSeedKey:'r'} and no explicit adapter. On macOS, absent adapter metadata falls back to platform-default osascript, which is exactly the drift #13287 live V-B-A observed.
The Architectural Reality
ai/graph/identityRoots.mjs is the committed source roster for first-party AgentIdentity roots.
ai/scripts/lifecycle/harnessRouting.mjs already establishes codex-app-server as the GPT-family app-server route for fresh-session recovery.
ai/scripts/migrations/migrateWakeSubscriptions.mjs is the existing one-shot migration surface for legacy bridge-daemon wake subscription metadata.
WakeSubscriptionService bootstraps from AgentIdentity.subscriptionTemplate; tests need to prove future bootstraps carry the same adapter metadata.
The Fix
- Add
adapter: 'codex-app-server' to the committed @neo-gpt wake subscription template and remove the legacy focusSeedKey from the template.
- Extend
migrateWakeSubscriptions.mjs to reconcile all explicit identity-template metadata keys, not just appName / tabShortcut.
- Resolve first-party templates from
identityRoots.mjs during migration, with durable AgentIdentity row fallback only for out-of-tree identities. This handles stale live graph rows whose durable identity template still lacks the new adapter.
- Add focused unit coverage for the identity root, bootstrap propagation, and migration dry-run/apply behavior.
Contract Ledger
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
@neo-gpt AgentIdentity.subscriptionTemplate.harnessTargetMetadata.adapter |
ai/graph/identityRoots.mjs + #13067 adapter support |
Template declares adapter:'codex-app-server', appName:'Codex', tabShortcut:null |
No focusSeedKey in the committed template; old durable rows may still preserve it until migration applies |
Inline Anchor & Echo not required beyond existing identity roster shape |
identityRoots.spec.mjs |
migrateWakeSubscriptions.mjs metadata reconciliation |
Existing migration script + identityRoots.mjs first-party roster |
Reconcile every explicit metadata key from the canonical template |
Durable AgentIdentity row remains fallback for out-of-tree identities |
JSDoc on the template resolver |
New migration spec + live dry-run |
Existing durable WAKE_SUBSCRIPTION rows |
Live graph V-B-A from #13287 |
Dry-run reports current @neo-gpt rows as adapter patch candidates |
Apply is operator-controlled / explicit --apply; dry-run mutates nothing |
PR evidence line |
Live dry-run output |
Decision Record impact
None. This aligns existing wake-subscription data with the already-shipped Codex app-server adapter surface from #13067; no ADR amendment is needed.
Acceptance Criteria
Out of Scope
- Proving prompt lands, submits, and starts a Codex turn without operator Enter. That remains #13287.
- Changing wake-daemon digest construction or retry/read-state behavior.
- Reworking non-Codex adapters.
Related
Related: #13287
Related: #13067
Related: #13077
Release classification: post-release Agent Harness reliability; boardless.
Origin Session ID: 019ec8a7-1f8e-75a3-b223-fe59cc444776
Retrieval Hint: "Codex wake subscription template adapter migration @neo-gpt codex-app-server osascript focusSeedKey"
Context
This leaf exists to close the implementation slice discovered while working #13287. The live regression ticket still needs L4 Codex UI evidence, but the current durable route substrate has a narrower bug:
@neo-gptwake subscriptions can remain on the platform-defaultosascriptpath even after the Codex app-server adapter exists.Live latest-open sweep: checked the latest 20 open GitHub issues on 2026-06-15; no equivalent leaf ticket found. The only overlapping open item is #13287, which remains the parent live-evidence ticket. Semantic KB sweep found the closed/ancestor adapter work in
#13067, plus older Codex wake ancestors, but no current ticket for template + migration drift. Local content sweep found#13067as precedent and#13077as adjacent adapter-agnostic retry work, not a duplicate. A2A in-flight claim sweep could not run because this Codex surface exposes nolist_messagestool; #13287 has a public lane-claim fallback comment for this exact slice.The Problem
#13067added thecodex-app-serveradapter path, andai/scripts/lifecycle/harnessRouting.mjsalready uses that adapter for GPT fresh-session recovery. But the committed@neo-gptAgentIdentity.subscriptionTemplatestill lackedharnessTargetMetadata.adapter, andai/scripts/migrations/migrateWakeSubscriptions.mjsonly reconciledappName/tabShortcutfrom durableAgentIdentityrows.That leaves existing durable
WAKE_SUBSCRIPTIONrows with{appName:'Codex', focusSeedKey:'r'}and no explicit adapter. On macOS, absent adapter metadata falls back to platform-defaultosascript, which is exactly the drift #13287 live V-B-A observed.The Architectural Reality
ai/graph/identityRoots.mjsis the committed source roster for first-partyAgentIdentityroots.ai/scripts/lifecycle/harnessRouting.mjsalready establishescodex-app-serveras the GPT-family app-server route for fresh-session recovery.ai/scripts/migrations/migrateWakeSubscriptions.mjsis the existing one-shot migration surface for legacy bridge-daemon wake subscription metadata.WakeSubscriptionServicebootstraps fromAgentIdentity.subscriptionTemplate; tests need to prove future bootstraps carry the same adapter metadata.The Fix
adapter: 'codex-app-server'to the committed@neo-gptwake subscription template and remove the legacyfocusSeedKeyfrom the template.migrateWakeSubscriptions.mjsto reconcile all explicit identity-template metadata keys, not justappName/tabShortcut.identityRoots.mjsduring migration, with durableAgentIdentityrow fallback only for out-of-tree identities. This handles stale live graph rows whose durable identity template still lacks the new adapter.Contract Ledger
@neo-gptAgentIdentity.subscriptionTemplate.harnessTargetMetadata.adapterai/graph/identityRoots.mjs+#13067adapter supportadapter:'codex-app-server',appName:'Codex',tabShortcut:nullfocusSeedKeyin the committed template; old durable rows may still preserve it until migration appliesidentityRoots.spec.mjsmigrateWakeSubscriptions.mjsmetadata reconciliationidentityRoots.mjsfirst-party rosterAgentIdentityrow remains fallback for out-of-tree identitiesWAKE_SUBSCRIPTIONrows@neo-gptrows as adapter patch candidates--apply; dry-run mutates nothingDecision Record impact
None. This aligns existing wake-subscription data with the already-shipped Codex app-server adapter surface from
#13067; no ADR amendment is needed.Acceptance Criteria
@neo-gptcommitted wake template selectsharnessTargetMetadata.adapter: 'codex-app-server'.codex-app-serverwithout losing extra durable metadata fields.WakeSubscriptionServicetemplate bootstrap coverage proves the adapter reaches new subscription nodes.Out of Scope
Related
Related: #13287 Related: #13067 Related: #13077
Release classification: post-release Agent Harness reliability; boardless.
Origin Session ID: 019ec8a7-1f8e-75a3-b223-fe59cc444776
Retrieval Hint: "Codex wake subscription template adapter migration @neo-gpt codex-app-server osascript focusSeedKey"