fix Codex preflight compaction auth routing#86292
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 24, 2026, 10:39 PM ET / 02:39 UTC. Summary PR surface: Source +27, Tests +133, Docs +1. Total +161 across 4 files. Reproducibility: yes. by source and focused test path: current main's preflight compaction call uses the follow-up run route, while the PR constructs an over-threshold persisted Codex session and asserts the compaction call receives the persisted route. I did not run the tests in this read-only review. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Choose one canonical Codex/OpenAI compaction-routing path that preserves existing session auth/runtime state, then land this narrow regression or fold its test coverage into the broader compaction-boundary fix. Do we have a high-confidence way to reproduce the issue? Yes, by source and focused test path: current main's preflight compaction call uses the follow-up run route, while the PR constructs an over-threshold persisted Codex session and asserts the compaction call receives the persisted route. I did not run the tests in this read-only review. Is this the best way to solve the issue? Unclear as a final architecture choice: the patch is a narrow fix for current main's route mismatch, but sibling PRs may instead make Codex preflight compaction native-owned or handle broader OpenAI/Codex auth routing. Codex review notes: model gpt-5.5, reasoning high; reviewed against ca70015a7ceb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +27, Tests +133, Docs +1. Total +161 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Neon Signal Puff Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
|
Closing as superseded by #85958. #85958 landed the broader Codex compaction boundary fix in dd47e47: Codex runtime sessions now leave automatic compaction to native Codex, and OpenClaw no longer runs reply preflight compaction for them. This PR fixed the older preflight route mismatch by preserving the persisted Codex provider/model/auth/harness route, but that path is no longer the canonical behavior after #85958. |
Summary
runReplyAgente2e repro for a Codex-backed Slack session whose current run route isopenai/gpt-5.5.Verification
git diff --check origin/main...HEADnode scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-memory.test.tsnode scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.tsReal behavior proof
Behavior addressed: Budget preflight compaction for existing Codex-backed Slack sessions now uses the persisted Codex session provider/model/auth/harness route instead of falling back to the current run's
openai/gpt-5.5route and requiring separate plain OpenAI auth.Real environment tested: Local OpenClaw Codex worktree rebased on
origin/mainat4798264a29, using the existing dependency install via a symlinkednode_modules; the repro avoids live Slack/API calls by mocking the embedded PI runtime boundary.Exact steps or command run after this patch:
git diff --check origin/main...HEAD;node scripts/run-vitest.mjs src/auto-reply/reply/agent-runner-memory.test.ts;node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts.Evidence after fix: The unit regression confirms
compactEmbeddedPiSessionreceivesprovider: "codex",model: "gpt-5.5",authProfileId: "codex:work", andagentHarnessId: "codex"; the e2e repro confirmsrunReplyAgentpreflight compaction usescodex/gpt-5.5while the actual reply run remainsopenai/gpt-5.5.Observed result after fix: The focused unit test file passed 25/25 tests, and the e2e test file passed 56/56 tests.
What was not tested: A live Slack/gateway/API compaction against a real auth store, and a broad changed-gate/Testbox run.