Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
When a child thread waits on a pending interaction, the server wakes its parent agent with the "child thread needs attention" system message. Its last instruction was "Otherwise, ask the user for the missing decision." So a top-level parent that couldn't answer from context asked the user again, sometimes with its own blocking question card under the child's, duplicating the question the user already sees and answers from the parent's child threads prompt.
What changed
packages/templates/src/templates/system-message-child-thread-needs-attention.md: the parent still replies to the child with guidance when it can resolve the blocker from context. Otherwise, the closing instruction depends on a new optionalparentIsChildThreadtemplate variable:apps/server/src/internal/interactive-requests.ts: when it queues the notification, the server loads the parent thread and sets the flag when that parent is a parent-notifiable child (isParentNotifiableChildThread, the same predicate that decides whether its own questions reach its parent).child-thread-notifications.tspasses it to the template. The server makes this choice; the agent doesn't have to work out where it sits.templates.test.tsrenders both variants exactly. A new route test ininternal-interactive-requests.test.tsregisters a pending interaction on a leaf in a top → middle → leaf chain and asserts the middle parent gets the "ask the user" variant. The existing top-level route test still asserts the quiet variant, and the remaining call sites pass the new argument.Server-owned prompt text and server-side variant selection only. The notification is still sent, and the "needs attention" timeline row is unchanged. No API, SDK, CLI, DB, or daemon protocol changes.
How you verified
CI runs remotely. I checked it live on this branch's dev app (
pnpm dev, isolated data dir) with Claude Code Sonnet 5.5 threads. Each leaf or child was told "Use AskUserQuestion to ask me which color to use, Red or Blue."9a47d42c78)bb thread tell <child> 'Use Blue. The user has already decided the color is Blue.'bb thread tell <child> 'Use Blue.'2-level, before: the parent re-asks the child's question
2-level, after: the parent leaves the question to the user and writes one line
3-level, before (top thread): the middle's question arrives and the top asks it a third time
3-level, after (top thread): the middle's question still reaches the top; the top adds one line and no extra question
QA checklist
bb thread tell <child>with guidance ("Use Blue.")BB-Thread: Stop parents re-asking child questions
🤖 Generated with Claude Code