Skip to content

fix: recover recorded paths for known subagents - #687

Merged
benbrandt merged 1 commit into
mainfrom
fix/subagent-replay-parent-paths
Oct 26, 2026
Merged

benbrandt merged 1 commit into
mainfrom
fix/subagent-replay-parent-paths

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

Small replay omission found while auditing the completed #655 extraction after #686 merged. All eight planned slices are already on main; this is a narrowly scoped correctness follow-up, not another feature tranche.

A legacy spawnAgent record can establish a coordinator's identity and parent without an agent path. Later replay may supply that coordinator's path and newly recorded nested child activity. Previously announceHistory returned immediately for the known coordinator, discarding the available path. The nested activity then could not resolve its immediate parent, so valid descendant history was omitted with a gap advisory.

Fill a known child's missing normalized path from recorded activity before descending into its history. Do not replace an already observed path with older history. Identities, established parent links, titles, runtime ownership, capabilities, AIR behavior, and v1/v2 negotiation remain unchanged.

2 files, +39/-1 lines. No snapshot changes.

Regression evidence

  • Four v1/v2 warm/cold replay cases failed on current main before the fix: a live or restored pathless coordinator prevented newly recovered descendant text from replaying.
  • Those four cases now replay the text under the correct immediate parent without a false gap.
  • Two additional v1/v2 cases preserve an already observed parent path when an older spawn record disagrees.

Validation

  • npm run typecheck
  • npm test: 2,070 passed, 39 skipped
  • npm run build
  • npm run test:integration: 15 passed against real Codex 0.164.0 with a local mock Responses API
  • npm run bundle:all: all six targets compiled
  • git diff --check

The full live-model E2E suite and an additional live-model smoke test were not run for this fix. Cross-platform bundles were compiled, not executed on each target OS.

Audit context

The remaining old #655 diff largely reflects replaced implementations, differently organized tests/snapshots, and intervening trunk work such as native model reporting. In particular its older queue-completion helper and model implementation must not replace the corrected trunk versions. The combined PR should not be merged wholesale.

Checked current specification revision c0897908cb2305e89203218c348d69ab4acf9d61. This fix retains the RFD's truthful identity, parentage, and parent-before-child replay ordering; it adds no wire fields or mutation authority.

@benbrandt
benbrandt merged commit 6cce035 into main Oct 26, 2026
6 checks passed
@benbrandt
benbrandt deleted the fix/subagent-replay-parent-paths branch October 26, 2026 15:51
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