[DOCS] Auto mode docs omit `"$defaults"` sentinel for extending built-in rules
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/permissions
Section/Topic
"Configure the auto mode classifier" → "Override the block and allow rules"
Current Documentation
The docs currently say on https://code.claude.com/docs/en/permissions:
Two additional fields let you replace the classifier's built-in rule lists:autoMode.soft_denycontrols what gets blocked, andautoMode.allowcontrols which exceptions apply. To loosen: remove rules fromsoft_denywhen the defaults block something your pipeline already guards against with PR review, CI, or staging environments, or add toallowwhen the classifier repeatedly flags a routine pattern the default exceptions don't cover. To tighten: add tosoft_denyfor risks specific to your environment that the defaults miss, or remove fromallowto hold a default exception to the block rules. In all cases, runclaude auto-mode defaultsto get the full default lists, then copy and edit: never start from an empty list. Settingalloworsoft_denyreplaces the entire default list for that section. If you setsoft_denywith a single entry, every built-in block rule is discarded: force push, data exfiltration,curl | bash, production deploys, and all other default block rules become allowed.
Related pages repeat or depend on the same guidance. For example, https://code.claude.com/docs/en/permission-modes says:
Runclaude auto-mode defaultsto see the full rule lists. If routine actions get blocked, an administrator can add trusted repos, buckets, and services via theautoMode.environmentsetting.
What's Wrong or Missing?
Changelog v2.1.118 added support for including "$defaults" inside autoMode.allow, autoMode.soft_deny, and autoMode.environment so custom rules can extend the built-in lists instead of replacing them.
The current docs still describe customization as a full replacement workflow and tell users to copy the entire default lists into their settings. They do not document the new "$defaults" sentinel at all, so the documented behavior is now outdated.
This leaves two gaps:
A. The new merge mechanism is undocumented
There is no explanation that users can write entries like "$defaults" plus their own custom rules.
B. Existing guidance now implies the old behavior is the only safe option
Pages that point readers to claude auto-mode defaults and "copy the full default lists" should explain when that is still useful versus when "$defaults" is the simpler way to keep built-ins intact.
Suggested Improvement
Update the auto mode documentation to describe "$defaults" explicitly for all three arrays: autoMode.environment, autoMode.allow, and autoMode.soft_deny.
Suggested additions:
- In
https://code.claude.com/docs/en/permissions, add a short rule summary such as:"$defaults"keeps the built-in rules for that section and appends your custom entries. - Replace the current copy-the-entire-list-only guidance with examples that show both patterns:
{
"autoMode": {
"allow": [
"$defaults",
"Deploying to the staging namespace is allowed: staging is isolated from production and resets nightly"
],
"soft_deny": [
"$defaults",
"Never run database migrations outside the migrations CLI"
],
"environment": [
"$defaults",
"Trusted internal domains: *.corp.example.com"
]
}
}
- Update linked summary pages (
settings,permission-modes, managed-settings docs, and CLI reference) to mention thatclaude auto-mode defaultsprints the built-ins, while"$defaults"lets users keep those built-ins without copying the whole list into settings.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/permissions | Primary auto mode classifier documentation; currently says custom allow/soft_deny lists replace defaults |
| https://code.claude.com/docs/en/permission-modes | Tells readers to inspect defaults and extend autoMode.environment, but does not mention "$defaults" |
| https://code.claude.com/docs/en/settings | autoMode config reference lists the three arrays but does not mention the sentinel behavior |
| https://code.claude.com/docs/en/server-managed-settings | Managed settings example links readers to the auto mode classifier guidance and its current warnings |
| https://code.claude.com/docs/en/cli-reference | Documents claude auto-mode defaults, which should cross-reference the new "$defaults" workflow |
Total scope: 5 pages affected
Source: Changelog v2.1.118
Exact changelog entry:
Auto mode: include"$defaults"inautoMode.allow,autoMode.soft_deny, orautoMode.environmentto add custom rules alongside the built-in list instead of replacing it
4 Comments
Still relevant as of 2026-05-18. This documentation gap has not been addressed in the docs yet.
Verified against the latest docs; this still appears unresolved.
Issue #52194 Verification
Title: [DOCS] Auto mode docs omit
"$defaults"sentinel for extending built-in rulesIssue Date: 2026-04-23
Verification Date: 2026-06-27
Status: RESOLVED
---
Issue Summary
Issue #52194 reports that, as of 2026-04-23, the auto mode classifier documentation described
autoMode.soft_deny,autoMode.allow, andautoMode.environmentas fully replacing the built-in rule lists, and only suggestedclaude auto-mode defaults+ "copy the full default lists" as the customization workflow. The issue notes that changelog v2.1.118 (2026-04-23) added a"$defaults"sentinel that lets custom rules extend the built-in list rather than replace it, and asks for that sentinel to be documented acrosspermissions,permission-modes,settings,server-managed-settings, andcli-reference.---
Verification Results
Claim 1: The docs at
https://code.claude.com/docs/en/permissionsdescribe customization as a full-replacement workflowStatus: RESOLVED
The auto mode classifier configuration has been split out of the general permissions page into a dedicated reference at
https://code.claude.com/docs/en/auto-mode-config. The currentpermissionspage no longer carries the customization guidance the issue quoted; it only references auto mode in passing and links out to the dedicated page. Athttps://code.claude.com/docs/en/permissions, line 449 now reads:The dedicated auto mode page, at
https://code.claude.com/docs/en/auto-mode-config, line 52, opens theenvironmentsection with:And at line 121, the override-the-defaults section now reads:
Verdict: The custom-rule guidance now defaults to the extension workflow the issue asked for. The "Setting
alloworsoft_denyreplaces the entire default list" warning the issue quoted is still present (now line 151 ofauto-mode-config) but is correctly framed as the consequence of omitting"$defaults"and is paired with the extension pattern.Claim 2: The docs do not mention
"$defaults"anywhereStatus: RESOLVED
The sentinel is documented in multiple places:
https://code.claude.com/docs/en/auto-mode-config— lines 52, 58, 83, 121, 129, 133, 138, 143, 151, 156, 180, 182 (with examples in lines 54-66, 79-94, and 125-148).https://code.claude.com/docs/en/settings— line 218 explicitly states:Include the literal string "$defaults" in an array to inherit the built-in rules at that position.https://code.claude.com/docs/en/whats-new/2026-w17— line 106 announces the feature.https://code.claude.com/docs/en/changelog— line 1399 carries the original v2.1.118 release note.Verdict: The
"$defaults"sentinel is now documented in both the dedicated reference and the settings key reference.Claim 3:
https://code.claude.com/docs/en/permission-modesonly points atclaude auto-mode defaultswithout mentioning"$defaults"Status: RESOLVED
At
https://code.claude.com/docs/en/permission-modes, line 234 reads:The sentence still describes
claude auto-mode defaultsas the inspection command andautoMode.environmentas the customization lever, but it now links directly into the auto-mode-config page that documents"$defaults". The auto-mode-config page itself, at lines 156 and 182, explains whenclaude auto-mode defaultsis still useful (taking full ownership by omitting"$defaults"):Verdict: The "when to copy the full list vs use
$defaults" framing the issue requested is now present on the linked configuration page.Claim 4:
https://code.claude.com/docs/en/settingsautoModerow does not mention the sentinel behaviorStatus: RESOLVED
At
https://code.claude.com/docs/en/settings, theautoModerow (line 218) now reads:The example column for that row is
{"soft_deny": ["$defaults", "Never run terraform apply"]}.Verdict: The settings reference now documents
"$defaults"directly in theautoModerow.Claim 5:
https://code.claude.com/docs/en/server-managed-settingsexample and surrounding text do not cover"$defaults"Status: RESOLVED
The server-managed-settings example at
https://code.claude.com/docs/en/server-managed-settings, lines 87-99, still shows a plainautoMode.environmentblock. It links out on line 99:The linked target page (
auto-mode-config) carries the full"$defaults"documentation, including the warning about omitting it (line 151) and the example block that keeps the built-ins via"$defaults"(lines 125-148). The server-managed-settings page is a deployment guide; the canonical reference for"$defaults"lives on the auto-mode-config page it links to.Verdict: Although the managed-settings example does not embed the sentinel inline, it cross-links into the page that does. Combined with the settings reference and auto-mode-config reference, the sentinel is reachable from any path a reader would take from the managed-settings example.
Claim 6:
https://code.claude.com/docs/en/cli-referenceforclaude auto-mode defaultsdoes not cross-reference"$defaults"Status: RESOLVED
At
https://code.claude.com/docs/en/cli-reference, line 29, theclaude auto-mode defaultsentry now reads:The command reference links to the permission-modes page, which links to the auto-mode-config page that documents
"$defaults". Theclaude auto-mode configandclaude auto-mode critiqueentries (lines 169-178 ofauto-mode-config) also call out that the effective config expands"$defaults"in place and thatclaude auto-mode defaultsis still the way to inspect or take full ownership of the built-in rules.Verdict: Cross-references for the
"$defaults"workflow now exist from the CLI reference, the permission-modes page, the settings reference, and the auto-mode-config page itself.Claim 7: Suggested JSON example combining
"$defaults"with custom rules across all three arraysStatus: RESOLVED
The example the issue proposed has been incorporated into
auto-mode-configat lines 125-148. The published example is a superset of the suggestion (it also includeshard_deny) and uses the same prose style for the staging-deployment allow entry:Verdict: The example is published verbatim in the auto-mode-config reference.
---
Current State
| Claim | Status |
|-------|--------|
| 1.
permissionspage omits"$defaults"and documents replacement-only workflow | RESOLVED || 2.
"$defaults"undocumented anywhere | RESOLVED || 3.
permission-modespoints atauto-mode defaultswithout cross-reference | RESOLVED || 4.
settingsautoModerow omits sentinel | RESOLVED || 5.
server-managed-settingsdoes not cross-reference"$defaults"| RESOLVED || 6.
cli-referenceforclaude auto-mode defaultsdoes not cross-reference"$defaults"| RESOLVED || 7. No example combining
"$defaults"with custom rules | RESOLVED |---
Suggested Fix
N/A — issue has been resolved.
---
References
environmentsection introducing"$defaults"and showing the basic example"$defaults""$defaults"for all four arrays, with the JSON example the issue requested (lines 125-148) and the warning about omitting it (line 151)"$defaults"-vs-copy-the-list guidanceautoModesettings row mentioning"$defaults"claude auto-mode defaultsmentionclaude auto-mode defaultscommand entry, linked to the permission-modes pageautoModeexample with cross-link to the auto-mode-config page"$defaults"sentinel"$defaults"(2026-04-23)---
Conclusion & Recommendation
Primary Concern: The auto mode documentation described custom
allow/soft_deny/environmentarrays as replacing the built-in rules and did not document the new"$defaults"sentinel that lets users extend the built-in list instead.Resolution Status: RESOLVED
Recommendation: CLOSE
The dedicated
auto-mode-configpage now documents"$defaults"forenvironment,allow,soft_deny, andhard_deny, includes the JSON example pattern the issue proposed, explains whenclaude auto-mode defaultsis still the right tool (taking full ownership of the list), and is reachable frompermissions,permission-modes,settings,server-managed-settings, andcli-referencevia cross-links. The settings reference row forautoModealso documents the sentinel directly.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.