-
Notifications
You must be signed in to change notification settings - Fork 13k
Consolidate redundant Plan Mode and Read-Only policy rules #24769
Copy link
Copy link
Labels
area/coreIssues related to User Interface, OS Support, Core FunctionalityIssues related to User Interface, OS Support, Core Functionalityarea/enterpriseIssues related to Telemetry, Policy, Quota / LicensingIssues related to Telemetry, Policy, Quota / Licensingworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreamsLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.⛔ Do not contribute. Internal roadmap item.
Metadata
Metadata
Assignees
Labels
area/coreIssues related to User Interface, OS Support, Core FunctionalityIssues related to User Interface, OS Support, Core Functionalityarea/enterpriseIssues related to Telemetry, Policy, Quota / LicensingIssues related to Telemetry, Policy, Quota / Licensingworkstream-rollupLabel used to tag epics and features that are associated with one of the three primary workstreamsLabel used to tag epics and features that are associated with one of the three primary workstreams🔒 maintainer only⛔ Do not contribute. Internal roadmap item.⛔ Do not contribute. Internal roadmap item.
Type
Fields
Give feedbackNo fields configured for Task.
Projects
Status
Closed
The current policy configuration duplicates many "safe" tool definitions (like
read_file,glob, andgrep_search) across bothread-only.tomlandplan.toml. This duplication exists because Plan Mode uses a high-priority catch-alldeny(60) that overrides the default safe tool allows (50).We need to consolidate safe tool management by leveraging the priority system to allow safe tools to "punch through" the Plan Mode boundary naturally. Thanks to @abhipatel12 for this suggestion!
Details
read-only.tomlusing array syntax at priority 50.denypriority to 40 inplan.toml. This allows priority 50 safe tools to remain functional during planning without explicit re-listing.PRIORITY_SUBAGENT_TOOLto 1.03 (priority 30) to ensure unknown subagents (like the browser agent) are correctly blocked by Plan Mode's priority 40 deny rule, while remaining above directive write tools (priority 10).tracker.tomlinto the central safe tier, and delete the file.ask_user,web_fetch) inplan.tomlat priority 50, keeping them out of the strictly non-modifyingread-only.toml.Impact
plan.toml, making it easier to see plan-specific overrides (like plan file modification rules).