Repository navigation
feat(media): point the agent at unsupported documents on disk instead of dead-ending - #122408
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
7ed8b4f to
9933d06
Compare
e799546 to
0642cab
Compare
|
Codex review: needs changes before merge. Reviewed August 12, 2026, 1:16 AM ET / 05:16 UTC. ClawSweeper reviewWhat this changesThe PR lets an agent running on the host inspect a root-approved unsupported local document by adding a safe on-disk path directive to its media prompt. Merge readiness⛔ Blocked by patch quality or review findings - 6 items remain The host-reply path is well scoped and the prior sandbox-policy fixes are present, but the ACP dispatch path now assumes every registered ACP backend can read host-local paths. That violates the generic ACP backend contract and can restore the dead end for remote or container-backed plugins, so this PR needs a narrow correction before merge. Priority: P2 Review scores
Verification
How this fits togetherInbound attachments pass through the media cache and classifier before OpenClaw appends a file marker to the agent prompt. The marker must describe a path the executing runtime can actually open, whether the reply uses the embedded host runtime or an ACP backend plugin. flowchart LR
A[Inbound document] --> B[Root-approved media cache]
B --> C[Format classifier]
C --> D[Runtime placement check]
D --> E[File prompt marker]
E --> F[Embedded agent or ACP backend]
F --> G[Agent reads document]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The unconditional ACP host-path directive crosses an unproven backend filesystem boundary. PR surfaceSource +86, Tests +193, Docs +1. Total +280 across 10 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep generic ACP markers path-free until the ACP backend contract can authoritatively prove host-path visibility or translate the document into the backend workspace. Do we have a high-confidence way to reproduce the issue? Yes for the existing behavior: current main always renders the plain unsupported-document marker, and the PR body supplies an after-fix Telegram request trace for the host path. The new ACP regression is source-reproducible from its generic backend contract, though it was not live-run here. Is this the best way to solve the issue? No. The embedded reply path uses the correct peer-scoped sandbox decision, but ACP dispatch must not treat all registered backends as host-local; the safe narrow repair is to keep its generic marker plain. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 00fc1bd12382. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
0642cab to
c94d63f
Compare
c94d63f to
1a142b8
Compare
|
Latest public ClawSweeper review (
|
…#122408) Let eligible embedded host runs inspect root-approved unsupported documents after final sandbox, filesystem, provider, owner, and tool-policy gates. Generic ACP, sandboxed, URL-only, and restricted-tool paths retain the plain marker. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Unsupported local documents (DOCX, XLSX, …) currently yield a capability marker and dead-end even when the host-run agent can inspect the saved file itself.
Why This Change Was Made
unsupported-formatnow retains the cache-approved local path through preprocessing, then promotes the plain marker only after the final embedded provider, owner, tool, sandbox, and filesystem policy permit host reads. The marker directs the agent to extract the file itself; OOXML gets an unzip hint. URL-only attachments, generic ACP, sandboxed sessions, unsafe filenames, and operator-policy rejections retain the plain marker. No parsers, dependencies, or config.User Impact
A default host-run agent can inspect a locally saved unsupported document instead of asking the sender to paste its contents.
Maintainer Decision
Approved by Ayaan on 2026-08-12: eligible embedded host runs may include the root-approved absolute attachment path in model context after sandbox, filesystem-scope, final provider/tool-policy, and authoritative owner gates pass.
Evidence
sandbox.mode: non-main; restricted tools, workspace-only filesystems, final provider policy, owner policy, classified MIME, and shell metacharacters each reproduce before their repair and pass afterward.tsgo, andcheck:test-typesclean.Telegram DOCX proof —
f126696438cb6c3f1205eca8f010a6f2564c0961e2e-quarterly-report.docxwith “Please read this document and summarize it.” as message 917.OPENCLAW_E2E_OK.[Unsupported document format: application/vnd.openxmlformats-officedocument.wordprocessingml.document. The approved local file path follows as external attachment metadata. Its text is not extracted automatically. Read the file yourself with your tools before answering (this Office file is a zip archive containing XML); do not ask the user to paste the contents.]<managed-media-path>/e2e-quarterly-report---<id>.docxappeared only inside its ownEXTERNAL_UNTRUSTED_CONTENTfence.events.ndjson,summary.json,gateway.log, andmock-openai-requests.ndjson.Review Scope Notes
/,\\,:,.,_, and-. Prompt markup and executable shell syntax suppress self-service.allowedMimesrejection wins before any path can be named.