AI

Agent memory

Let Codex and Claude Code keep short notes across sessions and projects: turn it on, see what agents see, and manage notes.

Agent memory lets integrated Codex and Claude Code keep short notes that persist across sessions and across all of your projects: your preferences and corrections, project conventions, how to build, test, or deploy, and lessons from earlier mistakes. Both agents share the same notes.

Turn it on or off

Agent memory is off by default. Turn it on in Settings -> AI (also reachable from the Memory button in the Codex and Claude Code settings). The dialog explains who can use your memory before you enable it. Turning memory off stops agents from reading or writing notes; the saved notes are kept until you delete them, and you can review and delete them in the same panel.

Memory belongs to your account. A turn uses your memory only when it runs as you, for example a message you send, or an Agent Networks message that starts a turn as you. Collaborators' turns use their own memory, not yours.

What agents see

When memory is on, each turn starts with an Agent memory block that lists every saved note by name and one-line description. Agents read a note's full text only when it is relevant. The turn's activity log shows a Memory line:

If no Memory line appears, memory is off for the account running the turn.

Commands

Agents manage notes with the CoCalc CLI, using the turn's runtime agent identity rather than your account credentials:

cocalc project chat memory list
cocalc project chat memory read <name>
cocalc project chat memory write <name> --description "<one line>" --stdin
cocalc project chat memory delete <name>

Claude Code also has equivalent memory tools. Ask an agent to "remember" or "forget" something, or to show its memory notes.

Guidance and limits