Docmancer has two independent hook paths for Claude Code and Codex. Recall hooks are read-only and put existing memory in front of the agent. Capture hooks read a bounded lifecycle payload at the end of a session and store the durable conclusions.
Confirmed docmancer setup installs both for the agents that support them. The commands below exist so you can add or remove either one on its own afterwards.
Recall hooks
docmancer agent install claude-code --hooks
docmancer agent install codex --hooks
Recall uses SessionStart and UserPromptSubmit. It receives the agent working directory and searches matching project memory plus machine-wide memory. Memory from unrelated projects is excluded. Weak matches, malformed payloads, timeouts, and stale indexes produce no output and never block the agent turn. Bound the hook with DOCMANCER_HOOK_TIMEOUT_MS if you need a tighter budget than the 1000 ms default.
Remove recall without touching capture:
docmancer agent remove claude-code --hooks
docmancer agent remove codex --hooks
Capture hooks
docmancer agent install claude-code --capture-hooks
docmancer agent install codex --capture-hooks
| Agent | Events |
|---|---|
| Claude Code | PostCompact, SessionEnd |
| Codex | PreCompact, Stop |
Capture reads a bounded lifecycle payload or local transcript tail, redacts detected secrets, and deterministically extracts a small set of durable items: decisions, preferences, constraints, workflows, warnings, facts, or commands. Those are written as personal local Markdown records under ~/.docmancer/memories and indexed, so the next combination can fold them into Shared Memory. Capture never copies a raw transcript or calls a hosted model.
Unknown transcript records, unsupported events, malformed input, active background work, short acknowledgements, and duplicates are skipped. Failures stay silent so capture cannot interrupt an agent turn.
Remove capture without touching recall:
docmancer agent remove claude-code --capture-hooks
docmancer agent remove codex --capture-hooks
Use docmancer status to see capture coverage and docmancer timeline to read what changed. Team Sync is a separate planned publication workflow and is not available yet.