Repository navigation
improve: reduce GPT-5.6 coding harness overhead - #114574
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 27, 2026, 7:14 PM ET / 23:14 UTC. ClawSweeper reviewWhat this changesThe branch shortens model-facing execution and code-mode guidance, adds timing and prompt-cache detail to QA runtime-pair reports, and makes the Codex Merge readinessKeep this PR open for maintainer review. It has credible hosted real-behavior proof and focused regression coverage, but it changes Codex sandbox policy inside the production plugin under environment gates; the remaining question is whether those gates are provably confined to the intended private-QA launch path and remain safe after rebasing onto current Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin translates OpenClaw agent turns into native Codex app-server requests, including tool selection and sandbox policy. QA Lab supplies controlled providers and scenarios, captures each runtime’s transcript and usage, and renders runtime-pair evidence for operators. flowchart LR
A[Agent turn] --> B[Codex plugin]
B --> C[Tool and sandbox policy]
C --> D[Native Codex app-server]
E[QA scenario catalog] --> F[QA Lab runtime pair]
F --> D
F --> G[Timing and cache report]
Decision needed
Why: The patch is deliberately security-sensitive: it modifies production-plugin sandbox resolution to support a test harness. Source access was unavailable to independently trace every launcher and the sibling Codex interpretation of these fields, so maintainer ownership is needed for the durable boundary choice. Before merge
Findings
Agent review detailsSecurityNeeds attention: The diff does not show an obvious exploit, but it changes Codex sandbox enforcement under environment gates and requires maintainer confirmation of launch-path isolation before merge. PR surfaceSource +1255, Tests +1946, Config +1, Other +13. Total +3215 across 48 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep ordinary Codex sandbox precedence unchanged, confine the stronger containment behavior to the explicit private-QA launch path, and land only after rebasing and confirming that the exact final head still passes the native containment scenario plus ordinary-policy regressions. Do we have a high-confidence way to reproduce the issue? Not applicable as an issue reproduction: the PR includes a concrete hosted QA command that exercises native Codex patch creation, outside-workspace denial, and sentinel immutability after the change. Is this the best way to solve the issue? Unclear. The containment test and reporting changes are well targeted, but the best location for environment-gated sandbox narrowing cannot be confirmed without tracing the QA launchers and sibling Codex sandbox contract directly. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b37e819d74ba. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What 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 (10 earlier review cycles; latest 8 shown)
|
d678c0f to
26f7dea
Compare
…ity' into codex/gpt56-codex-runtime-overhead # Conflicts: # extensions/qa-lab/src/agentic-parity-report.timing.test.ts
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Addressed the latest ClawSweeper rank-up moves and independently verified the exact reviewed head
This accepts the deliberately existing private-QA-only, fail-closed child-environment seam after source, upstream, regression, and actual native behavior proof. Production sandbox policy, approvals, model/provider configuration, and ordinary writable roots remain unchanged. |
|
Merged via squash.
|
* improve: reduce GPT-5.6 coding harness overhead * refactor: extract runtime parity timing helpers * fix(qa): verify native apply-patch runtime parity * fix(qa): use mock patch execution evidence * fix(qa): preserve workspace templates in full syncs * fix(qa): make rejected patch fixtures deterministic * fix(qa): prove apply-patch workspace containment * fix(qa): expose runtime prompt-cache usage * fix(codex): confine forced private QA patch turns * fix(qa): verify native patch execution and sandbox precedence * fix(qa): execute native patches and prove disk mutation * fix(codex): avoid duplicate native patch registration * perf(agents): keep code mode catalog guidance compact * fix(qa): make native Codex patch evidence deterministic * fix(qa): recognize native sandbox denial errors * fix(qa): advertise native Codex mock model capabilities * fix(qa): seed native Codex mock model catalog at startup * fix(qa): recognize native Codex patch denial results * fix(ci): repair Codex harness parity checks * fix(qa): distinguish unknown prompt-cache measurements * fix(qa): accept native Codex project patch denials * fix(ci): isolate runtime parity report contracts * fix(codex): eliminate native runtime transport overhead * fix(qa): consume runtime parity report contract * fix(qa): compare matched runtime timing captures * fix(qa): type native response delta context * fix(qa): satisfy native codex websocket lint
What Problem This Solves
The built-in Codex OpenAI provider uses the Responses WebSocket protocol, including
response.create,generate: falsewarmup, and connection-localprevious_response_iddeltas. OpenClaw's private QA provider only implemented the HTTP/SSE half of the contract, so the real native Codex client paid avoidable WebSocket retries and fallback on each scenario. The integration also acquired an app-server client before checking capability facts already supplied by explicit provider overrides, and runtime comparisons included gateway startup, fixed readiness waits, retry backoff, and unmatched scenario samples. The nativeapply_patchcomparison additionally did not prove a real matching-context patch was rejected outside the workspace.Why This Change Was Made
Make the native Codex integration and its first-party benchmark honor the upstream client contract. Reuse one real Responses WebSocket connection, reproduce Codex's warmup and latest-response-only cache semantics, share existing HTTP mock evidence and failure behavior, resolve known provider capability overrides without starting an unnecessary client, and measure only the successfully completed agent attempt. Report cold bootstrap separately and compare only scenarios where both runtime timings exist.
The change preserves Codex's native patch ownership, ordinary production model and sandbox defaults, approvals, elevated-execution policy, workspace confinement, provider configuration, and independent persistent/live tool handlers. The QA-only WebSocket dependency is owned and locked by the QA plugin; no new public configuration or provider is introduced.
User Impact
Native Codex no longer repeatedly discovers that the test provider lacks the transport its built-in OpenAI client requires. Explicit capability overrides no longer block on an irrelevant app-server startup. Runtime-pair reports show real successful-attempt latency, measured cold bootstrap, p50/p90, cache usage, and matched-runtime comparisons. Native patch parity now requires both real in-workspace file mutation and a real outside-workspace denial with an unchanged external sentinel.
Evidence
Final trusted Blacksmith Testbox proof uses the actual QA CLI, managed mock OpenAI provider, Gateway, OpenClaw runtime, upstream native Codex app-server,
openai/gpt-5.6-sol, medium reasoning, fast mode, serial execution, and no skipped scenarios.The original corrected SSE-fallback baseline took 103,066 ms for the native Codex runtime across the same four executable mock scenarios. Implementing Codex's actual reusable native WebSocket reduces that measured native total to 44,662 ms, a 56.7% reduction, without substituting a fake Codex runtime, skipping the patch scenario, or changing sandbox policy.
A separately measured twenty-turn same-session run removes cold-scenario startup from the comparison:
The measured difference is approximately 602 ms per turn against a zero-latency mock provider. Gateway/provider bootstrap is recorded separately, not counted as agent runtime. These mock-provider measurements isolate harness overhead and do not claim to measure live model inference or to make incompatible standalone CLI transcripts equivalent.
Native patch proof creates the exact expected file inside the workspace, issues a valid matching-context patch against an external sentinel, requires linked native tool execution and an actual workspace-policy rejection, and verifies that the sentinel is never modified or deleted. Forced private QA excludes only the native client's implicit temporary writable roots; production Codex read-only, workspace-write, yolo, approvals, and provider defaults remain unchanged.
The native protocol was verified directly against upstream
codex-rs/core/src/client.rs,codex-rs/core/tests/suite/client_websockets.rs,codex-rs/codex-api/src/endpoint/responses_websocket.rs,codex-rs/model-provider-info/src/lib.rs, andcodex-rs/protocol/src/models.rs. Regressions cover generate-false warmup, completed-response chaining, complete model/tool/instruction delta inheritance, latest-response invalidation, error recovery, actual freeform patch failure encoding, bounded debug evidence, and existing HTTP fault injection.Final validation:
AI-assisted; developed in isolated worktrees, independently reviewed, and validated using the actual upstream native Codex runtime.