Repository navigation
feat(codex): execute isolated completions through native runtime - #177227
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR runs Codex isolated completions through native app-server turns and returns structured native search citations. Example: An API-key isolated completion selects gpt-6.1-sol with maxTokens: 1024 and a JSON output schema.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 6 items remain This PR has useful, maintainer-approved scope, but the request-settings correction bypasses existing provider normalization and introduces two HTTP 400 failure cases. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherCore selects the model, credential and caller authority; the Codex plugin creates an ephemeral native turn, relays admitted inference to the provider, and returns the answer and usage. flowchart LR
A[Utility or plugin caller] --> B[Core model and auth selection]
B --> C[Codex isolated completion]
C --> D[Private native app server]
D --> E[Generation bound inference relay]
E --> F[Selected provider endpoint]
F --> A
Technical reviewBest possible solution: Keep native execution and the existing relay owner, but preserve the shared Responses capability checks and token normalization before applying caller settings. Do we have a high-confidence way to reproduce the issue? Source establishes both failing inputs: GPT-6 requests with temperature and Responses requests with maxTokens below 16; existing provider contracts and tests establish why those payloads fail, without executing target code. Is this the best way to solve the issue? Reusing native turns and the generation-bound relay is coherent, but raw field forwarding must retain the provider normalization supplied by the replaced transport. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3c5c5e44c7a1. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete authorization bypass was found, but final-effect evidence for the new bounded authority composition remains incomplete. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +231, Tests +908, Other +7. Total +1146 across 28 files. Added test files: 3. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 6, 2026, 1:32 AM ET / 06:32 UTC (Revision 2). |
7f1533b to
9910412
Compare
a53f23a to
7011c04
Compare
9910412 to
585ac36
Compare
Baseline-Refresh: 56cba6d677304e4e46c4b749aff438a3bc768a5c
|
|
@clawsweeper re-review The current head is |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…nclaw#177227) * fix(research): keep evidence types in their leaf contract * test(codex): account for native research boundary coverage * fix: refresh the reviewed correction baseline Baseline-Refresh: 56cba6d677304e4e46c4b749aff438a3bc768a5c * test(codex): prove native research acceptance * fix(codex): preserve isolated completion request settings Co-authored-by: Vincent Koc <[email protected]>
…ls that reject it (#196641) fix(agents): drop temperature for models that reject it in isolated completions Since #177227, isolated completions such as Activity recaps run through the Codex app-server, and the Codex relay copies streamParams.temperature into the Responses body. Codex itself never sends temperature (ResponsesApiRequest in codex-rs/codex-api/src/common.rs:279 at ce0323f2 has no such field), so the value comes only from OpenClaw. The normal OpenAI transports skip temperature when supportsOpenAITemperature(model) is false, but the isolated path never ran that check, so recaps on models such as gpt-6-luna failed with HTTP 400 "Unsupported parameter: 'temperature'". resolveIsolatedStreamParams, which already adapts these params to the prepared model, now also drops temperature when that existing check says the model rejects it. No config or wording is new. Evidence: main and this change built in secretless node:24.22.1 Docker with the real Codex app-server (@openai/codex 0.164.0), the provider on the official api.openai.com route with a synthetic key, and a local stand-in endpoint returning the issue's exact 400 when a gpt-6-luna request carried temperature. Each run sent a chat turn and then requested the recap through sessions.activitySummary.ensure. On main the gpt-6-luna recap sent temperature 0.2 and failed; with this change it sent no temperature and succeeded. A gpt-5.5 control sent temperature 0.2 and succeeded on both, and the Codex chat-turn bodies are identical on both. Details: #196641. Closes #196617. Thanks @Marvinthebored for the report. Co-authored-by: Ayaan Zaidi <[email protected]>
…ls that reject it (openclaw#196641) fix(agents): drop temperature for models that reject it in isolated completions Since openclaw#177227, isolated completions such as Activity recaps run through the Codex app-server, and the Codex relay copies streamParams.temperature into the Responses body. Codex itself never sends temperature (ResponsesApiRequest in codex-rs/codex-api/src/common.rs:279 at ce0323f2 has no such field), so the value comes only from OpenClaw. The normal OpenAI transports skip temperature when supportsOpenAITemperature(model) is false, but the isolated path never ran that check, so recaps on models such as gpt-6-luna failed with HTTP 400 "Unsupported parameter: 'temperature'". resolveIsolatedStreamParams, which already adapts these params to the prepared model, now also drops temperature when that existing check says the model rejects it. No config or wording is new. Evidence: main and this change built in secretless node:24.22.1 Docker with the real Codex app-server (@openai/codex 0.164.0), the provider on the official api.openai.com route with a synthetic key, and a local stand-in endpoint returning the issue's exact 400 when a gpt-6-luna request carried temperature. Each run sent a chat turn and then requested the recap through sessions.activitySummary.ensure. On main the gpt-6-luna recap sent temperature 0.2 and failed; with this change it sent no temperature and succeeded. A gpt-5.5 control sent temperature 0.2 and succeeded on both, and the Codex chat-turn bodies are identical on both. Details: openclaw#196641. Closes openclaw#196617. Thanks @Marvinthebored for the report. Co-authored-by: Ayaan Zaidi <[email protected]>
Problem
Host-authorized isolated completions selecting Codex need the native runtime without losing the selected model, credential owner, schema, or inference admission.
Changes
Stack
Builds on merged #173964. This native boundary is independent of the managed Google adapter and durable research jobs. The native baseline refresh preserves the portable export-privacy corrections already on main. Source publication does not deploy a Gateway.
Verification
rust-v0.164.0at6aaac694803004a63c6f393d153c96d22521a6b9, including output-schema forwarding and distinct API-key / ChatGPT auth-token login owners.runCodexIsolatedCompletion: Codex 0.164.0, host-prepared OpenAI API key, selectedgpt-6.1-solandhttps://api.openai.com/v1; exact structured result passed. A second real turn was cancelled, both native exits were joined, and private homes were absent afterward. The existing system proxy was projected into the test process; no machine proxy configuration changed.db14c09band green with the correction. 36 focused context/native/account tests, targeted lint/typecheck, and fresh final independent P2 review passed.maxTokens: 1024), cancellation and cleanup passed on the corrected source. The selected model explicitly rejects temperature; the actual-wire regression covers temperature zero.pnpm buildpassed, including declarations, runtime packaging, Control UI, and plugin SDK export checks.c0a3df24, including real HTTPS relay rejection after owner revocation, revalidation after asynchronous transport preparation, one-refresh retry ownership, and persisted-bearer revocation before native fetch.Signed candidate:
c0a3df24c269271461aa0e60ea509b1b4edfc6e9. Exact-head hosted CI passed, and native completed-hosted preparation qualified this same head.