Claude Code remembers through CLAUDE.md files you write and auto memory, notes it keeps for itself on one computer. Dray saves each turn’s prompt and final answer to your Dray account, where every agent you connect can search them.
CLAUDE.md files are instructions you write. Auto memory is notes Claude writes from your corrections and preferences. Both load at the start of every conversation, and Claude treats them as context, not enforced configuration. Claude Code docs: memory
~/.claude/CLAUDE.md applies to all your projects. ./CLAUDE.md or ./.claude/CLAUDE.md is shared with your team through source control, and ./CLAUDE.local.md is for you alone in one project, so add it to .gitignore. Claude Code docs: memory
Files in the working directory and every directory above it load at launch, root first, and add to each other rather than override. A CLAUDE.md in a subdirectory loads once Claude reads or edits a file there. Claude Code docs: memory
A CLAUDE.md can pull in other files with @path/to/file, up to four hops deep. Rules in .claude/rules/ can be scoped to file paths, and rules in ~/.claude/rules/ apply to every project on your machine. Claude Code docs: memory
Claude Code reads AGENTS.md only when there is no CLAUDE.md or CLAUDE.local.md in the working directory or above it (version 2.1.277 or later). To use both, import it with @AGENTS.md in your CLAUDE.md. Claude Code docs: memory
Auto memory is on by default in local sessions. It keeps four kinds of note (user, feedback, project and reference) and skips what Claude can work out from the code, such as architecture, file paths or debugging fixes. Claude Code docs: memory
The notes live in ~/.claude/projects/<project>/memory/: a MEMORY.md index and one file per topic. The first 200 lines or 25KB of MEMORY.md load each session, and topic files are read when needed. Claude Code docs: memory
Auto memory is machine-local. Every worktree and subdirectory of one git repository shares it, and it is not shared across machines or cloud environments. Claude Code docs: memory
/memory lists your memory files, turns auto memory on or off and opens its folder. Asking Claude to remember something saves it to auto memory. "autoMemoryEnabled": false turns it off for a project. Claude Code docs: memory
Where your history lives
Claude Code saves each session on your computer as you work, as a JSONL transcript in ~/.claude/projects/<project>/<session-id>.jsonl. Anthropic says the format is internal and changes between versions. Claude Code docs: sessions
claude --continue opens the latest session in the current directory. claude --resume opens a picker, and /resume switches sessions from inside one. Runs with claude -p and Agent SDK sessions are left out of the picker. Claude Code docs: sessions
Transcripts are kept for 30 days by default. cleanupPeriodDays in settings.json changes that, and claude purge deletes them sooner. Claude Code docs: sessions
What Dray adds
When a turn ends, Dray’s hooks save what you typed and the answer the turn ended on, which is the text after its last tool call. A long turn’s prompt goes up after 10 seconds, and its answer follows when the turn ends.
Images you paste into a prompt are saved with their turn while dray images is on. A new setup turns it on. Dray: connect
Token saver is a free extra, off unless you run dray tokens on. On your computer, it outlines big files and shrinks big images and browser screenshots before Claude Code reads them. Claude Code can still read the full file. It can’t overwrite one it has only seen in outline until it has read all of it. Dray: connect
Anything in the text that looks like a key or password is removed on your computer before it is sent. Dray: connect
Turns Dray has saved stay saved when Claude Code deletes its own transcripts after 30 days.
Setup also connects Claude Code to your memory directly, so it can search what you saved from your other agents and from ChatGPT, Claude and Grok on the web. Inside Claude Code this replaces the claude.ai connector and answers faster. Dray: connect
Setup lets Claude Code use Dray’s read-only memory tools without asking each time. Saving to memory and writing to chat links still ask. dray mcp off removes those rules and the connection. Dray: connect
On macOS, the CLI also saves Cowork sessions, the Claude desktop app’s agent mode. It reads only their session transcripts from the app’s folder, whenever Dray runs for something else, and saves them as Claude Code sessions titled “Claude Code · Cowork · …”. Dray: connect
Dray does not read or import your CLAUDE.md files or auto memory. Keep standing instructions there; Dray keeps the conversations. Dray: connect
Setup adds Dray’s commands to ~/.claude/skills, unless Claude’s Dray plugin already gives them: /link links this chat with your other chats, /link CODE joins a link another chat made, /unlink leaves it, and /dray-status checks what Dray has saved. Dray: connect
One command sets up Claude Code and the other agents it finds on your computer. It needs Node.js 18 or later on macOS or Linux, and no Chrome extension.
Terminal
curl -fsSL https://api.withdray.com/cli/install.sh | sh
Your browser opens Dray. Use the same Dray account as your web chats and choose Connect coding agents. This approves the computer.
Setup lists the agents it found, all ticked. Untick any you want to leave out with the arrow keys and space, then press Enter.
For Claude Code, setup adds hooks to ~/.claude/settings.json, Dray’s instructions in ~/.claude/rules/dray.md and a direct connection to your memory. It offers to import the last 30 days of your Claude Code sessions.
New Claude Code sessions use it straight away. dray status shows sign-in, capture and anything waiting to upload.
To set up Claude Code on its own, or add it later:
Terminal
dray setup --agents claude
Memory tools only, by hand
To connect only the memory tools, add the server by hand for every project. Connecting this way does not save your sessions.
Terminal
claude mcp add --transport http --scope user dray https://mcp.withdray.com/mcp
Start Claude Code and type /mcp.
Choose dray, then Authenticate. Your browser opens Dray’s sign-in page.
Choose Connect. If the sign-in page asks for the extension, choose Use an access key instead and paste the output of dray key there. Back in Claude Code, claude mcp list shows dray as connected.
Sign in from an interactive session first. Non-interactive runs like claude -p can’t open the sign-in page.
Limits
Not saved: tool calls, command output, file contents, the agent’s reasoning, subagent threads, and the narration before a turn’s last tool call. Dray: connect
claude -p runs, Agent SDK runs and anything run with CI set are not saved unless you run dray config scripted on.
Claude Code’s cloud sessions send nothing to Dray, which saves from your own computer.
Import reads the transcripts on your computer, so sessions Claude Code has already deleted, after 30 days by default, can’t be brought in.
This computer’s sign-in lasts about 90 days. After that Claude Code asks you to sign in again, and new sessions wait on your computer until you do. Dray: connect
Uploading and learning are separate steps, so a new session may take a while to show up in a search. Saved sessions count toward your plan’s monthly allowance like any other messages. Dray: connect
How Cursor carries context with Project Rules, User Rules and AGENTS.md, what its docs say about Memories, and what Dray saves from Cursor’s CLI agent.
How Claude’s memory keeps topics, searches past chats and separates projects, and how Dray shares your Claude chats with ChatGPT, Grok and your coding agents.