Repository navigation
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Description
Summary
chat.send can offload large PDFs to the managed inbound media store, but already-managed inbound PDFs may still be forced through optional sandbox staging. If staging is unavailable or incomplete, the send fails even though the managed media path is already safe to pass as MediaPath/MediaPaths.
Observed behavior
- A large PDF uploaded through the Control UI was saved as managed inbound media.
- The gateway attempted optional sandbox staging and could fail before the agent saw the media path.
Expected behavior
- If every non-image offloaded reference is an
application/pdfsaved under the managed inbound media store, the gateway should pass those paths through asMediaPath/MediaPathsandMediaType/MediaTypes. - If optional sandbox staging fails for that same already-managed inbound PDF case, the gateway should fall back to the managed paths instead of deleting the media and failing the send.
Safety constraints
- Only managed inbound media-store PDF paths should get this pass-through.
- Do not allow arbitrary local paths or
media://references from untrusted input. - Do not grant locked-down agents
readorexec.
Local runtime evidence
The local runtime fix allowed already-saved inbound PDFs to continue as managed media paths. A full gateway chat.send smoke with the Semianalysis PDF returned status:"started" and logged successful offload without fresh stack/staging errors.
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Jun 4, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 15, 2026, 7:37 AM ET / 11:37 UTC.
Summary
Keep this issue open: current main and latest release still route sandboxed managed inbound PDF offloads through the failing staging path, and two open PRs explicitly close this issue. The right cleanup is to land or close the canonical PR first, then close this issue as implemented after merge.
Reproducibility: yes. at source level: current main routes sandboxed non-image PDF offloads through
prestageMediaPathOffloads, where oversize, throw, or incomplete staging fails before dispatch. I did not run a live gateway smoke because this review is read-only.Next step
Do not queue a separate repair job because open closing PRs already implement candidate fixes for this issue.
Review details
Best possible solution:
Review and land one canonical fix, likely #92220 if maintainers accept its broader extraction envelope, then close this issue after the merge proves the managed-PDF path on main.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level: current main routes sandboxed non-image PDF offloads through
prestageMediaPathOffloads, where oversize, throw, or incomplete staging fails before dispatch. I did not run a live gateway smoke because this review is read-only.Is this the best way to solve the issue?
Yes, the requested fix shape is narrow if it reuses
resolveInboundMediaReference, stays PDF-only, and keeps non-PDF or untrusted paths fail-closed. A separate ClawSweeper repair job is not the best path now because open PRs already own the implementation candidates.AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 8682d0701b27.
Label changes
Label changes:
clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.Label justifications:
P2: This is a bounded gateway attachment delivery bug with real PDF send impact but no evidence of broad runtime outage.impact:message-loss: The issue is about a PDF attachment failing before it reaches the agent as an inbound media path.Evidence reviewed
What I checked:
src/gateway/server-methods/chat.ts:1375, 8682d0701b27)chat.sendparses attachments, accepts non-image offloads, and callsprestageMediaPathOffloadsbefore the turn is dispatched, so this failure happens before the agent sees the PDF. (src/gateway/server-methods/chat.ts:3348, 8682d0701b27)src/gateway/server-methods/chat.directive-tags.test.ts:5398, 8682d0701b27)resolveInboundMediaReferenceaccepts canonical inbound refs or first-level inbound media-store paths while rejecting nested or escaping paths, which is the narrow trust boundary the issue requests. (src/media/media-reference.ts:188, 8682d0701b27)v2026.6.6still contains the oversize sandbox rejection and incomplete-staging failure text, and has no managed-PDF fallback symbol in this path. (src/gateway/server-methods/chat.ts:1363, 8c802aa68351)maintainerlabel.Likely related people:
chat.sendpath and media-understanding extraction limits. (role: current proposed fix owner; confidence: high; commits: 5ceefc76cb73, 451ed20afb20; files:src/gateway/server-methods/chat.ts,src/gateway/server-methods/chat.directive-tags.test.ts,src/media-understanding/apply.ts)src/gateway/server-methods/chat.ts,src/gateway/server-methods/chat.directive-tags.test.ts)chat.sendattachment offload feature that this issue extends to commit 25ef9c0. (role: introduced adjacent behavior; confidence: medium; commits: 25ef9c0c419d; files:src/gateway/chat-attachments.ts,src/gateway/server-methods/chat.ts)src/media/media-reference.ts,src/auto-reply/reply/stage-sandbox-media.ts,src/gateway/chat-attachments.ts)src/gateway/chat-attachments.ts,src/gateway/server-methods/chat.ts,src/auto-reply/reply/stage-sandbox-media.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.fix(gateway): pass managed inbound PDFs through when sandbox staging …
fix(gateway): fall back to managed path when inbound PDF sandbox stag…
fix(gateway): pass managed inbound PDFs through chat.send (#90115)
fix(media): extract large managed inbound PDFs via media-understanding (
fix(gateway): fall back to managed path when inbound PDF sandbox stag…
fix(media): extract large managed inbound PDFs via media-understanding (
fix(gateway): fall back to managed path when inbound PDF sandbox stag…
fix(gateway): pass managed inbound PDFs through chat.send (openclaw#9…
fix(media): extract large managed inbound PDFs via media-understanding (
fix(gateway): fall back to managed path when inbound PDF sandbox stag…