Repository navigation
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. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Move nested tool-output image regressions into a sibling file so the grandfathered media suite does not grow past the line cap, and add id-only, text-only, and mixed generation cases.
|
Codex review: needs real behavior proof before merge. Reviewed September 21, 2026, 9:14 PM ET / September 22, 2026, 01:14 UTC (Revision 2). ClawSweeper reviewWhat this changesThe Codex plugin converts images nested in native tool output into managed reply attachments, with validation, deduplication, and separate image-generation accounting. Merge readiness⛔ Blocked before merge - 9 items remain The fix remains necessary, and the revisions address direct tool calls, but nested Codex Code Mode output still loses the ownership and source identity needed by both earlier findings. Real behavior proof is also outstanding. Priority: P2 Review scores
Verification
How this fits togetherThe Codex plugin translates app-server events into OpenClaw replies. Its media projector stores image bytes and passes attachment references and delivery facts to chat delivery and transcript persistence. flowchart TD
A[Codex native and host tools] --> B[Raw tool output]
A --> C[Tool ownership and source paths]
B --> D[Media validation and projection]
C --> D
D --> E[Managed image storage]
E --> F[Reply delivery and transcript]
Before merge
Findings
Agent review detailsSecurityNeeds attention: Nested Code Mode output can bypass the existing model-only media boundary; no dependency or supply-chain changes were introduced. PR surfaceSource +116, Tests +303. Total +419 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Native screenshots should reach replies exactly once while host-tool images retain their outbound policy across nested Codex execution. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main drops nested image outputs, and the branch's ID matching fails for Codex's separately identified nested calls and outer outputs. Runtime reproduction was not executed. Is this the best way to solve the issue? No, not yet: reusing managed media is appropriate, but matching only raw call IDs cannot preserve ownership or delivery identity through Codex Code Mode. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8f1f0a3a8a5b. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Address the clawsweeper P1/P2 findings on the raw nested-image path: - Register host dynamic-tool call ids at recordDynamicToolCall and skip their raw echoes, so media.outbound=false results cannot surface as host-owned reply attachments. - Carry the native view_image source path from ImageView items as a savedPath alias on tool-output records so confirmed original-path sends (source reply and target) match and the managed copy is not delivered twice.
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
Closes #153949
What Problem This Solves
Codex can return screenshots as nested
input_imageitems insidecustom_tool_call_outputorfunction_call_output. OpenClaw previously ignored those bytes, so the assistant could refer to “the image above” while chat received no attachment.This change projects validated nested images through the existing managed-media path. It uses stable item identities for deduplication, enforces the existing byte and MIME limits, records delivery receipts, and keeps base64 out of transcript text. Screenshot-view output remains replay-safe and is not counted as image-generation side-effect evidence. The decoder also accepts the
application/octet-streamdata URL currently emitted by Codex and confirms the actual image type from its bytes.Evidence
node scripts/run-vitest.mjs extensions/codex/src/app-server/event-projector.media.test.ts extensions/codex/src/app-server/event-projector.replay-safety.test.ts extensions/codex/src/app-server/run-attempt.final-media.test.ts src/agents/embedded-agent-runner/run/tool-media-payloads.test.ts— 85 tests passed.node scripts/check-changed.mjs -- extensions/codex/src/app-server/event-projector-media.ts extensions/codex/src/app-server/event-projector.media.test.ts— passed.git diff --check— passed.Related: #154033. This version keeps screenshot delivery separate from generated-image accounting and covers current Codex octet-stream output.
Evidence (clawsweeper P1/P2 follow-up)
function_call_outputechoes whosecall_idwas registered throughrecordDynamicToolCallare skipped, so model-only (media.outbound=false) dynamic-tool images can no longer be republished as host-owned reply attachments; native tool outputs such asview_imagestill project. Sibling codex source inspected personally at6b9826e3aa83:dynamic.rsmaps host-returned content toFunctionCallOutputContentItemunder the host'scall_id, andview_image.rsemitsImageViewItem { id: call_id, path }.ImageViewitems attach theirpathas thesavedPathalias of${call_id}:image:*records (both notification orders), soprojectDeliverymatches confirmed original-path sends: a source reply suppresses the managed copy, a target send attributes it once.event-projector.media-tool-output.test.tsfail on the pre-fix projector for the intended reasons (toolMediaUrlsleaked, target alias missing) and pass after the fix.node scripts/run-vitest.mjson media-tool-output, media, replay-safety, dynamic-tools, final-media, tool-media-payloads — green (3 shards);pnpm tsgo:extensionsandpnpm tsgo:extensions:test— passed;oxfmtandgit diff --check— clean.