Skip to main content
Give Codex long-term memory that survives context resets, session restarts, and fresh conversations. Codex remembers what you’re working on, your preferences, and the decisions you’ve made — across every project. Lifecycle hooks capture each session to Honcho and inject the relevant context back at session start, so you never have to repeat yourself.

Prerequisites

  • Codex ≥ 0.136.0
  • Node on your PATH (runs the installer and the hooks)

Quick Start

Step 1: Get Your Honcho API Key

  1. Go to app.honcho.dev
  2. Sign up or log in
  3. Copy your API key (starts with hch-)

Step 2: Save Your API Key

Your key lives in ~/.honcho/config.json — the single config file every Honcho integration reads. codex-honcho takes the key straight from there.
Already have your key in ~/.honcho/config.json? If another Honcho integration already wrote it there, there’s nothing to do — skip to Step 3 and install picks it up automatically.
First time? Create it with the Honcho CLI:
If you’d rather write the file yourself:

Step 3: Install the Plugin

install copies your resolved key into ~/.codex/config.toml so the Honcho MCP server authenticates with no environment variable to set. If you ever rotate your key, re-run codex-honcho install to refresh it.

Step 4: Restart Codex

Restart Codex (or start a new session) to load the hooks and the [features].hooks flag. On your next session start you’ll see Honcho memory load into context.

Step 5: (Optional) Tell Codex to use its memory

The bundled honcho-memory skill already nudges Codex to recall and save actively. To reinforce it, add a short directive to your global Codex instructions (~/.codex/AGENTS.md):

What You Get

  • Persistent Memory — Codex remembers your preferences, projects, and context across sessions
  • Survives Context Resets — Memory persists through /clear, compaction, and restarts
  • Active Recall — Codex can search your history and query what Honcho knows about you mid-task, not just at startup
  • Git Awareness — Optionally scope memory per branch, so feature work keeps its own context
  • Flexible Sessions — Map memory per directory, per git branch, or per chat instance
  • Local-First Capture — Conversations are queued to disk instantly and uploaded in the background — capture never blocks your turn or hits the network mid-conversation
  • Cross-Tool Context — Shares ~/.honcho/config.json with other Honcho integrations (Claude Code, Cursor, …), so context can follow you between tools

Configuration

All settings live in ~/.honcho/config.json (shared with other Honcho integrations). Codex-specific settings go under hosts.codex, falling back to the root fields. The hooks only ever read this file; install is the only writer.

Session Strategies

Controls how Codex conversations map to Honcho sessions:
StrategySession nameBest for
per-directory (default)my-appMost users — each project accumulates its own memory
git-branchmy-app-mainFeature-branch workflows where context per branch matters
chat-instancemy-app-019ea7dfEphemeral usage — a clean slate per conversation
An explicit sessions[cwd] mapping overrides all strategies. Environment overrides: HONCHO_API_KEY, HONCHO_PEER_NAME, HONCHO_CONFIG_DIR.

Building with Teammates

Because ~/.honcho/config.json is shared across Honcho hosts, teammates can collaborate by pointing at the same workspace while keeping their own identities. Each person uses their own peerName, so their contributions are attributed to distinct peers even when they work in the same repo. Alice (~/.honcho/config.json):
Bob (~/.honcho/config.json):
Both Alice and Bob write to the team-acme workspace. Working in the same repo, they share a session (named by directory, e.g. my-app) but appear in it as separate peers — so Honcho’s dialectic reasoning can draw on context from both.

MCP Tools

Once installed, Codex can call these Honcho tools directly:
ToolDescription
searchSemantic search across your session messages
chatAsk Honcho a natural-language question about you
get_peer_contextFetch the current model of you (representation + peer card)
get_representationLightweight representation string
create_conclusionsSave durable insights to memory
list_conclusionsList saved conclusions
query_conclusionsSemantic search across derived conclusions
delete_conclusionRemove a conclusion by ID

Commands

CommandEffect
codex-honcho installInstall hooks + MCP + skill
codex-honcho statusInstalled components, pending queue depth, GUI link
codex-honcho removeStrip only what this installs

What Install Writes

PathChange
~/.codex/honcho/staged copy of the bundle the hooks run (kept stable across npm/npx cache eviction)
~/.codex/hooks.jsonadds the four hook entries (merged; your own hooks untouched)
~/.codex/config.tomlsets [features].hooks = true; registers [mcp_servers.honcho]mcp.honcho.dev (native HTTP)
~/.codex/skills/honcho-memory/the active-recall skill
~/.honcho/config.jsonpersists the resolved apiKey + peerName (other fields and hosts.* blocks preserved)
codex-honcho remove reverses exactly these.

Troubleshooting

No memory loading / MCP not registered. Confirm your key is in ~/.honcho/config.json (codex-honcho status shows honcho config: found). If it’s missing, run honcho init (or add { "apiKey": "hch-…" } to the file yourself), then re-run codex-honcho install — without a key, install registers the hooks and skill but skips the MCP server. Hooks aren’t firing. Restart Codex after installing so it loads hooks.json and the [features].hooks flag. Check codex-honcho status for installed components and pending queue depth. Memory not persisting. Make sure saveMessages isn’t set to false under hosts.codex.

Install from a GitHub Clone (no npm)

The clone path runs the TypeScript source directly and so requires bun; it wires the hooks to bun run <this dir>/bin/codex-honcho.ts, so keep the clone in place. The npm install instead stages the bundled dist/codex-honcho.mjs to ~/.codex/honcho/ and wires hooks to node — node-only, and stable across npm update, npx cache eviction, or removing the package.

Next Steps

GitHub Repository

Source code, issues, and README.

Honcho Architecture

Learn about peers, sessions, and dialectic reasoning.