Wire Iranti into Claude Code.
This is the highest-fidelity path. Claude Code supports MCP natively and respects session hooks, so memory gets written and retrieved on every turn without any manual prompting.
Run the setup command
Run this from your project root. It writes the MCP config, protocol instructions, and session hooks automatically.
iranti claude-setup
What gets written
The command writes three files to your project:
.mcp.jsonRegisters Iranti as a workspace MCP server so Claude Code connects to it on startup.
CLAUDE.mdInjects the session protocol into Claude Code's context — when to call handshake, attend, write, and checkpoint.
Session hooksPostToolUse and UserPromptSubmit hooks that fire iranti_attend and iranti_write automatically on every turn.
Restart Claude Code
Restart Claude Code so it picks up the new MCP server and hooks. On the next session start, you should see iranti_handshake in the tool call log.
You can also verify the MCP connection from the terminal:
iranti doctor
How memory works in practice
At session start, Claude Code calls iranti_handshake with the current task. Iranti loads your working-memory brief — recent decisions, open risks, next steps — and injects it before the first response.
Before each response, iranti_attend checks whether any stored facts are relevant to the current message. If they are, they get injected into context.
After file edits and confirmed findings, iranti_write persists the fact. The next session starts with it already loaded.
At task completion or natural pauses, iranti_checkpoint saves current step, next step, open risks, and recent outputs so interrupted work can resume cleanly.