memory

Automatic Memory

Install project-aware recall hooks and separate opt-in capture hooks for Claude Code and Codex.

Updated

Docmancer has two independent hook paths. Recall hooks are read-only and retrieve existing memory atoms. Capture hooks are a separate opt-in that can create durable local atoms from supported lifecycle events.

Recall hooks

docmancer install claude-code --hooks
docmancer install codex --hooks

Recall receives the agent working directory and searches matching project, matching team, and global memory atoms. Atoms from unrelated projects are excluded. Weak matches, malformed payloads, timeouts, and stale indexes produce no output and never block the agent turn.

Remove recall without touching capture:

docmancer remove claude-code --hooks
docmancer remove codex --hooks

Capture hooks

Capture is never enabled by --hooks. Install it explicitly:

docmancer install claude-code --capture-hooks
docmancer install codex --capture-hooks
AgentEvents
Claude CodePostCompact, SessionEnd
CodexPreCompact, Stop

Capture reads a bounded lifecycle payload or local transcript tail, redacts detected secrets, and deterministically extracts a small set of durable memory atoms: decisions, preferences, constraints, workflows, warnings, facts, or commands. It stores only those atoms as project or global Markdown records. It never copies a raw transcript, calls a hosted model, or writes team memory.

Unknown transcript records, unsupported events, malformed input, active background work, short acknowledgements, and duplicate atoms are skipped. Failures stay silent so capture cannot interrupt an agent turn.

Remove capture without touching recall:

docmancer remove claude-code --capture-hooks
docmancer remove codex --capture-hooks

Use docmancer memory list --origin capture and memory show <id> to review captured records. Promote one into team memory only after human or agent review and an explicit request.