Skip to content

Comments

Merge Commit pull of request into krsjenmt/gemini-cli from google-gemini/gemini-cli#37

Merged
krsjenmt merged 23 commits intokrsjenmt:patch-1from
google-gemini:main
Feb 12, 2026
Merged

Merge Commit pull of request into krsjenmt/gemini-cli from google-gemini/gemini-cli#37
krsjenmt merged 23 commits intokrsjenmt:patch-1from
google-gemini:main

Conversation

@krsjenmt
Copy link
Owner

Summary

Details

Related Issues

How to Validate

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

braddux and others added 23 commits February 11, 2026 17:29
Co-authored-by: Jerop Kipruto <jerop@google.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @krsjenmt, 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 updates the Gemini CLI to its latest stable and preview versions, bringing a suite of new features and stability improvements. The changes focus on enhancing user interaction through new commands and UI refinements, expanding integration capabilities with new IDE support, and strengthening the underlying security and agent functionalities. Significant effort has been made to improve the planning workflow and ensure a more reliable and efficient developer experience.

Highlights

  • Commands & UX Enhancements: Introduced a new /prompt-suggest slash command, updated undo/redo keybindings, and implemented automatic theme switching based on terminal background.
  • Expanded IDE Support: Added compatibility with Positron IDE, broadening integration options for developers.
  • Enhanced Security & Authentication: Implemented interactive and non-interactive OAuth consent for MCP servers and included auth method in bug reports, improving security and diagnostic capabilities.
  • Advanced Planning & Agent Tools: Integrated a generic Checklist component for structured task management, evolved subagent capabilities with dynamic policy registration, and introduced dedicated enter_plan_mode and exit_plan_mode tools.
  • Improved Core Stability & Reliability: Resolved critical environment loading, authentication, and session management issues, ensuring a more robust experience, and enabled background execution of shell commands.
  • Documentation Updates: Updated changelogs for v0.28.0 stable and v0.29.0-preview.0 releases, deprecated allowedTools and excludeTools in favor of the Policy Engine, and added comprehensive documentation for the new ask_user and Plan Mode tools.
Changelog
  • docs/changelogs/index.md
    • Added announcements for v0.28.0, detailing new slash commands, IDE support, customization options, and authentication improvements.
  • docs/changelogs/latest.md
    • Updated the latest stable release version to v0.28.0 and its release date.
    • Revised highlights to reflect new commands, IDE support, security enhancements, planning tools, core stability, and background shell commands.
    • Updated the full changelog link.
  • docs/changelogs/preview.md
    • Updated the preview release version to v0.29.0-preview.0 and its release date.
    • Revised highlights to focus on Plan Mode enhancements, core agent improvements, CLI UX/UI updates, tooling/extension updates, bug fixes, and context/tool output management.
    • Updated the full changelog link.
  • docs/cli/cli-reference.md
    • Deprecated --allowed-tools CLI option, directing users to the Policy Engine.
  • docs/cli/enterprise.md
    • Updated documentation to recommend the Policy Engine over tools.exclude for blocklisting.
  • docs/cli/plan-mode.md
    • Expanded Plan Mode documentation to include details on customizing planning with skills and policies.
    • Updated tool references to use bracketed links.
  • docs/core/policy-engine.md
    • Added plan mode to the list of approval modes and linked to new Plan Mode Policies documentation.
  • docs/extensions/reference.md
    • Removed the 'experimental feature' note for extension settings.
  • docs/get-started/configuration-v1.md
    • Marked allowedTools and excludeTools as deprecated, advising migration to the Policy Engine.
  • docs/get-started/configuration.md
    • Updated model configurations to use gemini-3-flash-base and gemini-3-pro-preview for various aliases, replacing gemini-2.5-flash-base and gemini-2.5-pro.
  • docs/tools/ask-user.md
    • Added new documentation for the ask_user tool, detailing its parameters, behavior, output, and usage examples for multiple-choice, text input, and Yes/No questions.
  • docs/tools/index.md
    • Added 'Planning Tools' and 'Ask User Tool' to the list of built-in tools.
  • docs/tools/mcp-server.md
    • Removed environment variable redaction and untrusted server warnings from MCP security considerations.
  • docs/tools/planning.md
    • Added new documentation for enter_plan_mode and exit_plan_mode tools, describing their parameters, behavior, output, and confirmation requirements.
  • docs/tools/shell.md
    • Marked tools.exclude as deprecated for shell commands, recommending the Policy Engine.
  • evals/frugalSearch.eval.ts
    • Added a new evaluation test to verify that the agent uses search tools efficiently by limiting results.
  • packages/cli/src/commands/mcp/add.ts
    • Removed a security warning related to stdio transport for MCP servers.
  • packages/cli/src/config/config.ts
    • Updated the description for the --allowed-tools CLI option to mark it as deprecated and refer to the Policy Engine.
    • Modified isWorkspaceTrusted to pass headless options.
    • Adjusted isHeadlessMode check for interactive mode.
  • packages/cli/src/config/settings.test.ts
    • Added tests for LoadedSettings reactivity and snapshots, verifying stable references and new snapshot creation on changes.
  • packages/cli/src/config/settings.ts
    • Introduced LoadedSettingsSnapshot interface and implemented snapshotting and subscription mechanisms for reactive settings updates.
  • packages/cli/src/config/trustedFolders.test.ts
    • Added a test case to ensure isPathTrusted returns true when isHeadlessMode is true.
  • packages/cli/src/config/trustedFolders.ts
    • Modified isPathTrusted and isWorkspaceTrusted to consider headless mode options.
  • packages/cli/src/gemini.test.tsx
    • Refactored environment variable stubbing and cleanup logic in gemini.tsx tests.
    • Adjusted registerCleanup call count.
  • packages/cli/src/gemini.tsx
    • Removed enterAlternateScreen and disableLineWrapping calls from startInteractiveUI and added enableLineWrapping.
    • Introduced a delay for shpool sessions before rendering the TUI.
    • Added warnings for deprecated allowedTools and excludeTools settings.
    • Simplified raw mode cleanup.
  • packages/cli/src/test-utils/mockConfig.ts
    • Added isInitialized to mock config.
  • packages/cli/src/ui/App.test.tsx
    • Removed isEventDrivenSchedulerEnabled mock.
  • packages/cli/src/ui/AppContainer.test.tsx
    • Updated imports to use useToolScheduler.js instead of useReactToolScheduler.js.
    • Removed useKeypress mock.
    • Refactored keyboard input handling tests to use stdin.write directly.
  • packages/cli/src/ui/AppContainer.tsx
    • Added KeypressPriority import.
    • Modified config.initialize() to only run if not already initialized.
    • Removed copyModeEnabled from handleGlobalKeypress dependencies.
    • Added a separate useKeypress hook for copy mode with critical priority.
  • packages/cli/src/ui/components/AlternateBufferQuittingDisplay.tsx
    • Removed useConfig import and isEventDrivenSchedulerEnabled check.
  • packages/cli/src/ui/components/HistoryItemDisplay.tsx
    • Removed isFocused prop.
  • packages/cli/src/ui/components/MainContent.tsx
    • Removed useConfig import and isEventDrivenSchedulerEnabled check.
    • Removed isFocused and uiState.isEditorDialogOpen from dependencies.
  • packages/cli/src/ui/components/messages/ToolConfirmationMessageOverflow.test.tsx
    • Removed file.
  • packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx
    • Removed createMockSettings import.
    • Removed isFocused prop from baseProps.
    • Removed enableEventDrivenScheduler from baseMockConfig.
    • Removed tests related to isFocused, pending tool border, and event-driven scheduler specific confirmation handling.
    • Updated snapshot for multiple tool calls.
    • Added test for AskUser tool rendering nothing when in progress.
  • packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
    • Removed ToolConfirmationMessage import and TOOL_CONFIRMATION_INTERNAL_PADDING.
    • Removed isFocused prop.
    • Simplified visibleToolCalls logic by removing isEventDriven check.
    • Removed toolAwaitingApproval logic and related emphasis calculation.
    • Removed ToolConfirmationMessage rendering.
  • packages/cli/src/ui/contexts/KeypressContext.tsx
    • Introduced KeypressPriority enum.
    • Refactored subscribe and unsubscribe to manage subscribers by priority level.
    • Modified broadcast to process handlers based on sorted priorities.
  • packages/cli/src/ui/contexts/SettingsContext.test.tsx
    • Added new test file for SettingsContext and useSettingsStore, verifying initial state, scope access, re-renders on changes, setValue calls, and error handling.
  • packages/cli/src/ui/contexts/SettingsContext.tsx
    • Refactored useSettings to return LoadedSettings type.
    • Introduced SettingsState and SettingsStoreValue interfaces.
    • Implemented useSettingsStore using useSyncExternalStore for reactive settings updates, including forScope helper and setSetting function.
  • packages/cli/src/ui/hooks/snapshots/useToolScheduler.test.ts.snap
    • Removed file.
  • packages/cli/src/ui/hooks/useGeminiStream.test.tsx
    • Removed isEventDrivenSchedulerEnabled mock.
  • packages/cli/src/ui/hooks/useKeypress.ts
    • Updated useKeypress to accept KeypressPriority or boolean for priority.
  • packages/cli/src/ui/hooks/useReactToolScheduler.test.ts
    • Removed file.
  • packages/cli/src/ui/hooks/useReactToolScheduler.ts
    • Removed file.
  • packages/cli/src/ui/hooks/useShellInactivityStatus.ts
    • Updated import to useToolScheduler.js.
  • packages/cli/src/ui/hooks/useToolExecutionScheduler.test.ts
    • Removed file.
  • packages/cli/src/ui/hooks/useToolExecutionScheduler.ts
    • Removed file.
  • packages/cli/src/ui/hooks/useToolScheduler.test.ts
    • Updated import to useToolScheduler.js.
    • Refactored tests to use useToolScheduler directly, verifying tool call updates, onConfirm injection, responseSubmittedToGemini flag persistence, lastToolOutputTime updates, cancelAll delegation, and promise resolution.
    • Added test for multi-scheduler support.
  • packages/cli/src/ui/hooks/useToolScheduler.ts
    • Refactored useToolScheduler to directly implement the event-driven Core Scheduler logic, including toolCallsMap state, messageBus subscription, onComplete handling, cancelAll, markToolsAsSubmitted, and setToolCallsForDisplay logic.
    • Defined adaptToolCalls for UI metadata injection.
  • packages/cli/src/ui/hooks/useTurnActivityMonitor.test.ts
    • Updated import to useToolScheduler.js.
  • packages/cli/src/ui/hooks/useTurnActivityMonitor.ts
    • Updated import to useToolScheduler.js.
  • packages/cli/src/ui/utils/InlineMarkdownRenderer.test.ts
    • Removed file.
  • packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
    • Removed stringWidth import and getPlainTextLength utility function.
  • packages/cli/src/utils/devtoolsService.test.ts
    • Updated toggleDevToolsPanel tests to reflect new logic: closing when already open, not opening when browser launches successfully, and opening when browser fails to launch.
  • packages/cli/src/utils/devtoolsService.ts
    • Modified toggleDevToolsPanel logic to handle isOpen state: if open, toggles off; if closed, attempts to launch browser and only opens panel if browser launch fails or is not possible.
  • packages/core/src/agents/agentLoader.test.ts
    • Added extensive tests for remote agent authentication configuration (apiKey, http Bearer, http Basic), including validation for missing fields and conversion to internal A2AAuthConfig type.
  • packages/core/src/agents/agentLoader.ts
    • Added FrontmatterAuthConfig interface and authConfigSchema for validating remote agent authentication in frontmatter.
    • Implemented convertFrontmatterAuthToConfig to map frontmatter auth to internal A2AAuthConfig.
  • packages/core/src/agents/auth-provider/base-provider.ts
    • Added JSDoc comments for BaseA2AAuthProvider methods and properties.
  • packages/core/src/agents/auth-provider/value-resolver.test.ts
    • Added new test file for value-resolver.ts, covering resolution of environment variables, shell commands, literal values, escaped literals, needsResolution checks, and maskSensitiveValue functionality.
  • packages/core/src/agents/auth-provider/value-resolver.ts
    • Added new utility file value-resolver.ts for resolving authentication values from environment variables, shell commands, or literal strings, including escaping and masking sensitive values.
  • packages/core/src/availability/fallbackIntegration.test.ts
    • Modified test to expect fallback to Flash for Gemini 3 models even if config is not in AUTO mode.
  • packages/core/src/availability/policyHelpers.test.ts
    • Added test case to proactively return Gemini 2.5 chain if Gemini 3 is requested but the user lacks access.
  • packages/core/src/availability/policyHelpers.ts
    • Modified resolvePolicyChain to check hasAccessToPreview for Gemini 3 models and proactively downgrade to Gemini 2.5 chain if access is denied.
  • packages/core/src/config/config.test.ts
    • Added a test to ensure subagents are registered as tools even if not explicitly in allowedTools.
  • packages/core/src/config/config.ts
    • Marked allowedTools and excludeTools as deprecated in ConfigParameters and Config class.
    • Added isInitialized() method.
    • Modified getExcludeTools() to include policy exclusions.
    • Removed isAllowed check for subagent tool registration.
  • packages/core/src/config/defaultModelConfigs.ts
    • Updated default model configurations to use gemini-3-flash-base and gemini-3-pro-preview for various aliases, replacing gemini-2.5-flash-base and gemini-2.5-pro.
  • packages/core/src/core/snapshots/prompts.test.ts.snap
    • Added 'Context Efficiency' section to core system prompt snapshots.
  • packages/core/src/policy/config.test.ts
    • Added a test to verify that user policies can override Plan Mode's default deny rules for specific tools like run_shell_command and codebase_investigator.
  • packages/core/src/policy/policies/plan.toml
    • Updated deny_message for Plan Mode and explicitly allowed activate_skill tool.
  • packages/core/src/policy/policy-engine.test.ts
    • Added extensive test cases for getExcludedTools method, covering various rule combinations, priorities, approval modes, and wildcard patterns.
    • Added a test for Plan Mode allowing activate_skill but denying shell commands.
  • packages/core/src/policy/policy-engine.ts
    • Added isWildcardPattern, getWildcardPrefix, and matchesWildcard helper functions.
    • Implemented getExcludedTools method to determine tools effectively denied by policies, considering global rules, priorities, and approval modes.
  • packages/core/src/prompts/snippets.ts
    • Added a 'Context Efficiency' section to the renderCoreMandates function.
  • packages/core/src/services/environmentSanitization.test.ts
    • Removed GEMINI_API_KEY, GOOGLE_API_KEY, and GOOGLE_APPLICATION_CREDENTIALS from sensitive environment variables in tests.
  • packages/core/src/services/environmentSanitization.ts
    • Removed GEMINI_API_KEY, GOOGLE_API_KEY, and GOOGLE_APPLICATION_CREDENTIALS from NEVER_ALLOWED_ENVIRONMENT_VARIABLES.
  • packages/core/src/services/shellExecutionService.ts
    • Added GEMINI_CLI_IDENTIFICATION_ENV_VAR and GEMINI_CLI_IDENTIFICATION_ENV_VAR_VALUE constants.
    • Modified ShellExecutionService to include this environment variable in spawned processes.
  • packages/core/src/services/test-data/resolved-aliases-retry.golden.json
    • Updated model configurations to use gemini-3-flash-base and gemini-3-pro-preview for various aliases, replacing gemini-2.5-flash-base and gemini-2.5-pro.
  • packages/core/src/services/test-data/resolved-aliases.golden.json
    • Updated model configurations to use gemini-3-flash-base and gemini-3-pro-preview for various aliases, replacing gemini-2.5-flash-base and gemini-2.5-pro.
  • packages/core/src/tools/definitions/snapshots/coreToolsModelSnapshots.test.ts.snap
    • Added exclude_pattern and names_only parameters to grep_search tool definition snapshots.
  • packages/core/src/tools/definitions/coreTools.ts
    • Added exclude_pattern and names_only parameters to GREP_DEFINITION.
  • packages/core/src/tools/grep.test.ts
    • Added tests for grep tool to verify names_only functionality and exclude_pattern filtering.
  • packages/core/src/tools/grep.ts
    • Added exclude_pattern and names_only to GrepToolParams.
    • Modified GrepToolInvocation to implement names_only output and exclude_pattern filtering.
    • Added validation for exclude_pattern.
  • packages/core/src/tools/mcp-client.test.ts
    • Updated createTransport test to use generic FOO env var instead of GEMINI_CLI_FOO.
    • Removed test for redacting sensitive environment variables.
    • Added test to verify GEMINI_CLI=1 env var is set for stdio MCP servers.
  • packages/core/src/tools/mcp-client.ts
    • Removed GeminiCLIExtension import and getExtensionEnvironment function.
    • Modified createTransport to directly set GEMINI_CLI environment variable for stdio transports.
  • packages/core/src/tools/ripGrep.test.ts
    • Added tests for RipGrepTool to verify names_only functionality and exclude_pattern filtering.
  • packages/core/src/tools/ripGrep.ts
    • Added exclude_pattern and names_only to RipGrepToolParams.
    • Modified GrepToolInvocation to implement names_only output and exclude_pattern filtering.
    • Added validation for exclude_pattern.
    • Updated RipGrepTool description and added minimum for after and before parameters.
  • packages/core/src/tools/tool-names.ts
    • Added ACTIVATE_SKILL_TOOL_NAME to PLAN_MODE_TOOLS.
  • packages/core/src/utils/headless.test.ts
    • Modified isHeadlessMode tests to reflect new logic: query now forces headless, and process.argv is checked for -p, --prompt, -y, --yolo as fallbacks.
    • Improved handling of undefined process.stdout and process.stdin.
  • packages/core/src/utils/headless.ts
    • Modified isHeadlessMode logic: if not integration test, checks for CI environment. Otherwise, checks for non-TTY, prompt or query options, or specific flags in process.argv.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/gemini-scheduled-stale-pr-closer.yml
    • .github/workflows/pr-contribution-guidelines-notifier.yml
Activity
  • The pull request was created by krsjenmt.
  • The PR description is empty, indicating that the changes are likely a merge from an upstream repository.
  • The title 'Merge Commit pull of request into krsjenmt/gemini-cli from google-gemini/gemini-cli' confirms this is a merge PR.
  • The changes involve updating changelog files and numerous code and documentation updates, reflecting a new stable and preview release.
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.

@krsjenmt krsjenmt merged commit dbf14f7 into krsjenmt:patch-1 Feb 12, 2026
4 of 6 checks passed
Copy link

@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 appears to be a large merge from an upstream repository, introducing a wide range of features, refactorings, and documentation updates for version 0.28.0. My review has identified a critical security regression related to the handling of sensitive environment variables for MCP servers, where redaction has been effectively disabled. Additionally, I've noted a couple of high-severity issues concerning maintainability and backward compatibility that should be addressed.

Comment on lines +1904 to +1909
env: {
...sanitizeEnvironment(process.env, sanitizationConfig),
...(mcpServerConfig.env || {}),
[GEMINI_CLI_IDENTIFICATION_ENV_VAR]:
GEMINI_CLI_IDENTIFICATION_ENV_VAR_VALUE,
} as Record<string, string>,

Choose a reason for hiding this comment

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

critical

This refactoring introduces a critical security regression. The previous implementation explicitly enabled redaction for sensitive environment variables passed to MCP servers by setting enableEnvironmentVariableRedaction: true. The new implementation no longer does this, relying on a default configuration where redaction is disabled. This could lead to sensitive credentials, such as API keys, being leaked to MCP server processes, which is especially risky for third-party servers. The removal of related security warnings in documentation and tests is also highly concerning.

      env: sanitizeEnvironment(
        {
          ...process.env,
          ...(mcpServerConfig.env || {}),
          [GEMINI_CLI_IDENTIFICATION_ENV_VAR]:
            GEMINI_CLI_IDENTIFICATION_ENV_VAR_VALUE,
        },
        {
          ...sanitizationConfig,
          enableEnvironmentVariableRedaction: true,
        },
      ) as Record<string, string>,

Comment on lines +47 to 51
// Fallback: check process.argv for flags that imply headless or auto-approve mode.
return process.argv.some(
(arg) =>
arg === '-p' || arg === '--prompt' || arg === '-y' || arg === '--yolo',
);

Choose a reason for hiding this comment

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

high

The function isHeadlessMode now directly accesses the global process.argv as a fallback. This creates a hidden dependency on global state, making the function's behavior less predictable and harder to test in isolation. It's a best practice for utility functions to be pure and receive their dependencies as arguments.

Suggested change
// Fallback: check process.argv for flags that imply headless or auto-approve mode.
return process.argv.some(
(arg) =>
arg === '-p' || arg === '--prompt' || arg === '-y' || arg === '--yolo',
);
// Fallback: check process.argv for flags that imply headless or auto-approve mode.
return (options?.argv ?? process.argv).some(
(arg) =>
arg === '-p' || arg === '--prompt' || arg === '-y' || arg === '--yolo',
);

Comment on lines 2474 to 2483
for (const definition of definitions) {
const isAllowed =
!allowedTools || allowedTools.includes(definition.name);

if (isAllowed) {
try {
const tool = new SubagentTool(
definition,
this,
this.getMessageBus(),
);
registry.registerTool(tool);
} catch (e: unknown) {
debugLogger.warn(
`Failed to register tool for agent ${definition.name}: ${getErrorMessage(e)}`,
);
}
try {
const tool = new SubagentTool(definition, this, this.getMessageBus());
registry.registerTool(tool);
} catch (e: unknown) {
debugLogger.warn(
`Failed to register tool for agent ${definition.name}: ${getErrorMessage(e)}`,
);
}
}

Choose a reason for hiding this comment

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

high

The check against allowedTools has been removed when registering sub-agent tools. While allowedTools is deprecated, this change means that sub-agents will now bypass this security control, even if a user has it configured. During the transition period to the new Policy Engine, this could lead to unexpected behavior where a user's explicit tool allow-list is not respected for sub-agents, potentially allowing unintended tools to be registered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.