integrations

Codex Integration

Set up Codex so it starts from the same local memory as every other coding agent on your machine, with project-aware recall, lifecycle capture, writable local MCP, and docs retrieval.

Updated

Install

Docmancer supports three Codex variants. All three install to the same skill path:

docmancer agent install codex
docmancer agent install codex-app
docmancer agent install codex-desktop

Each command installs the skill to two locations:

PathPurpose
~/.codex/skills/docmancer/SKILL.mdPrimary Codex skill path
~/.agents/skills/docmancer/SKILL.mdShared compatibility path (also read by Gemini, OpenCode, and others)

Verify

After installation, confirm the skill is in place:

docmancer status

Look for the codex and codex-shared entries under "Installed skills". Both should show a file path.

How it works

Codex discovers skills from ~/.codex/skills/. The installed memory skill teaches it to query project-aware memory, add a durable record when the user explicitly asks, and review before removing or sharing. The docs skill teaches docmancer docs query. No server or background process is required for either CLI flow.

The shared ~/.agents/skills/ path provides compatibility with other agents that read from this directory, so a single installation covers multiple tools.

Recall and capture hooks

docmancer agent install codex --hooks
docmancer agent install codex --capture-hooks

Confirmed docmancer setup installs both hook paths for a detected Codex; the commands above manage them individually.

Recall hooks use SessionStart and UserPromptSubmit and may require approval through /hooks. They include matching project and machine-wide memory. Capture is separate and uses PreCompact and Stop; it stores only redacted durable records, never raw transcripts. Remove each independently with docmancer agent remove codex --hooks or --capture-hooks.

Verify with one prompt

Ask Codex: Before changing deployment code, recall what we decided about production hosting.

The expected behaviour is a project-scoped docmancer ask before edits, followed by a concise answer grounded in the memory it returns. A durable changed decision should be recorded after the work.

Writable local MCP

pipx install "docmancer[mcp]"
docmancer mcp install codex

The stdio server exposes grounded Ask, memory and docs search, canonical-memory reads and pinning, hash-guarded write, edit, move, duplicate, trash, and restore, common memory, delivery and projection inspection, and the decision timeline. Mutating and destructive tools require explicit confirmation.

Add docs and query

Make sure you have documentation indexed before using Codex with docmancer:

docmancer docs add https://docs.pytest.org

Then start Codex. When you ask about pytest, Codex will call docmancer docs query and receive a token-budgeted context pack from your local index.