Shared memory
Shared memory lets one coding tool save a project fact that every other tool reads next session. Facts are Markdown files, so your team reviews shared facts in Git.
Turn it on
Add memory to agnostic-ai.yaml and sync once:
requires: ">=0.81.0"
builtins: [memory]
agnostic-ai sync
Saving a fact needs no further sync.
To enable it across projects, use global configuration. Pick project or global setup, not both, or the same facts can load twice. Claude Code needs a project sync either way.
Two memories
| Project memory | Personal memory | |
|---|---|---|
| Folder | .agnostic-ai/memory/ | .agnostic-ai/local/memory/ |
| In Git | Yes, shared with the team | No, stays on your machine |
| Holds | Team facts: conventions, decisions, known problems | Your preferences and corrections |
| Tools save | After you confirm | Without asking |
Each folder has one file per fact and a MEMORY.md list. Tools read the list when a session starts and open a fact when they need it.
.agnostic-ai/memory/
MEMORY.md # - [CI runs on Ubuntu](ci-ubuntu.md): PR CI skips macOS and Windows
ci-ubuntu.md
Save and recall a fact
Ask your coding tool: “Remember that this project's integration tests need the local database running.” It proposes the team fact for your approval. A personal preference, such as shorter answers, it can save without asking. Then start another tool in the project and ask what it knows about integration tests.
Keep your coding tool's own memory on: shared memory adds a layer every tool reads. Your request wins over saved facts. See Gemini CLI for how it keeps its own memory alongside these facts.
Ask for the shared-memory skill to recall a topic or clean up stale facts. Cleanup needs your confirmation.
Check and repair
agnostic-ai lint and doctor flag a MEMORY.md over 100 lines, two MEMORY.md files over 6,000 bytes together, a broken link, a fact the list leaves out, text that looks like a secret, and hidden characters a reviewer cannot see. They skip personal memory when its folder is missing, so CI never checks it.
A fact file: The Kiro shows a marker for an included list that has no file yet, and the marker goes away once a tool saves a fact there. If you added the include to a steering file by hand, remove it. With Aider gets only the rule, because a missing file shows an error. Once both On Codex, Copilot, Cursor, Gemini CLI, Qoder, Factory, Trae, Devin CLI, and Auggie CLI on Unix, sync adds a hook that runs Cline VS Code gets a project-only Devin CLI uses the Cursor's hosted cloud agents do not run Claude Code also saves facts by itself. Sync points that memory at your personal memory folder ( Claude Code then loads your personal list as its own memory: the first 200 lines or 25KB, with hidden characters cleaned out. Run Facts Claude Code saved before come along. When personal memory is still empty, the first sync that points Claude at it copies them from Claude's own folder ( Every tool reads personal memory, so the dry run lists each fact with its description first; To share something a tool learned, ask it to save the fact in shared memory. Claude Code's own saves land there already, unless you set By default each checkout has its own personal memory, so deleting a worktree deletes what it learned. A worktree Claude Code creates starts with a copy when sync manages To keep one personal memory for every worktree of a repository, add this to For a new Git project, A linked worktree without its own Personal memory then lives in The first sync after a mode change copies facts into the new store when it holds no Markdown file, and prints the count. The old store stays unchanged. With facts already in the new store, That folder is outside the project, so some tools need its full path in their config. Sync writes the path only to files Git ignores, which needs the What each tool does with personal memory in this mode (project memory loads the same way in both columns):agnostic-ai memory lint runs only these checks, and agnostic-ai memory index rebuilds each MEMORY.md after a merge conflict. See memory commands for every subcommand.Write or review a memory fact by hand
---
name: ci-ubuntu
description: PR CI runs on Ubuntu alone
metadata:
type: project
---
PR CI runs on Ubuntu alone.
**Why:** the full OS matrix costs too much to run on every push.
**How to apply:** run the full matrix before merging a change to file paths.
type is user, feedback, project, or reference. The sources: setting does not move these folders.shared-memory-policy rule asks tools to save only facts the code, history, and rules lack; to update a fact rather than add a duplicate; to check that named files and commands still exist; and to never save secrets. Review shared memory changes like code, because every tool reads them.How each tool loads memory and keeps its own notes
How each tool loads it
Tool How Claude Code CLAUDE.md imports the project list, and Claude Code's own memory loads the personal listCodex, Copilot, Gemini CLI, Qoder, Factory A command runs when a session starts and adds both lists Devin CLI ( windsurf)A SessionStart command adds both lists through tagged context; the rule remains a fallback Cursor local sessions and self-hosted workers A command runs when a session starts and adds both lists Trae with project hooks enabled A command runs when a session starts and adds both lists Cline VS Code A project TaskStart hook returns both lists through contextModification; the shared rule remains the fallbackAuggie CLI (macOS, Linux, Windows WSL) An executable SessionStart script adds both listsOpenCode, Kilo Code The config lists both files Kiro A steering file includes project memory and, in checkout mode, personal memory Antigravity An always-on rule includes project memory and, in checkout mode, personal memory Every other tool A rule tells the tool to read both lists before a task memory.personal: repo, Kiro and Antigravity include only the project list and find personal memory with agnostic-ai memory path. With sync --global, both get only the rule, because a home file cannot name a project's lists. See Kiro and Antigravity shared memory, which covers its rule size limits.MEMORY.md files exist, add them yourself in .aider.conf.yml: read: [.agnostic-ai/local/memory/MEMORY.md, .agnostic-ai/memory/MEMORY.md]When a session starts
agnostic-ai hook memory when a session starts. In Trae, enable project hooks in Settings > Hooks first.node_modules/.bin/agnostic-ai when that file exists, and otherwise the agnostic-ai on your PATH. Trae runs the PATH one only. Keep the one it picks at 0.81.0 or newer with agnostic-ai upgrade; an older one loads no memory, and with none found nothing loads.sh on PATH, for example from Git Bash. The Claude Code subagent hook needs it too.memory lint names them (the first 10). Every other tool loads both lists whole, hidden characters included, so memory lint also warns there once they pass 6,000 bytes. Remove the hidden characters it reports.memory-cline-task-start hook, which needs Cline for VS Code 4.1.20 or later with hooks enabled. Global sync leaves it out, because the Cline SDK and CLI ignore TaskStart hook replies. See Cline VS Code memory startup.memory-windsurf-session-start hook with an explicit POSIX sh launcher and a 10-second timeout. It starts from DEVIN_PROJECT_DIR even when its process runs elsewhere. Native Windows hook execution is undocumented.sessionStart hooks or user-level hooks. They read the project index through the shared memory policy and skill. Local sessions and self-hosted workers run the hook. See Cursor's cloud hook support.Claude Code's own memory
autoMemoryDirectory in .claude/settings.local.json), so its saves land where every other tool reads them. Sync keeps a value you set yourself, and Git never commits the file. Claude Code uses the setting once you trust the folder.CLAUDE.md imports only the project list. Claude Code's own memory never reaches a subagent, so a SubagentStart hook runs agnostic-ai hook memory to add the personal list. In a linked worktree that uses the main checkout's personal folder, the hook reads that same folder.CLAUDE.md imports both lists, and the hook adds nothing, in these cases:autoMemoryEnabled: false in a settings file, or CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 in your shell or a settings env block).autoMemoryDirectory points to another folder.permissions.blockReadsOutsideWorkingDirectories: true and the folder comes from repository-supplied settings (for example, a tracked local file or a local file outside Git).sync.unmanaged prevents sync from setting the folder.agnostic-ai sync after you change these settings.~/.claude/projects/<project>/memory/) and leaves that folder as it is. Otherwise agnostic-ai lint names the folder and how many of its facts no longer load (LINT043), and this copies them over:agnostic-ai memory import --from claude --dry-run
agnostic-ai memory import --from claude
--only <file> copies just the ones you pick. --path copies from any folder with the same layout, such as Gemini CLI's ~/.gemini/tmp/<project>/memory/ or Qoder's ~/.qoder/projects/<project>/memory/. See memory import.Each tool's own memory
autoMemoryDirectory yourself.Tool Its own memory Default Claude Code Auto memory: notes for each repository, on your machine On ( autoMemoryEnabled); sync points it at your personal memory folderCodex Memories: notes built from past sessions, one store for the machine Off ( memories under [features])Gemini CLI Edits its own Markdown memory files: GEMINI.md files and private notes for each project. Auto Memory proposes notes from past sessions. Sync generates the project's GEMINI.md, so the gemini-memory-tiers rule sends Gemini's team facts to shared memory instead, and has it copy private facts there tooEditing is always on, with no setting. Auto Memory is off ( experimental.autoMemory)Copilot Copilot Memory, hosted: repository facts and your preferences, dropped after 28 days unused. The VS Code memory tool: notes on your machine Copilot Memory is on for individual plans; organization admins enable it first. CLI: /memory on or /memory off. The VS Code tool is built inQoder CLI Auto-Memory: notes the agent keeps on your machine. The IDE has a separate memory CLI: off ( autoMemoryEnabled). IDE: not documentedKilo Code Kilo Memory: project notes outside the repository, no personal memory Off (Settings > Context, or /memory on)Kiro Memory: learned notes stored per user account, shared by the IDE and CLI IDE: off (the user setting Kiro Agent: Memory; a workspace value has no effect). CLI: not documented ( /memories, then config)Augment Agent Memories in the IDE, which you approve one by one Not documented Trae Memories, global and for each project, as local Markdown files Not documented Goose Memory extension: files in .goose/memory/ and ~/.config/goose/memory/Not documented (Extensions) Jules Memory in the Jules cloud for each repository Not documented (repository settings) Windsurf (Devin) Devin Local keeps none. Cloud Devin has its own Memory Cloud Devin Memory is on; whether it reaches Devin Desktop, Local, or the CLI is not documented Cursor None documented Not applicable Share personal memory across linked worktrees
Share personal memory across worktrees
.worktreeinclude; any other starts empty. In a worktree, Claude Code reads the main checkout's .claude/settings.local.json, so its own memory uses the main checkout's personal memory once sync has run there.agnostic-ai.local.yaml and sync:memory:
personal: repo
agnostic-ai init --memory enables shared memory and starts personal memory in this repo mode when managed ignores are on. It keeps an existing agnostic-ai.local.yaml. Without Git or with --gitignore=off, it enables memory in checkout mode. In checkout mode, sync names this option when linked worktrees exist.agnostic-ai.local.yaml follows the main checkout's memory.personal setting; its own local file takes precedence. Other settings stay local to each checkout, and each teammate chooses their own mode.~/.agnostic-ai/local/memory/<repository name>-<hash>/ (under $AGNOSTIC_AI_HOME when set). Sync creates it, readable only by you, and it works when ~/.agnostic-ai is a link to another folder. Moving or recloning the repository starts a new folder. To see it:$ agnostic-ai memory path
project ~/code/app/.agnostic-ai/memory
personal ~/.agnostic-ai/local/memory/app-fbcd84e8
agnostic-ai lint names the ones left behind; agnostic-ai memory import --from checkout copies them over (--from repo when you switch back). Dry runs, checks, and previews never copy facts. Later syncs keep imported facts you deleted out of the store; an explicit memory import can bring them back..gitignore block (gitignore.enabled: true, which agnostic-ai init sets). The block lists those files, such as .codex/config.toml, whenever their tool and the memory built-in are on, so the committed .gitignore and .worktreeinclude stay the same for teammates without the setting, and a new Claude Code worktree copies them. If one of those files is already in Git, run agnostic-ai sync --untrack. To commit one instead, such as a hand-written .codex/config.toml, add its path to gitignore.allow. A file kept in Git through gitignore.commit or gitignore.allow never gets the path, so that tool works as without the block; sync --gitignore off does the same for one run.Tool Without the .gitignore blockWith it Claude Code Loads and saves Same Copilot, Factory Loads Loads Codex, Gemini CLI, Qoder Loads Loads and saves Cursor Loads Loads; the CLI saves, the editor asks first OpenCode Nothing Loads and saves Windsurf Finds it with agnostic-ai memory pathSame; Devin CLI saves without asking Kilo Code, Kiro, every other tool Finds it with agnostic-ai memory pathSame writable_roots (read in workspace-write mode, in a trusted project), Gemini CLI context.includeDirectories, Qoder permissions.additionalDirectories, OpenCode permission.external_directory in opencode.json, and a Write(<folder>/**) rule in .cursor/cli.json and in permissions.allow of .devin/config.json. Every tool but Codex keeps your own entries. If your Codex overlay sets [sandbox_workspace_write], sync leaves it alone; add the folder there yourself.MEMORY.md to instructions in ~/.config/kilo/kilo.jsonc.agnostic-ai on PATH, and may ask before they read or write outside the project.