-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Update system prompt to prefer non-interactive commands #16117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update Verify (Tests) instruction to prefer 'run once' or 'CI' modes - Update Interactive Commands instruction to always prefer non-interactive commands for automation - Update snapshots in core package tests
Summary of ChangesHello @NTaylorMullen, 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 enhances the robustness of automated verification by modifying the system prompt to strongly advocate for non-interactive command execution. By guiding agents to use 'run once' or 'CI' flags for tests, the change effectively mitigates issues arising from persistent watch modes, thereby streamlining automation workflows and improving overall system reliability. Highlights
Using Gemini Code AssistThe 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
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 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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this 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 core system prompt to more strongly encourage the agent to use non-interactive commands, particularly for test execution. The goal is to prevent the agent from getting stuck in watch modes, which can stall automation. The changes modify the 'Verify (Tests)' and 'Interactive Commands' sections of the prompt, making the instructions more directive and providing helpful examples like using 'run once' or 'CI' flags. The modifications are clear, directly address the stated problem, and are correctly reflected in the updated test snapshots. Overall, this is a solid improvement that should make the agent's behavior more reliable in automated environments.
|
Size Change: +239 B (0%) Total Size: 22.3 MB ℹ️ View Unchanged
|
Summary
Updates the core system prompt to explicitly encourage the use of non-interactive commands (e.g., 'run once' or 'CI' flags) during verification steps. This prevents the agent from inadvertently starting persistent watch modes that can stall automation.
Details
packages/core/src/core/prompts.tsto update the Verify (Tests) and Interactive Commands instructions.packages/core/src/core/__snapshots__/prompts.test.ts.snapto match the new prompt content.package-lock.jsonchanges before submission.Related Issues
None.
How to Validate
npm test --workspace @google/gemini-cli-corevitest runor similar non-interactive flags when instructed to verify code changes.Pre-Merge Checklist