@cc-mem/pi

Claude Code's auto memory in pi: the index on every turn, and tools to write and edit it

Packages

Package details

extension

Install @cc-mem/pi from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@cc-mem/pi
Package
@cc-mem/pi
Version
0.2.2
Published
Oct 28, 2026
Downloads
972/mo · 972/wk
Author
yyq1025
License
MIT
Types
extension
Size
8.2 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/extension.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@cc-mem/pi

Gives pi the auto memory Claude Code already keeps for your projects, so pi, Claude Code and your other agents work from the same notes. What pi saves, Claude Code recalls in its next session, and the other way round.

pi install npm:@cc-mem/pi

What it does

  • Puts the project's MEMORY.md index into the system prompt when the session starts, and reads it again after each compaction. The directory is the one Claude Code uses for the working directory, ~/.claude/projects/<project>/memory by default.
  • Registers four tools:
    • memory_list(project) returns the notes of another project directory.
    • memory_write(file_name, content) creates a memory file, or MEMORY.md, and never overwrites one.
    • memory_edit(file_name, …) replaces text exactly, renames a memory file, or both.
    • memory_delete(file_name) deletes one memory file; it cannot delete MEMORY.md.
  • Records source: pi in the files it writes and modifiedBy: pi in the files it changes.

pi reads memory files with its own read tool. It keeps MEMORY.md up to date itself, one line per memory, as Claude Code's model does.

The plugin follows Claude Code's settings: autoMemoryDirectory, CLAUDE_CONFIG_DIR, and turning auto memory off with autoMemoryEnabled: false or CLAUDE_CODE_DISABLE_AUTO_MEMORY=1. When auto memory is off, pi is told so and writes are refused.

Part of cc-mem, with plugins for OpenCode and DeepSeek Harness.

License

MIT. Not affiliated with or endorsed by Anthropic. "Claude" and "Claude Code" are trademarks of Anthropic.