Repository navigation
fix(codex): stabilize prompts and expose real cache regressions - #115238
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 28, 2026, 11:05 AM ET / 15:05 UTC. ClawSweeper reviewWhat this changesThe PR canonicalizes searchable Codex dynamic-tool ordering and extends QA runtime-parity/token-efficiency reports to identify post-warm cache misses, cache rewrites, and incomplete telemetry. Merge readinessKeep this PR open for protected maintainer review. The branch targets the right Codex/QA boundaries and includes concrete live-run evidence, but it is behind current Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin turns OpenClaw’s discovered tools into a dynamic surface for the native Codex app-server. QA Lab reads assistant-turn usage from canonical SQLite transcripts, diagnoses cache behavior, and renders parity and token-efficiency reports for runtime comparisons. flowchart LR
A[Plugin discovery] --> B[Codex dynamic tool surface]
B --> C[Native Codex app-server]
C --> D[Assistant transcript usage]
D --> E[QA cache diagnostics]
E --> F[Parity and token reports]
Decision needed
Why: The change deliberately affects model-visible prompt ordering and the interpretation of live provider cache telemetry; repository policy treats Codex dependency behavior and prompt-cache determinism as contracts that require direct owner-level confirmation. Before merge
Agent review detailsSecurityNone. PR surfaceSource +293, Tests +821. Total +1114 across 17 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Rebase onto current Do we have a high-confidence way to reproduce the issue? No high-confidence independent reproduction was completed in this read-only review; the branch supplies a concrete 20-turn live-provider scenario and source-level capture path, so the reported regression is source-reproducible with medium confidence. Is this the best way to solve the issue? Unclear. The proposed narrow split between searchable-surface canonicalization and direct-mode ordering is plausible, but the exact native Codex ordering/cache contract should be rechecked on the rebased head before treating it as the best permanent fix. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 206f989069fb. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
501bf55 to
90fb7b0
Compare
|
Merged via squash.
|
…224005-host * origin/main: (72 commits) fix: macOS-only Parallels smoke harness regression (#75293) fix(ios): use configured speech language for system voice (#113372) refactor: centralize isolated agent test ownership (#115340) test(ui): stabilize browser route readiness (#115320) fix(cron): clear automation after failed scheduler shutdown (#115316) fix: keep isolated gateway workspaces and skills inside state dir (#114487) docs: document local TTS on macOS, Linux, and Windows (#110230) fix(tasks): clone only the requested task page (#114277) fix(agents): prevent Code Mode resume loss and unbounded preparation (#115314) fix(process): preserve the first process cancellation reason (#115317) fix(nostr): report unavailable ingress when queue open fails (#115313) fix: prevent Slack and Feishu ingress startup leaks (#115295) fix(slack): avoid unsafe emphasis boundaries (#111575) fix: prevent changed checks from expanding into full lint (#115322) fix(codex): stabilize prompts and expose real cache regressions (#115238) refactor(ui): derive page route specs from the route table (#115214) fix(compaction): plan cut points in trigger units (#111886) (#115309) fix: prevent cron and gateway stress-run timeouts (#115241) fix(ci): validate frozen Matrix QA targets (#115298) test(macos): block real process fallthrough (#113337) ... # Conflicts: # CHANGELOG.md
…claw#115238) * fix(codex): stabilize prompt caching and measure uncached work * test(codex): refresh stable dynamic-tool prompt snapshots * fix(qa): account for cache rewrites and incomplete telemetry * fix(qa): reject inconsistent measured cache totals * fix(qa): preserve live profile eligibility and parity topology * fix(qa): extract acyclic runtime parity usage contract
…afea23-host * origin/main: (72 commits) fix: macOS-only Parallels smoke harness regression (openclaw#75293) fix(ios): use configured speech language for system voice (openclaw#113372) refactor: centralize isolated agent test ownership (openclaw#115340) test(ui): stabilize browser route readiness (openclaw#115320) fix(cron): clear automation after failed scheduler shutdown (openclaw#115316) fix: keep isolated gateway workspaces and skills inside state dir (openclaw#114487) docs: document local TTS on macOS, Linux, and Windows (openclaw#110230) fix(tasks): clone only the requested task page (openclaw#114277) fix(agents): prevent Code Mode resume loss and unbounded preparation (openclaw#115314) fix(process): preserve the first process cancellation reason (openclaw#115317) fix(nostr): report unavailable ingress when queue open fails (openclaw#115313) fix: prevent Slack and Feishu ingress startup leaks (openclaw#115295) fix(slack): avoid unsafe emphasis boundaries (openclaw#111575) fix: prevent changed checks from expanding into full lint (openclaw#115322) fix(codex): stabilize prompts and expose real cache regressions (openclaw#115238) refactor(ui): derive page route specs from the route table (openclaw#115214) fix(compaction): plan cut points in trigger units (openclaw#111886) (openclaw#115309) fix: prevent cron and gateway stress-run timeouts (openclaw#115241) fix(ci): validate frozen Matrix QA targets (openclaw#115298) test(macos): block real process fallthrough (openclaw#113337) ... # Conflicts: # CHANGELOG.md
Related: #114574
Related: #115089
What Problem This Solves
Fixes misleading native-Codex performance comparisons when cached input dominates total token counts, a warm native thread loses its prompt cache, or provider cache counters are partial or internally inconsistent. Plugin discovery order could also unnecessarily change the model-visible Codex prompt.
Why This Change Was Made
Canonicalize only the searchable Codex dynamic-tool surface; preserve direct-tool ordering, namespace visibility, and sandbox boundaries. Capture actual assistant-turn usage from canonical SQLite transcripts, recognize post-warm zero-read cache misses including cache rewrites, and compare genuinely processed uncached input, cache writes, and output. Fail closed on missing, partial, or incoherent telemetry. Refresh all generated Codex prompt snapshots.
Directly verified the upstream Codex turn-scoped client, app-server dynamic-tool ordering, exact-request/prompt-prefix reuse, websocket lifecycle, and provider cache usage contracts. No unsupported cross-turn client reuse or invented cache counters.
User Impact
Deterministic searchable Codex prompts; honest runtime timing and processed-token comparisons; observable turn-specific upstream cache losses; native apply_patch and sandbox rejection verified on both runtimes.
Evidence
AI-assisted; upstream contracts, exact-head tests, generated fixtures, and actual live-provider behavior were reviewed.