Skip to content

Conversation

@NTaylorMullen
Copy link
Collaborator

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

  • Modified packages/core/src/core/prompts.ts to update the Verify (Tests) and Interactive Commands instructions.
  • Updated test snapshots in packages/core/src/core/__snapshots__/prompts.test.ts.snap to match the new prompt content.
  • Reverted unintentional package-lock.json changes before submission.

Related Issues

None.

How to Validate

  1. Run the core package tests: npm test --workspace @google/gemini-cli-core
  2. Verify that all tests pass and snapshots match.
  3. (Optional) Run the agent and observe that it now tends to use vitest run or similar non-interactive flags when instructed to verify code changes.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run

- 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
@NTaylorMullen NTaylorMullen requested a review from a team as a code owner January 8, 2026 00:42
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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

  • Prompt Update for Non-Interactive Commands: The core system prompt has been updated to explicitly encourage the use of non-interactive commands (e.g., 'run once' or 'CI' flags) during verification steps.
  • Preventing Automation Stalls: This change is designed to prevent the agent from inadvertently starting persistent watch modes that can stall automation.
  • Instruction Modifications: Specific instructions within packages/core/src/core/prompts.ts for 'Verify (Tests)' and 'Interactive Commands' have been modified to reflect this preference.
  • Snapshot Updates: Test snapshots in packages/core/src/core/__snapshots__/prompts.test.ts.snap were updated to align with the new prompt content.
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.

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

  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.

Copy link
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 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.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Size Change: +239 B (0%)

Total Size: 22.3 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 22.3 MB +239 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 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-closed.sb 3.29 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

compressed-size-action

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Jan 8, 2026
@NTaylorMullen NTaylorMullen added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit b08b0d7 Jan 9, 2026
26 checks passed
@NTaylorMullen NTaylorMullen deleted the ntm/gh.non-interactive-prompt branch January 9, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants