fix(server): preserve root agent activity - #98
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5a107c7531
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| providerThreadId !== rootProviderThreadId); | ||
|
|
||
| if (belongsToChild && !shouldKeepChildNotification(notification)) { | ||
| if (childParentTurnId !== undefined && !shouldKeepChildNotification(notification)) { |
There was a problem hiding this comment.
Add regression tests for root and child notification routing
This changes backend notification classification without adding focused coverage; the existing CodexSessionRuntime.test.ts suite does not exercise root-versus-child routing. Add cases proving that a mismatched resumed-root thread retains messages/reasoning while explicitly discovered child threads suppress conversation events but retain allowed activity, so this fix cannot silently reintroduce either regression.
AGENTS.md reference: AGENTS.md:L101-L101
Useful? React with 👍 / 👎.
What Changed
collabAgentToolCallorsubAgentActivity.Why
The provider-thread mismatch heuristic could classify a resumed root thread as a child. That kept allowlisted commands and file changes while dropping root messages and reasoning. Explicit child relationships already identify the notifications that need filtering.
Checklist
gpt-5.6-sol via T3 Code.