Repository navigation
fix: explicit Codex runtime policies reach embedded attempts - #126259
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
2d28085 to
6e63569
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 5:04 AM ET / 09:04 UTC. ClawSweeper reviewWhat this changesThe PR forwards explicit runtime policy into preparation of the primary embedded-agent candidate while preserving full-chain behavior for explicit overrides and independent fallback policy resolution. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review. The OpenClaw-side change is internally coherent and has no discrete code finding, but the required direct Codex source inspection is unavailable and the cited runtime-pair proof is neither current-head nor complete. Likely related people: Jesse Merhi (prepared-runtime history, medium confidence) and Bill (fallback-boundary history, medium confidence). Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherCommand and auto-reply flows resolve a provider/model runtime policy, then the embedded-agent runner prepares harness candidates before an attempt runs. This change carries the resolved policy into that preparation step without pinning fallback candidates. flowchart LR
A[Command or auto-reply] --> B[Runtime policy resolution]
B --> C[Embedded run request]
C --> D[Candidate preparation]
D --> E[Primary runtime]
D --> F[Fallback runtime]
E --> G[Agent attempt]
F --> G
Decision needed
Why: The local source establishes the OpenClaw handoff, but repository policy makes upstream Codex inspection mandatory for a Codex runtime verdict, and the available hosted result is incomplete and predates the current head. Before merge
Agent review detailsSecurityNone. PR surfaceSource +11, Tests +158. Total +169 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the internal primary-only hint, then obtain direct Codex-contract inspection and a successful current-head runtime trace for the restart-capability scenario before merging. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main resolves explicit runtime policy in command and auto-reply flows but passes neither an override nor a preparation hint to the runner, whose candidate preparation therefore cannot apply that policy. Is this the best way to solve the issue? Yes, provisionally: the internal hint fixes the producer-to-preparation handoff while retaining concrete override precedence and fallback-owned policy; the remaining upstream Codex contract gate prevents a complete merge verdict. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c55d9b6d207b. LabelsLabel 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
HistoryReview history (5 earlier review cycles)
|
6e63569 to
a575ce5
Compare
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
a575ce5 to
c23eb86
Compare
|
@clawsweeper re-review Exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
c23eb86 to
2452233
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2452233 to
e331c80
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
e331c80 to
52c37be
Compare
What Problem This Solves
Explicit provider/model Codex runtime policy was resolved by the gateway auto-reply path, then dropped before the embedded attempt was prepared. The attempt could therefore select the default OpenAI runtime instead of native Codex app-server.
Why This Change Was Made
The command and auto-reply paths forward explicit, non-implicit policy as a transient
agentHarnessRuntimePreparationHint. The embedded orchestrator applies that hint only to candidate zero. Fallback candidates continue resolving their own runtime policy, while explicit harness ids and runtime overrides remain authoritative across the full chain.The transient field lives on
RunEmbeddedAgentInternalParams, so it does not expand the public plugin runtime contract.githubPublicationAvailableremains forwarded unchanged, agent identity is preserved, andagent-runner-fallback-candidate.tsis untouched.Production delta: +15/-4. Test delta: +159/-1.
User Impact
Explicit Codex runtime policy prepares native Codex for the requested embedded attempt without writing a durable harness id, pinning fallbacks, changing provider remapping, or losing non-default agent identity.
Evidence
52c37be00173761a48cc1d5fa26d8b9467ae1895.initialize -> account/login/start -> thread/start, exactly one login, no duplicate inline auth, read-tool continuity across the model switch, correct model receipts, andrerouted=false./v1/responsesassertion. That wrapper result is not presented as green CI: native Codex legitimately uses Responses. The exact-head CI run above is the green CI evidence.modelandmodel_providerare accepted and forwarded incodex-rs/app-server-protocol/src/protocol/v2/thread.rs:55-59andcodex-rs/app-server/src/request_processors/thread_processor.rs:878-933,1294-1327.modelandmodelProviderthroughextensions/codex/src/app-server/thread-requests.ts:153-194andextensions/codex/src/app-server/thread-lifecycle-io.ts:467-493.ClawSweeper Rank-up Moves