Skip to content

feat(masking): enable tool output masking by default#18564

Merged
abhipatel12 merged 2 commits intomainfrom
abhi/masking-default-enabled
Feb 11, 2026
Merged

feat(masking): enable tool output masking by default#18564
abhipatel12 merged 2 commits intomainfrom
abhi/masking-default-enabled

Conversation

@abhipatel12
Copy link
Collaborator

Summary

Enabled tool output masking by default across the CLI and core configurations.
This ensures better context window management for all users while keeping the
feature discoverable and configurable via the settings dialog.

Details

  • Updated packages/core/src/config/config.ts to set
    toolOutputMasking.enabled to true by default in the Config constructor.
  • Updated packages/cli/src/config/settingsSchema.ts to set default: true and
    showInDialog: true for the experimental.toolOutputMasking.enabled setting.
  • Set ignoreInDocs: false for the toolOutputMasking group to ensure it
    appears in documentation.
  • Regenerated schemas/settings.schema.json and documentation files
    (configuration.md, settings.md).
  • Verified with a full npm run preflight.

Related Issues

Related to the Tool Output Masking initiative.

How to Validate

  1. Run npm run start.
  2. Open the settings dialog.
  3. Verify that "Enable Tool Output Masking" is visible and checked by default.
  4. Run commands with large outputs and verify they are masked after the token
    threshold is reached.

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

@abhipatel12 abhipatel12 requested review from a team as code owners February 8, 2026 03:43
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @abhipatel12, 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 streamlines the user experience by activating tool output masking as a default setting. This change is designed to optimize the management of the context window, making the system more efficient out-of-the-box, while still allowing users to customize the behavior through accessible settings.

Highlights

  • Default Tool Output Masking: Tool output masking is now enabled by default across both the CLI and core configurations, improving context window management.
  • Configuration Updates: The toolOutputMasking.enabled setting in packages/core/src/config/config.ts is now true by default. Similarly, packages/cli/src/config/settingsSchema.ts reflects this change, setting default: true and showInDialog: true for the feature.
  • Documentation Visibility: The ignoreInDocs flag for the toolOutputMasking group has been set to false, ensuring the feature and its related settings are properly documented and discoverable in the UI and generated documentation.
  • Schema and Documentation Regeneration: The schemas/settings.schema.json and documentation files (configuration.md, settings.md) have been regenerated to reflect the updated default values and visibility of the tool output masking feature.
Changelog
  • docs/cli/settings.md
    • Added 'Enable Tool Output Masking' to the experimental settings table with a default value of true.
  • docs/get-started/configuration.md
    • Introduced detailed documentation for experimental.toolOutputMasking.enabled and its related sub-settings (toolProtectionThreshold, minPrunableTokensThreshold, protectLatestTurn), all reflecting their new default values.
  • packages/cli/src/config/settingsSchema.ts
    • Changed ignoreInDocs for the toolOutputMasking group from true to false.
    • Updated the default value for experimental.toolOutputMasking.enabled from false to true.
    • Set showInDialog for experimental.toolOutputMasking.enabled from false to true.
  • packages/core/src/config/config.ts
    • Modified the Config constructor to set toolOutputMasking.enabled to true by default.
  • schemas/settings.schema.json
    • Updated the default value for experimental.toolOutputMasking.enabled from false to true within the schema definition.
Ignored Files
  • Ignored by pattern: .gemini/** (1)
    • .gemini/settings.json
Activity
  • The author verified the changes with a full npm run preflight.
  • Relevant documentation has been updated.
  • Tests have been added/updated as needed.
  • The changes have been validated on MacOS using npm run.
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 enables tool output masking by default. The changes correctly update the default value in the core configuration and the settings schema. The documentation has also been updated to reflect this change and to make the feature more discoverable. The implementation is consistent and looks good. I have no major concerns.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

Size Change: -4 B (0%)

Total Size: 23.9 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 23.9 MB -4 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

@abhipatel12 abhipatel12 enabled auto-merge February 8, 2026 04:03
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 8, 2026
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 9, 2026
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 9, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 9, 2026
@abhipatel12 abhipatel12 enabled auto-merge February 9, 2026 17:19
@abhipatel12 abhipatel12 force-pushed the abhi/masking-default-enabled branch from 9dcb597 to bce3ddf Compare February 10, 2026 00:58
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@abhipatel12 abhipatel12 added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit 3776c4d Feb 11, 2026
25 of 26 checks passed
@abhipatel12 abhipatel12 deleted the abhi/masking-default-enabled branch February 11, 2026 06:31
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