fix: correct architect use of plan exit to save the plan file correctly#10798
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45b1a88153
ℹ️ 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".
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
ObservationsFix correctness (InstanceState.bind): Calling Architect condition: The condition InstanceState.bind for Session.plan: The Architect prompt text: The differentiated system-reminder for the architect agent (requiring the user to explicitly choose "Finalize and save the plan" or "Continue refining" before writing the plan file) is a reasonable guard to prevent premature plan saves. The relaxed Missing changeset (unchanged from previous review): This PR fixes a user-visible regression. A Files Reviewed (1 file)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 494,586 tokens Review guidance: REVIEW.md from base branch |
45b1a88 to
4d27232
Compare

Issue
N/A
Context
Fix CLI plan follow-up after plan_exit for Architect/plan-style flows. The plan file was saved successfully, but the CLI could stop without showing the “Ready to implement?” prompt when the follow-up needed to read the saved plan file.
Implementation
Bind the Kilo-owned plan follow-up entrypoint before running the async follow-up flow. This preserves the active instance context across the Effect.promise boundary, so PlanFollowup.ask can still resolve the saved plan path when it falls back to reading the plan file from disk.
Kept the fix in Kilo-owned code instead of changing shared opencode logic.
Screenshots / Video
How to Test
Reviewer test steps