Skip to content

fix: normalize restored Codex subagent events for Lody - #59

Open
Dante-dan wants to merge 1 commit into
LodyAI:mainfrom
Dante-dan:fix/1108-restored-subagent-bridge
Open

Dante-dan wants to merge 1 commit into
LodyAI:mainfrom
Dante-dan:fix/1108-restored-subagent-bridge

Conversation

@Dante-dan

Copy link
Copy Markdown

Problem

When Lody and Codex negotiate subagentEvents v1, live child activity passes through the adapter’s normalized event bridge. Restoring a Codex thread instead streamed subagent_spawned and subagent_state_update directly through the raw ACP connection. Lody’s receiver rejects those variants with Invalid params (LodyAI/Lody#1108).

Change

Route restored child history through the existing per-session bridge. Negotiated Lody clients receive root-owned snapshot and output events; clients using native ACP child sessions keep their existing transport. The load-session fixture now checks both modes, including restored output and a disconnected child.

Validation

  • npm test -- --run src/__tests__/CodexACPAgent/load-session.test.ts: 9 passed.
  • npm run typecheck and npm run build: passed.
  • Full npm test was attempted and interrupted after 14 failures in CodexAcpClient.test.ts and mcp-config-merge.test.ts; a representative Codex initialization failure (Codex process has exited with code 1) also reproduces on the unchanged base commit 0d7bb30. The remaining failures were not classified, so full-suite success is not claimed.

The issue’s exact UI effect was not independently verified; this patch addresses the observed protocol rejection on restoration.

Route replayed child history through the negotiated subagent event bridge so Lody receives the same lifecycle and output envelope as live turns.

Model: gpt-6-sol

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant