Chat PDF attachments are retained in history but unavailable to workspace/MCP file workflows
Summary
In the Windows desktop app, PDFs attached in chat remain intact in the saved conversation, but were not available as files in the session workspace. This blocked an agent workflow that needed to send the original PDF bytes to an MCP tool. The assistant reported that it only had extracted text and asked the user to save the files manually, although the original bytes were still present locally.
This may be a missing attachment-to-tool interface rather than lost data. Is there an intended supported way for an agent to retrieve an attachment's original bytes or obtain a session-scoped file path?
Environment
- Windows desktop, OpenWorker 0.2.1.
- Selected model shown in the affected conversation: DeepSeek V4 Flash.
- An HTTP MCP service with a PDF upload tool accepting
filenameandcontent_base64.
Observed workflow
- Attach a blank PDF form and a project-information PDF through the chat composer.
- Ask the assistant to populate the form from the project information using the connected tools.
- The assistant lists the workspace. The original PDFs are absent.
- It creates a Markdown draft instead of uploading the actual target PDF, explaining that it only has extracted text.
- After being challenged, it searches the workspace again but still does not retrieve the original attachments.
Evidence from the affected session
- The saved user message contains two
type: filecontent parts, each withfile.filenameand afile.file_dataPDF data URL. - Decoding those values recovered valid PDF headers and complete files of 36,672 and 7,473 bytes.
- The workspace contained neither original PDF before recovery.
- Manually recovering the target PDF and uploading it through the same MCP gateway succeeded; the remote tool could inspect the real file.
The original documents and conversation contain project information, so they are not attached to this public report. The observations above are from the affected session, not a claim of a fresh reproduction on current main.
Expected behavior
Attachments should have a discoverable, supported route to local tools and byte-oriented MCP workflows, even when the active model receives a text or image fallback. Possible approaches include a session-scoped attachment retrieval tool, or safe materialization into the workspace with the path included in the attachment metadata.
The model should not need to reconstruct base64, search application-wide conversation logs, or ask the user to save a file that the app already holds. A clear unsupported-workflow message would also be preferable to claiming that the original data does not exist.
Scope and related reports
- #490 describes files missing after selecting a directory; this case starts with chat-composer attachments retained in conversation history.
- #481 describes image input stripped by incorrect model capability flags. That is a related user-visible symptom, but image loss has not been independently reproduced for this report.
- #667 concerns OCR fallback. This report concerns access to original bytes, regardless of whether text extraction succeeds.
- The downstream form service separately does not support writing this particular flat PDF. That limitation remains after successful upload and is not an OpenWorker bug. This report is only about reaching the original attachment through the agent/tool workflow.
Suggested regression check
Attach a small synthetic PDF in the composer while using a model with PDF text fallback. Confirm that an authorized local or MCP workflow can obtain the exact original bytes through a documented attachment interface, with a matching digest, without inspecting unrelated sessions or generating base64 through the model.
Source: andrewyng/openworker