fix(plan): Show implementation suggestions only when LLM has all the information#6240
fix(plan): Show implementation suggestions only when LLM has all the information#6240alex-alecu merged 4 commits intomainfrom
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewThis PR refactors the
The permission model is sound: Files Reviewed (8 files)
|
| ...(config.experimental?.batch_tool === true ? [BatchTool] : []), | ||
| ...(Flag.KILO_EXPERIMENTAL_PLAN_MODE && Flag.KILO_CLIENT === "cli" ? [PlanExitTool, PlanEnterTool] : []), | ||
| PlanExitTool, // kilocode_change - always registered; gated by agent permission instead | ||
| ...(Flag.KILO_EXPERIMENTAL_PLAN_MODE && Flag.KILO_CLIENT === "cli" ? [PlanEnterTool] : []), |
There was a problem hiding this comment.
What about desktop and other clients, or is that irrelevant? What about extension next?
There was a problem hiding this comment.
I will handle them manually in a feature PR, I have not tested them yet
|
|
||
| // Fall back to plan file on disk | ||
| const session = await Session.get(input.sessionID) | ||
| const file = Bun.file(Session.plan(session)) |
There was a problem hiding this comment.
Do we read the complete plan always? Also if it's really large? Could that be the case?
There was a problem hiding this comment.
The plan will rarely be large, it can still happen
| PlanExitTool, // kilocode_change - always registered; gated by agent permission instead | ||
| ...(Flag.KILO_EXPERIMENTAL_PLAN_MODE && Flag.KILO_CLIENT === "cli" ? [PlanEnterTool] : []), |
There was a problem hiding this comment.
Why is PlanEnterTool experimental and PlanExitTool not? Wondering what happens if the flag is triggered by the users
There was a problem hiding this comment.
@marius-kilocode PlanExitTool was experimental too before this PR - I am not sure why, but I though it's a good candidate for this issue.
There was a problem hiding this comment.
So what if the flag is enabled or disabled, will planning be broken?
There was a problem hiding this comment.
PlanExitTool was promoted from experimental to to standard, so the flag KILO_EXPERIMENTAL_PLAN_MODE will do nothing for it.
A merge conflict resolution incorrectly gated PlanExitTool behind KILO_EXPERIMENTAL_PLAN_MODE && KILO_CLIENT === "cli", preventing the plan agent from signaling completion. This broke the "looks good, implement" flow — the follow-up prompt never appeared and no new code-mode session was created. Regression of #6240.
Context
#6218
#6143
This PR #6007 introduced suggestions after planning (similar to what Claude Code does), but sometimes the LLM expects some answers from the user and instead of showing just the input text, we display the implement suggestions.
We need to show the implement suggestions only when we are 100% sure we have all the info necessary.
Implementation
Move out of experimental the tool call
plan_exit. We can add another tool call, but since we already have this in place, we might just as well use it.When
plan_exitis called, the LLM is sure the plan is ready in its opinion. We add the suggestions to start the implementation only whenplan_exitis invoked.Screenshots
Users are choosing ~equally all options at the moment. After this change we should show less custom/dismiss in posthog
How to Test
Ask the CLI to add a greetings prompt when Kilo is opened while in
PLANmode. Look for the implement suggestions at the end.Get in Touch
We'd love to have a way to chat with you about your changes if necessary. If you're in the Kilo Code Discord, please share your handle here.