feat: automatically enable non-interactive mode for AI agents - #10856
Open
joehan wants to merge 1 commit into
Open
feat: automatically enable non-interactive mode for AI agents#10856joehan wants to merge 1 commit into
joehan wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates src/command.ts to import and use the detectAIAgent utility from ./env. It modifies the condition for setting non-interactive mode to automatically enable it if an AI agent is detected (i.e., detectAIAgent() !== 'unknown'). There are no review comments, so I have no feedback to provide.
joehan
force-pushed
the
enable-noninteractive-agent-mode
branch
from
July 28, 2026 21:30
a396028 to
0321a49
Compare
joehan
force-pushed
the
enable-noninteractive-agent-mode
branch
from
July 28, 2026 23:13
17237cd to
5b87262
Compare
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.
This PR automatically sets options.nonInteractive = true when an AI agent is detected in the environment. This makes the CLI more usable for agents by failing fast instead of hanging on prompts.
Evaluation Results
We ran the complete 51-case evaluation suite in google3 (
firebase_tools_evals) to compare the baseline (origin/main) against this branch:main)enable-noninteractive)Note on Token Usage
Automatically enabling non-interactive mode increases token usage and turns because it prevents the agent from hanging on prompts. Instead of waiting and timing out, the agent receives immediate feedback and can use its remaining turns to actively troubleshoot and find alternative non-interactive flags (e.g. appending
--projector--non-interactiveexplicitly). This active recovery is what drove the 13.7% increase in pass rate.