fix(parent-wake): reuse prompt gate assistant blocking#4288
Open
SpencerJung wants to merge 1 commit into
Open
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Auto-approved: This change replaces a tool-wait-only check with the same shared predicate already used in the prompt gate, adding a test for the missing streaming/unknown finish case, so the logic is strictly more correct and cannot introduce regressions.
Re-trigger cubic
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.
Summary
finish: unknown.Changes
latestAssistantTurnBlocksInternalPromptfrom the shared prompt gate.ParentWakeNotifierinstead of the narrower tool-wait-only check.Testing
bun test packages/ast-grep-mcp/src/sg-cli-path.test.ts src/features/background-agent/parent-wake-user-message-race.test.ts src/features/background-agent/parent-wake-active-turn-event.test.ts src/features/background-agent/parent-wake-same-source-requeue.test.ts src/hooks/todo-continuation-enforcer/todo-continuation-enforcer.test.ts src/cli/run/output-renderer.test.ts src/shared/agent-display-names.test.ts bun run typecheck bun run buildRelated Issues
Refs #4164
Refs #4167
Refs #4169
Summary by cubic
Blocks parent wake prompts when the latest assistant turn is incomplete (tool wait, streaming, or finish: unknown) by reusing the shared prompt gate predicate. Fixes a race that injected parent wakes while an assistant response was still in progress (refs #4164, #4167, #4169).
latestAssistantTurnBlocksInternalPromptinParentWakeNotifier(replaces tool-wait-only check).Written for commit f217603. Summary will update on new commits. Review in cubic