fix(plan): prevent "Continue here" popup from repeating#9182
Closed
kagura-agent wants to merge 1 commit intoKilo-Org:mainfrom
Closed
fix(plan): prevent "Continue here" popup from repeating#9182kagura-agent wants to merge 1 commit intoKilo-Org:mainfrom
kagura-agent wants to merge 1 commit intoKilo-Org:mainfrom
Conversation
When "Continue here" is selected, a synthetic user message is injected with agent="code". shouldAskPlanFollowup now checks the last user message's agent — if it's not "plan", the follow-up prompt is skipped, preventing the popup from appearing repeatedly.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by gpt-5.4-20260305 · 560,954 tokens |
Author
|
Closing — this was fixed in #9245. Thanks! |
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.
Problem
When using plan mode, after the agent calls
plan_exitand presents the "Ready to implement?" prompt, selecting "Continue here" causes the popup to appear again repeatedly (fixes #9144).Root Cause
shouldAskPlanFollowupchecks whether any assistant message after the last user message contains a completedplan_exittool call. However, it does not account for the case where "Continue here" has already been selected — the injected synthetic user message (withagent: "code") should signal that the plan-to-code transition already happened.Fix
Added a guard in
shouldAskPlanFollowup: if the last user message's agent is not"plan", skip the follow-up prompt. When "Continue here" injects a user message withagent: "code", subsequent loop iterations will no longer trigger the popup.Changes
packages/opencode/src/kilocode/session/prompt.ts: Added agent check inshouldAskPlanFollowuppackages/opencode/test/kilocode/plan-exit-detection.test.ts: Added test verifying no re-trigger after "Continue here".changeset/fix-plan-exit-repeat.md: Patch changesetTesting
plan_exit, then injects a "Continue here" user message withagent: "code", and assertsshouldAskPlanFollowupreturnsfalse