Answer: In the desktop or web client, choose Attach file, paste a file, or drag it into the prompt. Desktop file-picker selections can total up to 20 MiB. Status: Confirmed Entry: tool/opencode/features/attach-file-to-prompt Revision: 1 Digest: sha256:7f481044f9a8b9ff (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:31Z Last changed: 2026-11-13T03:55:31Z Last verified: 2026-11-20T13:44:18Z Next check: 2026-11-21T13:44:18Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Unit | Source | As of method | choose Attach file , paste a file, or drag it into the prompt | | [1] | 2026-11-20 desktop size limit | 20 MiB | MiB | [1] | 2026-11-20 Sources: [1] opencode. "Attachments | OpenCode". https://opencode.ai/docs/attachments/ Role: primary. Accessed: 2026-11-20T13:44:18Z Quote: "In the desktop or web client, choose Attach file , paste a file, or drag it into the prompt." (Supports: method) Quote: "Desktop file-picker selections can total up to 20 MiB." (Supports: desktop size limit) Snapshot SHA-256: d4917fc2943f489fa62cacb738a4ff92104dee9fdd1cec1d9989f5cae3ca7986 (captured 2026-11-15T13:52:36Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:55:31Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:18Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:18Z Last attempt: 2026-11-20T13:44:18Z Notes and limitations: Extracted automatically from a single official source (section "Attach"). Related: https://latestn.com/tool/opencode/features/attach-file-to-prompt-2 How do I attach a file to a prompt in opencode TUI? https://latestn.com/tool/opencode/features/attach-reference-alias How do I attach a reference alias in the opencode client? https://latestn.com/tool/opencode/features/builtin-formatters Which built-in formatters does opencode include? https://latestn.com/tool/opencode/commands-and-shortcuts/view-command-help-flags How do I see the full list of flags for an opencode command? https://latestn.com/tool/opencode/features/access-web-ui How do I access the opencode web UI? https://latestn.com/tool/opencode/features/acp-protocol-capabilities What ACP protocol capabilities and session features does opencode support? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:55:31Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/features/attach-file-to-prompt/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/features/attach-file-to-prompt POST: https://latestn.com/dispute/tool/opencode/features/attach-file-to-prompt with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/features/attach-file-to-prompt?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I attach a file to a prompt in opencode? Revision 1, last verified 2026-11-20T13:44:18Z. https://latestn.com/tool/opencode/features/attach-file-to-prompt (accessed 2026-11-21T09:54:07Z). @misc{LatestN_tool_opencode_features_attach_file_to_prompt_r1, title = {How do I attach a file to a prompt in opencode?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/features/attach-file-to-prompt}}, note = {Revision 1; digest sha256:7f481044f9a8b9ff; last verified 2026-11-20T13:44:18Z; accessed 2026-11-21T09:54:07Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/features/attach-file-to-prompt