gemini-cli - ✅(Solved) Fix Enable permanent tool approval by default [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25820Fetched 2026-04-23 07:44:48
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×2cross-referenced ×1

Fix Action

Fixed

PR fix notes

PR #25823: feat(cli): enable permanent tool approval by default

Description (problem / solution / changelog)

Summary

Enable enablePermanentToolApproval by default to show the "Allow for all future sessions" option in tool confirmation dialogs by default.

Details

  • Updated packages/cli/src/config/settingsSchema.ts to set the default value of enablePermanentToolApproval to true.
  • Updated packages/cli/src/ui/components/messages/ToolConfirmationMessage.test.tsx to reflect the new default behavior.
  • Regenerated snapshots in packages/cli as the "Allow for all future sessions" option is now visible by default in many scenarios.

Related Issues

Closes #25820

How to Validate

  1. Run npm run build then npm run start (or any tool that requires confirmation).
  2. Observe that the "Allow for all future sessions" option is available in the confirmation dialog.
  3. Run npm test -w packages/cli and verify all tests pass.

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

Changed files

  • docs/cli/settings.md (modified, +1/-1)
  • docs/reference/configuration.md (modified, +1/-1)
  • packages/cli/src/config/settingsSchema.ts (modified, +10/-1)
  • packages/cli/src/ui/App.test.tsx (modified, +44/-11)
  • packages/cli/src/ui/ToolConfirmationFullFrame.test.tsx (modified, +1/-1)
  • packages/cli/src/ui/components/ToolConfirmationQueue.test.tsx (modified, +4/-1)
  • packages/cli/src/ui/components/messages/RedirectionConfirmation.test.tsx (modified, +17/-14)
  • packages/cli/src/ui/components/messages/ToolConfirmationMessage.test.tsx (modified, +1/-1)
  • packages/cli/src/ui/components/messages/__snapshots__/ToolConfirmationMessage.test.tsx.snap (modified, +1/-1)
  • schemas/settings.schema.json (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

What would you like to be added?

Enable the enablePermanentToolApproval setting by default by changing its default value from false to true in the settings schema.

Why is this needed?

The "Allow for all future sessions" option is a highly useful feature for low-risk tools and trusted workspaces. Users have expressed a preference for this option to be available by default to reduce the number of confirmation prompts they encounter during regular development workflows.

Additional context

This change involves updating packages/cli/src/config/settingsSchema.ts and updating related UI test snapshots.

extent analysis

TL;DR

Update the enablePermanentToolApproval setting's default value to true in the settingsSchema.ts file to enable the feature by default.

Guidance

  • Locate the settingsSchema.ts file in packages/cli/src/config/ and identify the enablePermanentToolApproval setting.
  • Update the default value of enablePermanentToolApproval from false to true.
  • After making the change, update related UI test snapshots to reflect the new default behavior.
  • Verify that the "Allow for all future sessions" option is now enabled by default in the application.

Example

// In settingsSchema.ts
const settingsSchema = {
  // ...
  enablePermanentToolApproval: {
    type: 'boolean',
    default: true, // Update the default value to true
  },
  // ...
}

Notes

This change assumes that the settingsSchema.ts file is the single source of truth for the application's settings and that updating this file will propagate the change to the rest of the application.

Recommendation

Apply workaround: Update the enablePermanentToolApproval setting's default value to true to reduce the number of confirmation prompts for users, as this change is intended to improve the user experience for low-risk tools and trusted workspaces.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING