Repository navigation
Closed
Labels
P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.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.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
Description
Summary
Inbound PDFs from messaging channels and the Control UI are represented as media pointers, but text-only/locked-down agents do not automatically receive bounded PDF text context. They can therefore see only an attachment name or media://inbound/... marker and fail to summarize the document.
Observed behavior
- Signal group inbound PDF messages included
MediaPath,MediaPaths,MediaType=application/pdf, andMediaTypes, but the prompt only contained a media marker. - The locked-down group bot did not have broad file/read/exec tools and should not receive them.
- Control UI/Emma uses the embedded runner path, not the auto-reply path, so fixing only
get-replywas insufficient.
Expected behavior
- Auto-reply and embedded-runner prompt construction should inject bounded text extracted from managed inbound PDF media before the user request.
- Extracted text must be clearly marked as untrusted document content.
- The same behavior should work for Signal/group-bot and Control UI/embedded runner paths.
Safety constraints
- Resolve only managed
media://inbound/*or media-store-owned inbound paths. - Cap extraction at roughly 3 PDFs, 25 MB per PDF, 150 pages, 120k chars, and 15s timeout.
- Do not grant group bots or Control UI agents broad
read,exec, or arbitrary filesystem access.
Local runtime evidence
The local runtime fix extracted bounded PDF context for both the auto-reply path and embedded runner path. Joey's 15.6 MB / 58-page Control UI upload logged embedded inbound PDF context extracted ... chars=72791 and returned a substantive summary.
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:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.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.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.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:38 AM ET / 11:38 UTC.
Summary
Keep open: current main still does not satisfy the large managed-PDF case, and the canonical implementation is the still-open linked PR at #92220.
Reproducibility: yes. at source level: current main still has 5 MB / 4-page extraction defaults and rejects a 6 MB sandboxed PDF offload before dispatch. I did not run a live Signal or Control UI repro in this read-only review.
Next step
Do not queue a new fix PR because the issue already has an open linked implementation PR for maintainers to review.
Security
Needs attention: The issue is security-sensitive because the fix must preserve managed-media-only resolution and untrusted document wrapping.
Review details
Best possible solution:
Review and land #92220 if maintainers accept the extraction envelope and managed-media fallback contract, then close this issue after that merge.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level: current main still has 5 MB / 4-page extraction defaults and rejects a 6 MB sandboxed PDF offload before dispatch. I did not run a live Signal or Control UI repro in this read-only review.
Is this the best way to solve the issue?
Yes, the linked implementation direction appears best because it reuses the existing media-understanding extraction and injection path instead of adding a parallel prompt-context module. The remaining decision is whether maintainers accept the larger default extraction envelope and managed-media fallback behavior.
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:needs-security-review: Current issue advisory state selects this label.clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.Label justifications:
P2: The issue affects PDF understanding for locked-down agents but is bounded to media prompt construction and gateway media handling rather than a core outage.impact:security: The requested fix must preserve managed-inbound-media resolution and untrusted-document boundaries without granting broad file or exec access.impact:message-loss: Large inbound PDF content can be reduced to a media marker or rejected before dispatch, so the document text is not delivered to the model.Evidence reviewed
Security concerns:
Any fix should extract only managed inbound PDF media and wrap extracted content as untrusted; granting broad read or exec access would cross the intended sandbox boundary.
Confidence: 0.9
What I checked:
AGENTS.md:11, 8682d0701b27)VISION.md:21, 8682d0701b27)src/media-understanding/apply.ts:102, 8682d0701b27)src/media/input-files.ts:126, 8682d0701b27)src/gateway/server-methods/chat.ts:1375, 8682d0701b27)src/gateway/server-methods/chat.directive-tags.test.ts:5576, 8682d0701b27)Likely related people:
src/media-understanding/apply.ts,src/media-understanding/file-extraction-limits.ts,src/gateway/server-methods/chat.ts)src/media-understanding/apply.ts,src/media/input-files.ts)src/gateway/server-methods/chat.ts,src/media-understanding/apply.ts)src/gateway/server-methods/chat.ts)src/media/inbound-pdf-context.ts,src/auto-reply/reply/prompt-prelude.ts,src/gateway/server-methods/chat.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(media): extract large managed inbound PDFs via media-understanding (
fix(media): extract large managed inbound PDFs via media-understanding (
fix(media): extract large managed inbound PDFs via media-understanding (