Answer: You attach a reference by its root alias in your client; the attachment contains a non-recursive listing of the root's immediate files and directories. For example, attach the alias docs and then ask the agent to inspect a specific path. Status: Overdue (check was due 2026-11-20T13:37:20Z and has not succeeded) Entry: tool/opencode/features/attach-reference-alias Revision: 1 Digest: sha256:140c6a96153cb2dc (changes whenever the content changes) Timeline: Created: 2026-11-13T03:58:07Z Last changed: 2026-11-13T03:58:07Z Last verified: 2026-11-19T13:37:20Z Next check: 2026-11-20T13:37:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of attachment method | Clients attach a reference by its root alias. | [1] | 2026-11-19 attachment contents | The attachment contains a non-recursive listing of the root’s immediate files and directories. | [1] | 2026-11-19 example alias | docs | [1] | 2026-11-19 example request | Inspect docs/guides/deployment.md and explain the deployment steps. | [1] | 2026-11-19 alias restrictions | An alias cannot be empty or contain / , \ , whitespace, a backtick, or a comma. | [1] | 2026-11-19 Sources: [1] opencode. "References | OpenCode". https://opencode.ai/docs/references/ Role: primary. Accessed: 2026-11-19T13:37:20Z Quote: "Clients attach a reference by its root alias." (Supports: attachment method) Quote: "The attachment contains a non-recursive listing of the root’s immediate files and directories." (Supports: attachment contents) Quote: "Attached alias: docs" (Supports: example alias) Quote: "Inspect docs/guides/deployment.md and explain the deployment steps." (Supports: example request) Quote: "An alias cannot be empty or contain / , \ , whitespace, a backtick, or a comma." (Supports: alias restrictions) Snapshot SHA-256: c7d00f8bd3cada26d2179651cb9b423e30f0569c773b4907f81c5c9ca322cb02 (captured 2026-11-13T03:58:07Z) 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:58:07Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:37:20Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:37:20Z Last attempt: 2026-11-19T13:37:20Z Notes and limitations: Extracted automatically from a single official source (section "References"). Related: https://latestn.com/tool/opencode/features/builtin-formatters Which built-in formatters does opencode include? https://latestn.com/tool/opencode/features/builtin-themes Which built-in themes does opencode include? https://latestn.com/tool/opencode/features/create-custom-theme How do I create a custom theme for opencode? https://latestn.com/tool/opencode/features/acp-protocol-capabilities What ACP protocol capabilities and session features does opencode support? https://latestn.com/tool/opencode/features/attach-file-to-prompt How do I attach a file to a prompt in opencode? 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/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:58:07Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/features/attach-reference-alias/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-reference-alias POST: https://latestn.com/dispute/tool/opencode/features/attach-reference-alias with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/features/attach-reference-alias?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I attach a reference alias in the opencode client? Revision 1, last verified 2026-11-19T13:37:20Z. https://latestn.com/tool/opencode/features/attach-reference-alias (accessed 2026-11-21T09:50:23Z). @misc{LatestN_tool_opencode_features_attach_reference_alias_r1, title = {How do I attach a reference alias in the opencode client?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/features/attach-reference-alias}}, note = {Revision 1; digest sha256:140c6a96153cb2dc; last verified 2026-11-19T13:37:20Z; accessed 2026-11-21T09:50:23Z} } 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-reference-alias