Claude Code subagent memory: scope and tool access
Distinguish user, project and local memory directories and inspect enabled write tools.
Scope determines storage · Disabling auto memory disables the field · Memory enables write tools
At a glance
This page explains one configuration contract from official documentation and records the local synthetic checks. It changes no actual settings, runs no hook, creates no subagent and calls no external service. Documented capabilities are separate from execution results.
Runtime and applicability
- Article type
- Spec file
- Verified
- Applies to
- Claude Code Applies to the documented Claude Code configuration; version and event support appear in the body.
- Tools
File locations
| Path | Scope | How it is read |
|---|---|---|
.claude/agents/<name>.md: memory frontmatter | The event or subagent configuration described in this page. | Read by Claude Code during relevant configuration loading and event execution; not enabled in this run. |
When to use
- Use when inspecting this configuration, loading location and result contract.
When not to use
- Stop integration and consult specific documentation when the event, version or permission boundary is unclear.
Scope determines storage
Use memory=user, project or local in subagent frontmatter. User stores at ~/.claude/agent-memory/<name-of-agent>/ across projects; project stores at .claude/agent-memory/<name-of-agent>/ for version-control sharing; local stores at .claude/agent-memory-local/<name-of-agent>/ for project-local content that should not be committed. A storage location does not grant permission to publish its contents.
Disabling auto memory disables the field
Subagent memory is part of auto memory. Disabling autoMemoryEnabled or using CLAUDE_CODE_DISABLE_AUTO_MEMORY makes the memory field ineffective and omits its instructions and tool access. When enabled, the prompt includes directory instructions and the first 200 lines or 25KB of MEMORY.md, whichever limit is reached first. The full directory is not automatically loaded into context.
Memory enables write tools
The documentation states that Read, Write and Edit are automatically enabled for managing memory files. A read-only review design therefore needs to reconcile memory requirements with tool permissions; a read-only prompt alone does not establish absence of write capability. Only synthetic scope-to-path mapping was checked here, without creating a subagent or changing memory directories. Establish the full permission boundary when no writes are allowed.
Sources
All links are official pages; verification dates are listed per source, and links point to the version checked.