Skip to content

Fix Codex subagent events leaking into the main feed - #3286

Merged
SawyerHood merged 1 commit into
mainfrom
bb/thr_9b4g2k4tfd
Sep 8, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/thr_9b4g2k4tfd

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The timeline discarded parent links while projecting compaction lifecycle events, so subagent compactions appeared in the main feed. The Codex adapter also rejected subAgentActivity items with kind: "completed", producing duplicate “Unhandled Codex event” diagnostics alongside the existing agent completion summary.

What changed

Preserve explicit and inherited parent links throughout compaction projection, including completion-only events. Recognize Codex's completion activity notifications and consume them without duplicating the delegation lifecycle already settled by the child turn. Root-agent compactions remain visible in the main feed. Previously persisted diagnostic rows are unchanged.

How you verified

  • pnpm exec turbo run test typecheck --filter=@bb/thread-view --filter=bb-plugin-provider-codex: 651 tests and both typechecks passed.
  • Added regression coverage for explicit/inherited nesting, completion-only compactions, concurrent root compaction, and duplicate Codex completion notifications.
  • Replayed the reported thread's saved events locally: all three compactions remain nested, zero compactions appear at the root, and all 18 completion activity notifications produce zero unhandled deltas. Raw thread data was not committed.
  • Formatting and git diff --check passed.
  • Secret-model scan: clean working tree, HEAD, added lines, and commit messages for origin/main..HEAD.

AGENT GENERATED

@SawyerHood
SawyerHood merged commit ebe9d9d into main Sep 8, 2026
16 checks passed
@SawyerHood
SawyerHood deleted the bb/thr_9b4g2k4tfd branch September 8, 2026 21:30
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