Keep the thread on what your AI agent shipped. This Codex plugin bundles, in one install:
- the
backthreadMCP server (thequery"how does X work?" tool +capture), and - an automatic Stop capture hook — every session's decisions (the why) are captured when a turn ends, with no manual step.
Your source code and tool I/O never leave your machine — Backthread redacts every transcript locally before anything is sent. See backthread.dev/security.
Both the MCP server and the hook run the published backthread CLI via npx, so the
plugin itself is just config — nothing to build.
# Register this directory as a Codex plugin marketplace, then install via /plugins:
codex plugin marketplace add ./extensions/codex
# then, inside Codex: /plugins → install "backthread"One-time sign-in (authorizes this device; the token is never printed):
npx backthread loginThat's it. Ask "how does X work?" and Codex will use the query tool; keep coding
and each session is captured automatically.
plugins/backthread/.mcp.json→ thebackthreadMCP server (npx -y backthread mcp).plugins/backthread/hooks/hooks.json→ aStophook runningnpx -y backthread@latest capture --from-hook --agent codex --detach. Codex'sStopfires at turn scope and is awaited (it expects a JSON ack on stdout), so the capture detaches a worker — it prints the{ "continue": true }ack and returns instantly so it never adds latency to a turn, while the redact → derive → persist round-trip finishes in the background. The shared--from-hookentrypoint dedupes per session, so the per-turnStopcaptures each session only once.
Built against the official Codex plugin + hooks docs, but confirm on a real Codex install before relying on it:
.mcp.jsondirect server map (vs a wrapped{ "mcpServers": … }object) — the docs call the direct map standard; verify the server loads.marketplace.jsonsource: { source: "local", path }shape + whethercodex plugin marketplace add <dir>discoversmarketplace.jsonat the dir root.Stopack — Codex expects JSON on stdout when the hook exits 0; the--agent codexpath emits{ "continue": true, … }. Confirm the turn isn't blocked.
The verified two-file fallback (write ~/.codex/config.toml MCP + [[hooks.Stop]]) is
backthread install --agent codex (ARP-503).
- Node.js ≥ 22.18 (for
npx backthread) - Codex CLI ≥ 0.124.0 (hooks stable) / ≥ 0.117.0 (plugins)
- backthread.dev · How your data is handled
- The
backthreadCLI: npm · source