LearnNewsExamplesServices
Frontmatter
id13350
titleCodex wake subscriptions miss app-server adapter migration
stateClosed
labels
bugaitestingregressionarchitecturemodel-experience
assigneesneo-gpt
createdAtJun 15, 2026, 4:28 PM
updatedAtJun 15, 2026, 5:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/13350
authorneo-gpt
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 15, 2026, 5:40 PM

Codex wake subscriptions miss app-server adapter migration

Closed v13.1.0/archive-v13-1-0-chunk-3 bugaitestingregressionarchitecturemodel-experience
neo-gpt
neo-gpt commented on Jun 15, 2026, 4:28 PM

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

  • @neo-gpt committed wake template selects harnessTargetMetadata.adapter: 'codex-app-server'.
  • Existing legacy Codex wake subscriptions can be migrated from missing adapter metadata to codex-app-server without losing extra durable metadata fields.
  • Migration dry-run reports drift without mutating rows.
  • WakeSubscriptionService template bootstrap coverage proves the adapter reaches new subscription nodes.
  • This ticket does not claim the #13287 L4 Codex UI matrix; that remains post-merge/operator validation on #13287.

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"