Skip to content

fix(core): Encourage non-interactive flags for scaffolding commands#18804

Merged
NTaylorMullen merged 2 commits intomainfrom
ntm/gh.enforce-non-interactive-scaffolding
Feb 15, 2026
Merged

fix(core): Encourage non-interactive flags for scaffolding commands#18804
NTaylorMullen merged 2 commits intomainfrom
ntm/gh.enforce-non-interactive-scaffolding

Conversation

@NTaylorMullen
Copy link
Copy Markdown
Collaborator

Summary

This PR updates the system prompt's New Applications workflow to explicitly enforce the use of non-interactive flags (like -y, --yes, or specific template flags like --template react-ts) when the agent utilizes scaffolding tools (e.g., npm create, npm init). This resolves an issue where the CLI would hang waiting for user input during application generation.

Details

  • Strengthened instructions in packages/core/src/prompts/snippets.ts warning that interactive wizards will hang the CLI environment unless bypassed.
  • Implemented a new ALWAYS_PASSES behavioral evaluation case (should use non-interactive flags when scaffolding a new app) in evals/interactive-hang.eval.ts to guarantee the model consistently avoids interactive hangs during project setup.

Related Issues

N/A

How to Validate

Run the behavioral evaluations:
npm run test:always_passing_evals -- -t "should use non-interactive flags when scaffolding a new app"

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
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

@NTaylorMullen NTaylorMullen requested a review from a team as a code owner February 11, 2026 09:26
@gemini-code-assist
Copy link
Copy Markdown
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 system's ability to create new applications by preventing command-line interface hangs during the scaffolding process. It achieves this by modifying the core prompts to explicitly instruct the agent to use non-interactive flags with scaffolding tools, thereby streamlining the automated application generation workflow.

Highlights

  • Enforced Non-Interactive Flags: Updated the system prompt's New Applications workflow to explicitly enforce the use of non-interactive flags (like -y, --yes, or specific template flags) when the agent utilizes scaffolding tools.
  • Prevented CLI Hangs: This change resolves an issue where the CLI would hang waiting for user input during application generation by ensuring scaffolding commands are non-interactive.
  • New Behavioral Evaluation: Implemented a new ALWAYS_PASSES behavioral evaluation case ('should use non-interactive flags when scaffolding a new app') to guarantee the model consistently avoids interactive hangs during project setup.
Changelog
  • evals/interactive-hang.eval.ts
    • Added a new evalTest case to validate that scaffolding commands use non-interactive flags.
  • packages/core/src/prompts/snippets.ts
    • Modified the newApplicationSteps function to include explicit instructions for using non-interactive flags with interactive scaffolding tools.
Activity
  • The pull request was authored by NTaylorMullen.
  • It includes a pre-merge checklist, with tests added/updated and MacOS validation completed.
  • Validation instructions are provided, suggesting running specific behavioral evaluations.
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.

@NTaylorMullen NTaylorMullen changed the title fix(core): enforce non-interactive flags for scaffolding commands fix(core): Encourage non-interactive flags for scaffolding commands Feb 11, 2026
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 correctly updates the system prompt to enforce non-interactive flags for scaffolding commands. However, the new behavioral evaluation test in evals/interactive-hang.eval.ts contains a critical flaw. It incorrectly attempts to validate the command arguments by testing against the raw JSON string of toolRequest.args instead of parsing it to access the command property, as required by the project's general rules. This makes the test unreliable. I've provided comments with suggestions to fix this.

Comment thread evals/interactive-hang.eval.ts
Comment thread evals/interactive-hang.eval.ts
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 11, 2026

Size Change: +754 B (0%)

Total Size: 24.4 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 24.4 MB +754 B (0%)
./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

compressed-size-action

@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 11, 2026
@NTaylorMullen NTaylorMullen force-pushed the ntm/gh.enforce-non-interactive-scaffolding branch from c5b6739 to 4ce8ec0 Compare February 12, 2026 00:43
- Updated `newApplicationSteps` system prompt instructions to strongly require non-interactive flags (e.g. `--yes`, `-y`, or `--template`) when executing application scaffolding CLI tools.
- Warned the model that omitting these flags for interactive tools will cause the environment to hang.
- Added `ALWAYS_PASSES` evaluation case to `evals/interactive-hang.eval.ts` to assert that non-interactive flags are successfully provided for `npm create` and similar commands.
@NTaylorMullen NTaylorMullen force-pushed the ntm/gh.enforce-non-interactive-scaffolding branch from 4ce8ec0 to 9e7afe6 Compare February 15, 2026 20:04
@NTaylorMullen NTaylorMullen force-pushed the ntm/gh.enforce-non-interactive-scaffolding branch from 9e7afe6 to 5866201 Compare February 15, 2026 20:14
@NTaylorMullen NTaylorMullen added this pull request to the merge queue Feb 15, 2026
Merged via the queue into main with commit 6eec9f3 Feb 15, 2026
27 checks passed
@NTaylorMullen NTaylorMullen deleted the ntm/gh.enforce-non-interactive-scaffolding branch February 15, 2026 20:33
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