Lydia Hallie explains new persistent memory for Claude subagents and scopes

Lydia Hallie says subagents don’t inherit a main session’s auto memory, and need a "memory" field to persist across runs. She breaks down user, project, and local scopes, plus a workaround for mixing user and project memory.

Lydia Hallie explains new persistent memory for Claude subagents and scopes

TL;DR

  • Subagent persistent memory: Add a "memory" field; subagents otherwise forget between runs and don’t inherit session auto memory
  • How it works: Per-subagent directory across sessions; memory loads before execution and writes back after
  • Memory scopes: "user" for learnings reusable across projects
  • Memory scopes: "project" for repo-specific memory; recommended to commit to git for teammate reuse
  • Memory scopes: "local" for repo-only notes kept out of git
  • User + project memory: Not supported via "memory" alone; use "project" plus instructions to read user prefs path (Docs here!)

Lydia Hallie posted on X that subagents can be given persistent memory through a "memory" field, arguing that a subagent does not inherit the main session’s auto memory and instead "forgets everything between runs." In her description, the field gives each subagent its "own dir across sessions," with memory loading before execution and writing back for the next run.

Hallie also outlined three memory scopes: "user", for learnings that can carry across projects; "project", for repo-specific memory that she recommends committing to git so teammates’ agents can use it; and "local", for notes that stay in the same repo but remain out of git.

In a follow-up reply, Hallie addressed a question about combining user and project memory, stating that this "can't" be done with the memory field alone. She suggested instead setting memory to "project" and adding instructions such as "Also read <path to user prefs>...". She also pointed to the documentation in a separate post: Docs here!

Source: Lydia Hallie on X

Continue the conversation on Slack

Did this article spark your interest? Join our community of experts and enthusiasts to dive deeper, ask questions, and share your ideas.

Join our community