Repository navigation
Merged
Conversation
…460), and name which provider a SKIP came from (#461) pipeline/haiku.py now detects the hosting CLI (pipeline.host.detect_host) and routes a detected Codex session's summarization through `codex exec` --sandbox read-only --ignore-user-config (the #202 hook-isolation equivalent, verified this plugin's own Codex hooks otherwise fire inside the nested call) instead of unconditionally shelling `claude -p`. Claude Code and every other host keep exactly the behaviour they had. REMEMBER_SUMMARIZER overrides the detected default either way; REMEMBER_SUMMARIZER_FALLBACK=claude is the explicit opt-in for a codex route that cannot produce a result -- unset, that raises loudly rather than silently reproducing the billing complaint one layer down. A control experiment (identical content through both routes) ruled out a host-shaped cause for #461's four-for-four SKIP: the judgment threshold is unchanged and was never Codex-specific. What changed is that a SKIP/REJECTED/appended log line now names which provider produced it, so this investigation does not need repeating. Co-Authored-By: Claude Sonnet 5 (1M context) <[email protected]>
…-timeout warning Three findings from the spawned Explore reviewer on the #460/#461 commit, all fixed: - `_call_codex`'s TimeoutExpired handler reused `_log_failed_spend`, the Anthropic-billing accounting helper written for the claude -p path. It always found no usage block in codex's stdout and warned about an unaccounted Anthropic cost for a call this same function documents elsewhere as never billed to Anthropic -- self-contradictory. Replaced with a plain warning that names codex's own (untracked) usage instead. - `call_haiku()`'s docstring still claimed it unconditionally spawns `claude`, unchanged since before the provider dispatch was added at the top of the same function. - `pipeline/host.py`'s module docstring said the summarizer "gets extracted from two real providers or not at all" as the reason no abstraction lived there -- #460 added exactly that second provider, so the docstring now explains why the bar was met and an abstraction still was not added (different auth models / output shapes per provider). The oss:auditor's one finding (whether `_is_cli_notice`'s Claude-specific hook-block regex would also catch a Codex hook block, if `--ignore-user- config` were ever silently ignored by a future codex-cli) is reported in this lane's report as report-for-filing rather than fixed here: verifying the exact wording of Codex's own hook-block notice needs a live blocking Codex hook, which this session did not reproduce. Co-Authored-By: Claude Sonnet 5 (1M context) <[email protected]>
This was referenced Aug 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #460, closes #461.
A Codex session summarizes by shelling claude -p, so it needs an authenticated Claude CLI and bills Anthropic #460: a Codex session's memory save shelled
claude -punconditionally, requiring an authenticated Claude CLI and billing Anthropic to remember a session run entirely inside a different agent CLI, having asked for neither.pipeline/haiku.pynow detects the hosting CLI (pipeline.host.detect_host(), already built for Read cwd and transcript_path from hook stdin instead of deriving them #407/extract.py cannot read a Codex rollout transcript, so a Codex session silently saves zero memory #443) and routes a detected Codex host throughcodex exec --sandbox read-only --ignore-user-configinstead -- verified directly that--ignore-user-configis Codex's own equivalent of the Claude path's--setting-sources ''hook isolation (Hook-blocked prompt is stored as the consolidation result, corrupting recent.md recursively #202): without it, this plugin's own Codex hooks fire inside the nested call (hook: SessionStart/hook: UserPromptSubmitlines observed in realcodex execoutput); with it, they do not, and auth viaCODEX_HOMEis unaffected. Every other host -- Claude Code, an unrecognised host, no signature at all -- keeps exactly the behaviour it had before this change (regression-pinned intests/test_summarizer_routing_460.py).REMEMBER_SUMMARIZER(claude/codex/auto, defaultauto) lets an operator override the detected default either way -- a Codex user may legitimately want Claude for summaries, and this makes that possible without making it unconditional.REMEMBER_SUMMARIZER_FALLBACK=claudeis the explicit opt-in for what happens when the codex route cannot produce a result (binary missing, non-zero exit, timeout, empty output): unset, that raises loudly ("could not summarize") rather than silently falling back toclaude -p, which would reproduce this issue's own billing complaint one layer down.No Codex session has ever been observed writing a memory file: four probes, four SKIPs, cause unestablished #461: four real Codex probe sessions all returned a plain
SKIPwith no further detail, and it was unclear whether that was ordinary model judgment or a Codex-specific defect. Ran a real, non-mocked control experiment: identical thin (decision-only) content SKIPs via BOTHclaude -pand the newcodex execroute; identical richer (genuinely substantive) content SAVES via both, in the exact entry format the pipeline validates. This rules out a host-shaped cause -- the judgment threshold was never Codex-specific and is UNCHANGED by this PR. What changed is thatpipeline/types.HaikuResultgained aproviderfield, threaded throughpipeline/shell.py's emittedPROVIDER=var and intoscripts/save-session.sh'sSKIP/REJECTED/appendedlog lines, so a future "was this host-shaped?" question is answerable directly from.remember/logs/memory-*.loginstead of needing this investigation repeated.The real
codex execrun for the richer probe produced an actual saved-shaped entry (## 14:05 | fix/460followed byUpdated pipeline/haiku.py to use isolated codex exec...), which is the first observed instance of a Codex-native route producing a save-worthy result end to end.Self-review
Two spawned reviewers (
Explore,oss:auditor) ran against the initial commit. 3 findings fromExplore(a misleading Anthropic-billing warning reused on a codex timeout; two stale docstrings) were all fixed in a follow-up commit. 1 finding fromoss:auditor-- whether_is_cli_notice's Claude-specific hook-block regex would also catch a Codex hook-block notice, if--ignore-user-configwere ever silently ignored by a future codex-cli -- is below-bar for a fix in this PR (needs a live blocking Codex hook to verify the exact wording, which this session did not reproduce) and is recorded for filing in the developer report.Not in this PR
README.mdis held by PR fix: ten stale "0600 per PID" comments/docstrings, made false by #429's mktemp switch (#437) #455 (per the maintainer's brief) -- the newREMEMBER_SUMMARIZER/REMEMBER_SUMMARIZER_FALLBACK/REMEMBER_CODEX_BINenv vars are not yet documented there. See the developer report'sdocssurvey for the exact table rows to add once fix: ten stale "0600 per PID" comments/docstrings, made false by #429's mktemp switch (#437) #455 lands.Test plan
tests/test_summarizer_routing_460.py,tests/test_provider_logging_461.py).oss/assemble_changelog.py --check)claude -pandcodex execinvocations for the control experiment (see the developer report / session note)🤖 Generated with Claude Code