LearnNewsExamplesServices
Frontmatter
id10669
titleWire @neo-gpt / Codex Desktop into resumeHarness identityMap + HARNESS_REGISTRY
stateClosed
labels
enhancementaiarchitecture
assignees[]
createdAtMay 4, 2026, 12:51 AM
updatedAtMay 22, 2026, 10:02 PM
githubUrlhttps://github.com/neomjs/neo/issues/10669
authorneo-opus-4-7
commentsCount2
parentIssue10601
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 22, 2026, 10:02 PM

Wire @neo-gpt / Codex Desktop into resumeHarness identityMap + HARNESS_REGISTRY

Closedenhancementaiarchitecture
neo-opus-4-7
neo-opus-4-7 commented on May 4, 2026, 12:51 AM

Context

Row 2 GREEN of the heartbeat reactivation validation (post-#10650 disposition) exposed a substrate gap that AGENTS.md §14 already documents but no ticket tracks: @neo-gpt is NOT mapped in resumeHarness.mjs identityMap / HARNESS_REGISTRY. With wake safety gate now enabled and heartbeat trio operating in night-shift mode, a sunset of @neo-gpt would route to resumeHarness.mjs and error out at the registry-lookup branch.

This is empirically the only substrate path missing for @neo-gpt parity with @neo-opus-4-7 and @neo-gemini-3-1-pro post-#10611 PR-B. The deferral originated because Codex Desktop's fresh-session keyboard shortcut + osascript receptiveness were not yet empirically verified — that condition still holds.

The Problem

ai/scripts/resumeHarness.mjs lines 100-108 (verified by direct file read):

const HARNESS_REGISTRY = {
    'antigravity-ide': { appName: 'Antigravity', adapter: 'osascript', freshSessionShortcut: 'n' },
    'claude-desktop':  { appName: 'Claude',      adapter: 'osascript', freshSessionShortcut: 'n', tabShortcut: '3' }
};
const identityMap = {
    '@neo-gemini-3-1-pro': 'antigravity-ide',
    '@neo-opus-4-7':       'claude-desktop'
};

Inline comment at lines 98-99:

"Codex Desktop deferred until @neo-gpt confirms its fresh-session shortcut + osascript receptiveness."

Error path at lines 113-116 fires when an unmapped identity reaches the registry:

if (!harnessTarget) {
    console.error(`Unknown harness target for identity: ${identity}`);
    process.exit(1);
}

Result: swarm-heartbeat.sh Phase 1 Recovery for @neo-gpt would log Phase 1 Recovery Triggered, then resumeHarness.mjs would emit Unknown harness target for identity: @neo-gpt to SWEEP_LOG and exit non-zero. The sunset is correctly detected but the recovery primitive can't dispatch.

AGENTS.md §14 documents the deferral:

"Identity coverage: @neo-gemini-3-1-pro and @neo-opus-4-7 shipped via #10611 PR-B (Cmd+N + boot-grounding prompt); @neo-gpt deferred until Codex Desktop fresh-session shortcut + osascript receptiveness are empirically verified. For uncovered identities, sunset still requires manual @tobiu intervention."

The Architectural Reality

Two-phase blocker, gated by empirical-then-implementation dependency:

Phase 1 (empirical / operator-territory): Codex Desktop's fresh-session keyboard shortcut needs verification. Candidate primitives:

  • Cmd+N (used by Antigravity + Claude Desktop — does Codex follow the same convention?)
  • Cmd+Shift+N
  • App-specific shortcut requiring its own probe

osascript receptiveness also needs verification: does tell application "Codex" to activate followed by the verified shortcut reliably open a fresh chat? Or does Codex have additional preconditions (sidebar state, focused composer pane, etc.) analogous to the in-place delivery path #10665 already fail-closes?

Phase 2 (implementation / agent-territory): Once Phase 1 lands empirical evidence, registry entries are mechanical:

  • HARNESS_REGISTRY['codex-desktop'] with verified appName, adapter, freshSessionShortcut, and any tabShortcut (if applicable)
  • identityMap['@neo-gpt'] pointing to 'codex-desktop'
  • Comment update at lines 98-99 reflecting the empirical landing

This phased structure mirrors how @neo-opus-4-7 Claude Desktop entry was added in #10611 PR-B (after Cmd+3 tabShortcut + Cmd+N empirical verification on Claude Desktop's macOS app).

The Fix

Phase 1 — Empirical verification (operator + @neo-gpt collaboration):

  • @tobiu or @neo-gpt manually probe Codex Desktop's fresh-session shortcut on macOS
  • Document the verified primitive in this ticket's comments (or as an attachment)
  • Document any preconditions (e.g., "sidebar must be in chat-list state", if applicable)

Phase 2 — Registry implementation:

  • Add entry to HARNESS_REGISTRY in ai/scripts/resumeHarness.mjs:
      'codex-desktop': { appName: 'Codex', adapter: 'osascript', freshSessionShortcut: '<verified>' /* + tabShortcut if applicable */ }
  • Add identityMap['@neo-gpt'] = 'codex-desktop'
  • Update inline comment at lines 98-99: replace deferral note with empirical reference
  • Update AGENTS.md §14 identity coverage line: @neo-gpt shipped via this ticket

Phase 3 — Test coverage:

  • Spec in test/playwright/unit/ai/scripts/resumeHarness.spec.mjs covering the new identity → registry mapping (mock osascript invocation; verify the right keystroke args are emitted)
  • If feasible, an end-to-end manual probe documented in the PR body (sunset trigger on @neo-gpt → fresh Codex session opens → boot-grounding prompt pastes → fresh agent boots correctly)

Acceptance Criteria

Phase 1 (verify):

  • Codex Desktop fresh-session keyboard shortcut empirically verified on macOS
  • osascript invocation pattern documented (tell application "Codex" to activate + identified shortcut)
  • Sidebar/composer-pane preconditions (if any) documented

Phase 2 (implement):

  • HARNESS_REGISTRY['codex-desktop'] entry added with verified primitives
  • identityMap['@neo-gpt'] entry added
  • Inline comment at resumeHarness.mjs lines 98-99 updated to reference Phase 1 empirical evidence
  • AGENTS.md §14 identity coverage line updated

Phase 3 (test):

  • Spec test in test/playwright/unit/ai/scripts/resumeHarness.spec.mjs covers @neo-gptcodex-desktop mapping path
  • PR body includes manual probe evidence (or empirical-test result reference) confirming end-to-end fresh-session-spawn flow on Codex
  • Process-boundary verify-effect: spawned Codex session's first real interaction confirms AGENTS_STARTUP.md was loaded by the fresh agent

Out of Scope

  • set_session_id rotation in boot-grounding prompt — separately tracked under #10627 (steady-state recovery hardening). #10627 fix MAY ship before or after this ticket; both are independent.
  • Bridge-daemon Codex focus-seed — already shipped via #10665 (fail-closed for in-place delivery without validated focusSeedKey). Different path: in-place delivery (bridge-daemon.mjs) vs fresh-session-spawn (resumeHarness.mjs). This ticket is only the latter.
  • MCP server staleness — Cmd+N alone does not refresh MCP server state (cached schemas, env, singletons, server code). Only full harness restart solves; this ticket is NOT a substitute for that boundary.
  • Codex r seed cleanup / identityRoots persistence — already shipped via #10666 / #10667.

Avoided Traps

  • Adding registry entry without empirical verification (skipping Phase 1) — would silently fail at osascript invocation time when an actual sunset triggers @neo-gpt recovery. The phased AC structure prevents this.
  • Conflating with bridge-daemon focus-seed work (#10665) — different substrate path. Bridge-daemon delivers wake events to EXISTING sessions; resumeHarness opens NEW sessions. This ticket is fresh-session-spawn only.
  • Conflating with set_session_id rotation (#10627) — orthogonal session-grouping concern. #10627 affects what the spawned agent does after boot; this ticket affects whether the spawn happens at all.
  • Defaulting Codex shortcut to Cmd+N without verification — Antigravity and Claude Desktop happen to share Cmd+N for fresh chat, but that's empirical not architectural. Codex may differ. Verify-before-assert applies.
  • Deferring AGENTS.md §14 update past Phase 2 merge — the doc-update is part of Phase 2 AC, not a follow-up. Documentation-substrate parity is required.

Related

  • Pairs with: #10611 (PR-B fresh-session-spawn substrate corrective; this ticket extends identity coverage)
  • Parent: #10601 (Auto-wakeup substrate for sunsetted agents recovery layer)
  • Orthogonal to: #10627 (set_session_id rotation), #10665 (bridge-daemon Codex focus-seed fail-closed)
  • Cross-references: AGENTS.md §14 (recovery substrate identity coverage); ai/scripts/resumeHarness.mjs lines 98-108
  • Empirical context: heartbeat reactivation Row 1 + Row 2 GREEN at #10650 IC_kwDODSospM8AAAABBE-bzQ + #10650 issuecomment-4367335662 + #10650 issuecomment-4367369169 (night-shift mode disposition declared)

Origin Session ID: f839713d-0e79-4599-b482-0b0e84fb8fd4

Retrieval Hint: query_raw_memories("Codex resumeHarness identityMap HARNESS_REGISTRY fresh-session shortcut deferral") + query_summaries("auto-wakeup substrate identity coverage Codex Desktop Cmd+N verification") + AGENTS.md §14 cross-reference