gemini-cli - ✅(Solved) Fix Harden Plan Mode policy for activate_skill [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#24942Fetched 2026-04-09 08:17:04
View on GitHub
Comments
0
Participants
1
Timeline
15
Reactions
0
Author
Participants
Assignees
Timeline (top)
labeled ×5unlabeled ×2added_to_project_v2 ×1assigned ×1

Fix Action

Fixed

PR fix notes

PR #24946: feat(plan): require user confirmation for activate_skill in Plan Mode

Description (problem / solution / changelog)

Summary

Hardens the Plan Mode policy by requiring explicit user confirmation before activating a skill.

Details

Previously, activate_skill was explicitly allowed in Plan Mode. This PR removes that rule and includes activate_skill in the ask_user group for Plan Mode. This ensures that even though skills are generally safe, the user is notified and must confirm when a skill is being activated during the planning phase, as it may introduce new instructions or capabilities.

Related Issues

https://github.com/google-gemini/gemini-cli/issues/24942

How to Validate

  1. Enter Plan Mode: enter_plan_mode
  2. Try to activate a skill, for example: activate_skill(name='test-expert')
  3. Verify that the CLI asks for confirmation instead of automatically activating the skill.

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

Changed files

  • packages/core/src/policy/policies/plan.toml (modified, +2/-9)
RAW_BUFFERClick to expand / collapse

What would you like to be added?

Move 'activate_skill' from automatically allowed to requiring user confirmation ('ask_user') in Plan Mode.

Why is this needed?

Plan Mode should be restrictive. Automatically allowing skill activation might lead to unintended side effects if the skill's tools aren't all read-only, or simply for better user awareness. This aligns 'activate_skill' with other sensitive tools (ask_user, save_memory, web_fetch) in Plan Mode.

Additional context

Modified packages/core/src/policy/policies/plan.toml to move activate_skill from an 'allow' rule to the 'ask_user' group.

extent analysis

TL;DR

Modify the plan.toml file to change the activate_skill rule from 'allow' to 'ask_user' to require user confirmation in Plan Mode.

Guidance

  • Verify that the plan.toml file has been correctly updated with the new 'ask_user' rule for activate_skill.
  • Test the updated policy in Plan Mode to ensure that user confirmation is now required for skill activation.
  • Review other sensitive tools in Plan Mode, such as save_memory and web_fetch, to ensure consistency in their rules.
  • Consider adding additional tests or validation to ensure that the new policy behaves as expected.

Example

No code snippet is provided as the issue does not contain specific code details.

Notes

The solution assumes that the plan.toml file is the correct location for modifying the policy rules. If there are other configuration files or overrides, additional changes may be necessary.

Recommendation

Apply workaround: Modify the plan.toml file as described to require user confirmation for activate_skill in Plan Mode, as this change aligns with the desired restrictive behavior of Plan Mode.

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