Repository navigation
fix: show failed native tools in Codex transcripts - #164116
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. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 4:35 AM ET / 08:35 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Codex plugin restores linked failed patch and shell-command records from simple Code Mode scripts, adds persisted-transcript regressions, and documents recovery limits. Merge readiness✅ Ready for maintainer review This PR remains useful: current main and the latest release still lack the broader failure recovery. The pinned patch has no actionable findings, and the reported exact-head live runs provide sufficient behavior proof. No additional review blocker remains. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin receives native tool events and raw responses from the Codex app-server. Its transcript projector turns those events into saved tool calls and results used by conversation history and output inspection. flowchart TD
A[Codex app-server events] --> B[Transcript projector]
C[Raw Code Mode responses] --> B
B --> D{Native receipt available?}
D -->|Yes| E[Preserve native identity]
D -->|No| F[Recognize literal single-call failure]
E --> G[Saved conversation transcript]
F --> G
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +127, Tests +188, Docs +7. Total +322 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep bounded failure recovery in the existing transcript projector, with native receipts authoritative and unsupported scripts retained as raw execution evidence. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the missing-record path for a locally bound patch input or a completed script containing a nonzero command exit. The contributor reports failing baseline regressions and passing after-fix live scenarios; this read-only review did not execute them. Is this the best way to solve the issue? Yes, the patch extends the existing projection owner, removes the old recognizer, and conservatively preserves native identities and raw responses. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f1c2314964b7. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
dbad93d to
ae7e2ab
Compare
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes missing failed native tool receipts in Codex transcripts when Code Mode binds patch input before calling
apply_patch, or a command returns a nonzero exit code inside a completed script.User Impact
Denied native patches and filesystem writes retain linked
apply_patchorbashfailure evidence. Execution and workspace permissions are unchanged.Why This Change Was Made
The transcript projector now shares one bounded recognizer for literal single-call wrappers, including local input and result bindings. It uses the script failure or structured terminal command exit code to recover missing native failures, preserves raw response bytes, and retains existing native item IDs. The old patch-only recognizer is removed. No dependencies, manifests, lockfiles, or public contracts change.
Recovery deliberately excludes computed inputs, extra executable statements, modified results, and unknown output shapes. Potentially concurrent native receipts remain authoritative rather than receiving a guessed correlation.
Evidence
3dc72be817aca542c355a69817c6da62edc8c715. Three pre-fix regression cases failed for the intended missing native identity; the regressions read the persisted SQLite transcript and check linked failed results.39598ed17885970828acd42a6370131ed0190a98, including Code Mode output, unified exec failures, and app-server event projection. A completed script can carry a nonzero command exit code; nested native item IDs differ from the outer cell ID.efcd9ff82b8488abfc6f9dbd6443ba0afb2fdcd8to include the required aliased transcript-store fix32d49385f67f09054c8d9b03f10e0e7f3c68d33b.git range-diffconfirms the repair is patch-identical. Candidate head:ae7e2abf25877b467b458288acbfe8bd1cf84c45.--maxWorkers=1(original-head proof: 83 passed in 137.26 seconds).pnpm test extensions/codex/src/app-server/event-projector.native-audit.test.ts --maxWorkers=1: 30 passed, 28.49 seconds wall time (about 3 seconds in test bodies).pnpm test extensions/codex/src/app-server/event-projector.code-mode.test.ts --maxWorkers=1: 20 passed, 16.90 seconds wall time (under 1 second in test bodies).OPENCLAW_BUILD_PRIVATE_QA=1 pnpm buildon the rebased head: passed, 10m 36.8s. Verified the build stamp matches the candidate head with clean inputs and that packaged Codex, QA Lab, and QA channel entries exist.runtime-tool-apply-patchandruntime-tool-fs-write: 2 passed, 0 failed, 0 skipped, 66.071 seconds, on the exact rebased head. Both primary and alternate wereopenai/gpt-5.5, withforcedRuntime=codex, default app-server resolution, one isolated Gateway, and the builtopenclaw.mjslauncher. Row and infrastructure retries were disabled. Registered assertions verified linked persisted native success/failure receipts, exact successful file contents, and unchanged outside-workspace sentinels. Credentials were injected throughop run; task-owned runtime state was cleaned up.Sanitized live runner output (2026-10-03, 08:16:29–08:17:36 UTC):