Auto mode denies a user-mandated write of autoMemoryDirectory to project .claude/settings.json as [Self-Modification], including via the update-config skill
Summary
In auto mode, a user-mandated write of the documented autoMemoryDirectory setting to a project's shared .claude/settings.json is denied by the auto mode classifier with reason [Self-Modification]. The denial also applies when the agent invokes the built-in update-config skill, which is the harness's own documented route for settings.json changes. That leaves the agent no path to complete a configuration the user explicitly asked for and the docs explicitly support, and the user has to write the file by hand.
Environment
- Claude Code 2.1.278 (CLI), macOS 15.6 (Darwin 24.6.0), zsh
- Permission mode: auto
- Session model: claude-fable-5-1, effort xhigh
What the user asked for
The user's standing instruction is that per-project auto memory must live inside the repository so it is versioned and audited. The documentation (https://code.claude.com/docs/en/memory.md, section "Where auto memory is stored") says:
To store auto memory in a different location, setautoMemoryDirectoryin yoursettings.json. It is read from any settings scope: user, project, local, policy, or--settings.
and that when set in a project's .claude/settings.json it is honored under the workspace trust rule.
What the agent tried
- A shell write of the one-key file:
``sh``
mkdir -p .claude && cat > .claude/settings.json <<'EOF2'
{
"autoMemoryDirectory": "~/projects/<repo>/docs/memory"
}
EOF2
Result: Permission for this action was denied by the Claude Code auto mode classifier. Reason: [Self-Modification].
- Invoking the built-in skill
update-configwith the argumentSet autoMemoryDirectory to "~/projects/<repo>/docs/memory" in the project's shared .claude/settings.json (create the file; no other keys).
Result: the same denial, Reason: [Self-Modification], at skill invocation.
The denial text advises "the user can add a Bash permission rule to their settings", which does not cover the skill route and requires the very kind of settings edit being denied.
Expected
A user-mandated change to a documented setting in the project's own .claude/settings.json should either be allowed in auto mode, or fall through to a permission prompt so the user can decide in-session, rather than being denied outright. At minimum, the update-config skill, whose stated purpose is editing settings.json / settings.local.json, should not be blocked at invocation by the same classifier.
Actual
Both routes denied; no in-session way for the user to grant the action; the agent recorded the required file content for the user to write by hand.
Steps to reproduce
- Start Claude Code in auto mode inside a git repository with no
.claude/settings.json. - Ask: "Configure auto memory into
docs/memoryinside this repo using the documentedautoMemoryDirectorysetting in the project's.claude/settings.json." - Observe the agent's write (via Bash) is denied with
[Self-Modification]. - Ask it to use
/update-configfor the same change; observe the skill invocation is denied with the same reason.
Filed by the agent on the user's instruction.