Plan mode upgrade: in-conversation plan tracker, one-click approval, and reasoning-effort tiers#29
Merged
Merged
Conversation
…d per-provider reasoning-effort tiers - Add an update_plan tool for the main agent: on complex multi-step tasks it maintains a step checklist rendered as a slim plan bar above the chat input (Codex-style), keeps executing in the same turn, and marks steps completed as it goes; simple Q&A never triggers it - Manual plan mode: the preview card now ships Confirm / Discard buttons (typed confirmation still works); decisions are reflected on the card - Plan prompts now instruct the model to append a verify-and-fix step for tasks with checkable deliverables (plan-execute-verify), fixing issues in place instead of only reporting them - Fix reasoning leak: re-arm the <think> stripper on plan_update events and strip orphan closing tags in plan-step outputs, so hybrid reasoning models that omit the opening tag no longer leak chain-of-thought into the answer - Model providers: new supports_reasoning_effort switch unlocks High / Max thinking tiers per chat provider (sent via chat_template_kwargs) - Community edition: hide the admin tag on globally installed plugins
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
This PR upgrades plan mode along three axes and fixes a reasoning-leak bug uncovered along the way.
In-conversation plan tracker (
update_plan)The main agent now carries a lightweight
update_plantool. On complex multi-step tasks it lays out a step checklist before starting, keeps executing in the same turn (no redirect, no approval round-trip), and updates step states as it works. The checklist renders as a slim plan bar pinned above the chat input — with a determinate progress ring, the current step, and an expandable step list — instead of cluttering the message flow. Simple Q&A never triggers it.One-click approval for manual plan mode
The plan preview card now ships Confirm / Discard buttons (typed confirmation still works as a fallback). The decision is reflected on the card, and execution progress is mirrored into the same plan bar.
Plan-Execute-Verify
Plan prompts now instruct the model to append a final verify-and-fix step whenever the task has checkable deliverables (generated files, code, data processing): open the artifacts, check them against the acceptance criteria, and fix problems in place rather than merely reporting them. Whether and how to verify is the model's call — nothing is hard-coded.
Fix: reasoning chain leaking into the answer
Hybrid reasoning models often omit the opening
<think>tag after tool calls. The frontend stripper re-arms on tool results, butupdate_planintentionally emits no tool events — so the next iteration's bare reasoning leaked into the visible answer. The stripper now also re-arms onplan_updateevents, and plan-step outputs strip orphan closing tags as a belt-and-braces measure.Misc
chat_template_kwargs).Testing
update_planchecklists across research/spreadsheet/slide tasks, and a negative control confirming simple questions don't trigger planning.npm run buildand backend import checks pass.