[BUG] autoMode in project settings is silently ignored — settings schema does not mark it user-only, unlike sibling restricted keys

Status Open
Reported on v2.1.233
Maintainer reply None cached
Activity 0 comments · opened Aug 18, 2026

Preflight Checklist

  • [x] I have searched existing issues. Closest are #86310 (model writes autoMode to project scope — this report is its likely root cause) and #87312 (no per-repo scoping — orthogonal feature gap). Neither covers the schema annotation gap or the silent-ignore behavior.
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code
  • [x] This report contains no sensitive information

What's Wrong?

An autoMode block placed in .claude/settings.json or .claude/settings.local.json is ignored — correctly and by documented design (auto-mode-config: Where the classifier reads configuration) — but nothing anywhere says so, and the machine-readable settings schema actively suggests the opposite.

Two concrete gaps:

1. The settings JSON Schema doesn't mark autoMode as user/policy/flag-only, while every sibling key with the same restriction does.

autoMode's schema description is just "Auto mode classifier prompt customization" — no scope note. Compare the sibling keys carrying the identical restriction, each of which states it explicitly:

| Key | Schema description states the restriction |
| --- | --- |
| autoMemoryDirectory | "Ignored if set in projectSettings (checked-in .claude/settings.json) for security." |
| modelProposedGoals | "read from trusted sources only (user/policy/flag) — workspace-resident project and local settings are ignored." |
| dialogExpiry | "Read from trusted sources only (never a checked-in repo settings file)." |
| sandbox.network.strictAllowlist | "Only honored from user, managed/policy, or CLI (--settings) settings — project settings … are ignored." |
| footerLinksRegexes | "ignored in project .claude/settings.json and local .claude/settings.local.json" |
| autoMode | (nothing) |

The schema is what tooling and the model itself read when asked to configure settings. With the restriction documented in prose but absent from the schema, "project scope is a valid place for autoMode" is the reasonable conclusion to draw — which is exactly the behavior reported in #86310 ("Yes, every time with the same prompt", impact: High).

2. The misplacement fails silently — no warning on any surface.

Verified on 2.1.233 with a sentinel value in .claude/settings.json:

| Surface | Warning about the ignored autoMode block |
| --- | --- |
| claude doctor | none |
| claude auto-mode config | none — prints a normal-looking config that is silently all-defaults |
| Interactive / -p session startup | none |
| Explicit --setting-sources project | none — still ignored (correct, but silent) |

claude auto-mode config is the command the docs tell you to run to "confirm the effective rules include your entries". When the block is in the wrong file it prints a well-formed config with the defaults, so the check that is supposed to catch this is precisely the one that looks like it passed.

This also has a known affected population: the docs instruct pre-v2.1.207 users to "move any autoMode block in that file to ~/.claude/settings.json". Anyone who moves it to .claude/settings.json instead of ~/.claude/settings.json — one character of path difference — loses their entire classifier configuration with no signal at all.

What Should Happen?

  1. Add the scope restriction to the autoMode schema description, matching the wording already used on autoMemoryDirectory / modelProposedGoals / dialogExpiry. This alone likely resolves #86310.
  2. Warn when an autoMode key is present in project or local settings — at startup, in claude doctor, or in claude auto-mode config (ideally the latter, since that is the documented verification step). A one-line "an autoMode block in .claude/settings.json is ignored; move it to ~/.claude/settings.json" would turn a silent config loss into an obvious fix.

The enforcement itself is right and should not change — the supply-chain reasoning in the docs is sound. This is only about making the exclusion visible.

Steps to Reproduce

cd /path/to/any/repo
mkdir -p .claude
echo '{"autoMode":{"environment":["SENTINEL-PROJECT-TIER"]}}' > .claude/settings.json

# ignored — 0 hits
claude auto-mode config | grep -c SENTINEL-PROJECT-TIER

# still ignored even when the source is requested explicitly — 0 hits
claude --setting-sources project auto-mode config | grep -c SENTINEL-PROJECT-TIER

# same string via the flag tier is read — 1 hit (proves the pipeline works)
claude --settings '{"autoMode":{"environment":["SENTINEL-PROJECT-TIER"]}}' auto-mode config \
  | grep -c SENTINEL-PROJECT-TIER

# no warning on any surface
claude doctor            # no mention
claude auto-mode config  # no mention; prints defaults as if configured

Same result with autoMode.allow in place of autoMode.environment.

Error Messages/Logs

None — that is the report.

Claude Code Version

2.1.233 (Claude Code)

Platform

Claude subscription (claude.ai)

Operating System

macOS

Terminal/Shell

fish

View original on GitHub ↗