What HarnessLink captures from Codex

FeatureIn CodexDetails
Prompt historyYes~/.codex/history.jsonl.
Session transcriptsYes~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl, uploaded moments after they change.
Memory bank (autobank)YesEvery finished turn becomes a memory entry (subagent threads are skipped).
Gateway routingYesA top-level openai_base_url in ~/.codex/config.toml: .../codex/chatgpt/codex with a ChatGPT login, .../codex/openai with an API key.
Context hooksYesSessionStart, UserPromptSubmit, PreToolUse and PreCompact in ~/.codex/hooks.json (no Stop).
Memory tools (MCP)Yes[mcp_servers.superpi] in ~/.codex/config.toml, running superpi with args = ["mcp", "--harness", "codex"].
Org policy rulesPartlyChecked in PreToolUse. "Ask first" rules block, because Codex cannot ask from a hook.
Skills from templatesYeshnl add <skill> installs into ~/.agents/skills, which Codex reads.
Resume in another harnessYeshnl resume reopens a session with codex resume.

Set up Codex

  1. Install HarnessLink on macOS or Linux (Windows has its own one-liner).

    curl -fsSL https://harnesslink.sh/install.sh | bash
  2. Sign in once in your browser; setup then turns on what each harness on the machine supports.

    hnl cloud setup
  3. Or turn the pieces on one at a time.

    hnl gateway connect codex
    hnl cloud harnesses enable codex
    hnl cloud autobank enable codex
    hnl harness context codex
    hnl mcp register --harness=codex --yes
  4. Trust the new hooks once in Codex: run /hooks there. Codex skips hooks you have not trusted, and hnl reminds you until you do.

  5. Check what is connected: plain hnl shows, for each harness, the gateway, transcripts, autobank, context and memory tools.

    hnl

How memory reaches Codex

At session start the SessionStart hook adds your organisation's policy instructions and a brief of the project, up to 7,000 characters (Codex shows longer hook output only as a preview).

On each prompt the UserPromptSubmit hook adds up to 3 memory entries that share at least two distinctive words with your prompt, wherever they were banked: a decision made in Claude Code reaches Codex this way.

The hooks read files on the machine only (the local memory index and MAIN.md); they never call the cloud, so they stay fast and work offline.

When the model needs more it calls the memory tools. The MCP server is the HarnessLink service's own (superpi mcp). Its tools include memory_search (search your memory across projects and machines), memory_get (read one entry in full), memory_bank (record a decision or outcome), context_brief (a budgeted brief of the project), session_list and session_get.

Before Codex compacts the PreCompact hook saves a handoff entry, so a new session (/new) can pick the task up.

Limits

  • Codex runs a new or changed hook only after you trust it in /hooks.
  • Org policy: "ask first" rules block in Codex, and Codex's hosted web search cannot be hooked.
  • There is no Stop hook for Codex, so it does not prompt for a handoff; PreCompact still saves one.
  • The MCP server is registered only when the codex command is on your PATH.

Guides

  • Using HarnessLink: Using HarnessLink day to day: Ask, history, policies, shared memory, resuming sessions across harnesses, profile sync, templates, delegation, runs and cost.
  • Memory Banking: How HarnessLink turns each finished turn in omp, Claude Code, Codex, pi and Antigravity into a Markdown memory entry, when banking runs, and what reads it.
  • What HarnessLink captures from each harness: What HarnessLink captures from omp, Claude Code, Codex, pi, Antigravity and Cursor after setup, and how it stays a controller rather than a harness.

Other harnesses

  • Claude Code: Hooks, MCP memory tools, gateway and autobank
  • omp: Context extension, MCP memory tools, gateway and autobank
  • pi: Transcripts, autobank and gateway
  • Antigravity: Transcripts and one memory entry per conversation
  • Cursor: MCP memory tools, by hand; chats not captured

All harnesses · Install guide · Pricing · Integrations

Flag notifications