Skip to content

A Codex session summarizes by shelling claude -p, so it needs an authenticated Claude CLI and bills Anthropic #460

Closed

Description

@fdaviddpt

Observed against codex-cli 0.150.1 on macOS 15.3.2 arm64, with main at f79f1c5.

Symptom

A Codex session's save path invokes Claude. From .remember/logs/memory-2026-08-29.log of a session run entirely inside Codex:

12:30:48 [extract] 3 exchanges (1 human)
12:30:49 [haiku] calling (branch: master)
12:30:54 [tokens] tokens: 9+21531cache->277out ($0.011798)

Real Anthropic spend, on a host the user chose instead of Claude Code.

Location

pipeline/haiku.py is the only site that invokes a model, and it shells claude -p. scripts/save-session.sh:422 names it directly:

# --- Step 4+5: Call Haiku (the claude -p invocation lives only in pipeline/haiku.py) ---

scripts/resolve-paths.sh:56-68 documents the nested child that invocation creates.

Why this is a defect and not just an unfinished arm

Three separate problems, and only the first is the one #406 already names:

  1. A hard dependency on a foreign CLI. A Codex user with no claude installed, or an unauthenticated one, gets no memory at all. Whether that failure is loud has not been checked — and given this repository's history, the odds it degrades quietly are not low. That is worth establishing before anything else here.
  2. It bills the wrong account. The user is paying OpenAI for the session and Anthropic for remembering it, without having asked for the second. Nothing surfaces that at install time.
  3. It is unnecessary. Codex ships codex exec, a documented non-interactive mode, verified working in this repository's own probes tonight. The capability needed to summarize on-host already exists and is already installed on any machine where this problem occurs.

What would settle it

Route summarization through a host adapter, the way #407 did for the transcript path and #443 for the envelope. pipeline/host.py already knows which host wrote the transcript (sniff_envelope) and already declares CODEX and GEMINI alongside Claude Code, so the seam exists and this is filling it rather than inventing it.

Two things to decide, both genuine:

  • Whether the summariser must be host-native or merely configurable. A user running Codex might legitimately prefer Claude for summaries — the objection is to it being unconditional and unannounced, not to it being possible. A configured provider with the host's own as the default answers both readings; hard-wiring the host's own answers only one.
  • What happens when the host's own route is unavailable. Falling back to claude -p silently reproduces this issue behind one more layer. Three states, as everywhere else: summarised on-host, summarised via a configured fallback the user opted into, or could not summarise — said out loud, never a quiet skip.

Note for whoever takes this: across four Codex probe sessions tonight the summariser returned SKIP every time, including on decision-bearing content. That is unexplained. It may be ordinary judgement on short one-shot sessions, or it may be a second defect hiding behind this one — establish which before assuming the pipeline is healthy end to end. No memory file has ever been observed being written from a Codex session.

Part of #406.

Metadata

Metadata

Assignees

Labels

bugpriority:high

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions