Skip to content

feat(core): prioritize discussion before formal plan approval#24423

Merged
jerop merged 2 commits intomainfrom
feat/planning-discussion-first
Apr 1, 2026
Merged

feat(core): prioritize discussion before formal plan approval#24423
jerop merged 2 commits intomainfrom
feat/planning-discussion-first

Conversation

@jerop
Copy link
Copy Markdown
Contributor

@jerop jerop commented Apr 1, 2026

Update the planning workflow and tool definitions to ensure the agent discusses its strategy and reaches an informal agreement with the user before presenting the formal approval dialog via exit_plan_mode.

  • Mandate informal agreement in snippets.ts Step 2 (Consult) and Step 4 (Review & Approval).
  • Update exit_plan_mode declaration in dynamic-declaration-helpers.ts.
  • Align docs/cli/plan-mode.md and docs/tools/planning.md with the updated workflow.

Fixes #24420


image

@jerop jerop requested review from a team as code owners April 1, 2026 12:37
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a mandatory consultation step into the agent's planning workflow. By requiring the agent to discuss and reach an informal agreement with the user on the proposed strategy before drafting a formal plan or calling the exit tool, the changes ensure better alignment and reduce the likelihood of rework during the implementation phase.

Highlights

  • Workflow Update: Mandated an informal agreement phase between the agent and the user regarding the proposed strategy before proceeding to formal plan drafting or approval.
  • Tool Definition Changes: Updated the exit_plan_mode tool description to explicitly require prior informal agreement before it can be invoked.
  • Documentation Updates: Reflected the new planning workflow in both the CLI user guide and the internal planning tool documentation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

🧠 Model Steering Guidance

This PR modifies files that affect the model's behavior (prompts, tools, or instructions).

  • 🚀 Maintainer Reminder: Please ensure that these changes do not regress results on benchmark evals before merging.

This is an automated guidance message triggered by steering logic signatures.

@jerop jerop enabled auto-merge April 1, 2026 12:41
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Size Change: +702 B (0%)

Total Size: 26.6 MB

Filename Size Change
./bundle/chunk-CII4B2EB.js 0 B -14.7 MB (removed) 🏆
./bundle/chunk-CYVSTQJS.js 0 B -1.96 MB (removed) 🏆
./bundle/chunk-D6R4HQHL.js 0 B -3.82 MB (removed) 🏆
./bundle/core-YCZRPOEP.js 0 B -44.6 kB (removed) 🏆
./bundle/devtoolsService-GOYTQXKJ.js 0 B -28.4 kB (removed) 🏆
./bundle/interactiveCli-YNHUDISN.js 0 B -1.66 MB (removed) 🏆
./bundle/oauth2-provider-WKLRSQJB.js 0 B -9.16 kB (removed) 🏆
./bundle/chunk-FXAB4DBX.js 3.82 MB +3.82 MB (new file) 🆕
./bundle/chunk-R5X4CMUM.js 1.96 MB +1.96 MB (new file) 🆕
./bundle/chunk-T6XVWRSY.js 14.7 MB +14.7 MB (new file) 🆕
./bundle/core-5IA44GLW.js 44.6 kB +44.6 kB (new file) 🆕
./bundle/devtoolsService-JV5ZX3B4.js 28.4 kB +28.4 kB (new file) 🆕
./bundle/interactiveCli-6DUGGW5D.js 1.66 MB +1.66 MB (new file) 🆕
./bundle/oauth2-provider-ESYA2A7P.js 9.16 kB +9.16 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
./bundle/chunk-34MYV7JD.js 2.45 kB 0 B
./bundle/chunk-5AUYMPVF.js 858 B 0 B
./bundle/chunk-664ZODQF.js 124 kB 0 B
./bundle/chunk-DAHVX5MI.js 206 kB 0 B
./bundle/chunk-IUUIT4SU.js 56.5 kB 0 B
./bundle/chunk-RJTRUG2J.js 39.8 kB 0 B
./bundle/chunk-U4FACSVX.js 1.13 kB 0 B
./bundle/devtools-36NN55EP.js 696 kB 0 B
./bundle/dist-T73EYRDX.js 356 B 0 B
./bundle/events-CLX3JQHP.js 418 B 0 B
./bundle/gemini.js 532 kB 0 B
./bundle/getMachineId-bsd-TXG52NKR.js 1.55 kB 0 B
./bundle/getMachineId-darwin-7OE4DDZ6.js 1.55 kB 0 B
./bundle/getMachineId-linux-SHIFKOOX.js 1.34 kB 0 B
./bundle/getMachineId-unsupported-5U5DOEYY.js 1.06 kB 0 B
./bundle/getMachineId-win-6KLLGOI4.js 1.72 kB 0 B
./bundle/memoryDiscovery-ARMYW7PU.js 0 B -980 B (removed) 🏆
./bundle/multipart-parser-KPBZEGQU.js 11.7 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 222 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 229 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 13.4 kB 0 B
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B
./bundle/src-QVCVGIUX.js 47 kB 0 B
./bundle/tree-sitter-7U6MW5PS.js 274 kB 0 B
./bundle/tree-sitter-bash-34ZGLXVX.js 1.84 MB 0 B
./bundle/memoryDiscovery-VL3OH25S.js 980 B +980 B (new file) 🆕

compressed-size-action

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Plan Mode workflow to require an informal agreement between the agent and the user on a proposed strategy before a formal plan is drafted or finalized. These changes are reflected in the documentation, tool definitions, and the core system prompt. A review comment suggests refining the prompt in packages/core/src/prompts/snippets.ts by removing the 'in a PREVIOUS turn' constraint, as it may cause unnecessary delays if the user provides agreement in the current turn, while the existing critical rule already prevents premature execution during the initial proposal.

Comment thread packages/core/src/prompts/snippets.ts Outdated
Update the planning workflow and tool definitions to ensure the agent discusses its strategy and reaches an informal agreement with the user before presenting the formal approval dialog via exit_plan_mode.

- Mandate informal agreement in snippets.ts Step 2 (Consult) and Step 4 (Review & Approval).
- Update exit_plan_mode declaration in dynamic-declaration-helpers.ts.
- Align docs/cli/plan-mode.md and docs/tools/planning.md with the updated workflow.
@jerop jerop force-pushed the feat/planning-discussion-first branch from f133f72 to d49deca Compare April 1, 2026 12:52
@gemini-cli gemini-cli Bot added area/core Issues related to User Interface, OS Support, Core Functionality area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/security Issues related to security area/enterprise Issues related to Telemetry, Policy, Quota / Licensing 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. labels Apr 1, 2026
Comment thread packages/core/src/prompts/snippets.ts
Comment thread packages/core/src/prompts/snippets.ts
@jerop jerop added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit ca43f8c Apr 1, 2026
27 of 28 checks passed
@jerop jerop deleted the feat/planning-discussion-first branch April 1, 2026 16:25
kalenkevich pushed a commit to kalenkevich/gemini-cli that referenced this pull request Apr 3, 2026
afanty2021 pushed a commit to afanty2021/gemini-cli that referenced this pull request Apr 4, 2026
warrenzhu25 pushed a commit to warrenzhu25/gemini-cli that referenced this pull request Apr 9, 2026
mahimashanware added a commit that referenced this pull request Apr 17, 2026
Updates 'should transition from plan mode to normal execution' eval to align with the new 'informal agreement' prompt mandate introduced in PR #24423, fixing flakiness.
mahimashanware added a commit that referenced this pull request Apr 20, 2026
Updates 'should transition from plan mode to normal execution' eval to align with the new 'informal agreement' prompt mandate introduced in PR #24423, fixing flakiness.
mahimashanware added a commit that referenced this pull request Apr 21, 2026
Updates 'should transition from plan mode to normal execution' eval to align with the new 'informal agreement' prompt mandate introduced in PR #24423, fixing flakiness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent Issues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Quality area/core Issues related to User Interface, OS Support, Core Functionality area/enterprise Issues related to Telemetry, Policy, Quota / Licensing area/security Issues related to security 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prioritize discussion and informal agreement before formal Plan Mode approval

4 participants