Tips for Beginners in Claude Code: Persistent Memory for Subagents
This post provides useful tips for beginners in Claude Code regarding the use of persistent memory for subagents.
Tips for Beginners in Claude Code: Persistent Memory for Subagents
Subagents can have persistent memory added through the memory field.
A subagent does not inherit the automatic memory of the main session and forgets everything between runs. This field creates a separate directory for it, which is preserved between sessions.
Memory is loaded before execution, and after completion, the agent writes new data to it for the next time.
Available Memory Levels:
user— knowledge that the agent can use across all your projectsproject— memory tied to a specific repository. It is best to store it in Git so that your colleagues' agents can also use itlocal— memory for the same repository but without adding it to Git. Suitable for any private notes about the project.
Why it matters
AnalysisThis information is crucial for optimizing the use of subagents in Claude Code, allowing important data to be retained between sessions and enhancing team efficiency.
Discuss in community
Share your questions and insights with developers
Related in Ecosystem
Practical guides, core terminology, and agent skills
Subagents and Parallel Execution in Claude Code: Running Multiple Tasks Simultaneously
A comprehensive guide to task parallelization in Claude Code: subagent architecture, shared vs. isolated context, Fan-Out and Swarm patterns, headless CLI orchestration with -p, and token economics.
Claude Code cuts background subagent status update costs by 99%
In the CLI version of Claude Code, status updates for background subagents now use Haiku 5.5 based on short notes, reducing limit consumption.
Reddit user explains why Claude Code weekly limits are burning almost 4x faster
A Reddit user compared token usage across two weeks and found that each 1% of Claude Code's weekly limit now yields far fewer output tokens, pointing to subagents, reasoning time, and UI refresh requests as likely causes.
Part II. AI Agent Architecture: From Model to Memory and Tools
A deep engineering dive: tokenization, KV-cache, sampling determinism, the training stack, quantization, context engineering, the safety stack, production RAG, ReAct, and multi-agent swarm systems.