Answer: Configure default headers on the supplied HttpClient using HttpClientRequest.setHeaders within HttpClient.mapRequest, passing an object of headers such as authorization. Status: Confirmed Entry: tool/opencode/integrations/effect-client-headers Revision: 2 Digest: sha256:6400f3a2380b886c (changes whenever the content changes) Timeline: Created: 2026-11-13T13:28:33Z Last changed: 2026-11-19T13:34:35Z (Check succeeded again) Last verified: 2026-11-20T13:44:24Z Next check: 2026-11-21T13:44:24Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of method | HttpClientRequest.setHeaders | [1] | 2026-11-20 example header | authorization: `Bearer ${process.env.OPENCODE_TOKEN}` | [1] | 2026-11-20 per-call options | location, header, and signal options | [1] | 2026-11-20 Sources: [1] opencode. "Effect client | OpenCode". https://opencode.ai/docs/build/client/effect/ Role: primary. Accessed: 2026-11-20T13:44:24Z Quote: "HttpClientRequest.setHeaders(request, { authorization: `Bearer ${process.env.OPENCODE_TOKEN}` })" (Supports: method) Quote: "authorization: `Bearer ${process.env.OPENCODE_TOKEN}`" (Supports: example header) Quote: "RPC methods additionally accept per-call location, header, and signal options." (Supports: per-call options) Snapshot SHA-256: 01fc331726cb2783a625e6d34b525da2a10e27439fc762d42b6078b5dc4ed08d (captured 2026-11-18T13:38:02Z) 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-19T13:34:35Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:24Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:24Z Last attempt: 2026-11-20T13:44:24Z Notes and limitations: Extracted automatically from a single official source (section "Headers and requests"). Related: https://latestn.com/tool/opencode/integrations/effect-plugin-rpc How do I call opencode plugin RPC methods from the Effect client? https://latestn.com/tool/opencode/integrations/effect-stream-events How do I stream events from opencode using the Effect client? https://latestn.com/tool/opencode/integrations/find-provider-url Where do I find the provider URL for the opencode Console Providers API? https://latestn.com/tool/opencode/integrations/define-gui-plugin How do I define a GUI plugin for opencode? https://latestn.com/tool/opencode/integrations/define-rpc-methods-errors-events How do I define RPC methods, errors, and events in an opencode plugin? https://latestn.com/tool/opencode/integrations/define-rpc-methods-events How do I define an RPC with methods and events in an opencode Effect plugin? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:34:35Z | recovered | Check succeeded again | — 2026-11-19T13:34:35Z | changed | example header: — → authorization: `Bearer ${process.env.OPENCODE_TOKEN}` | [1] 2026-11-19T13:34:35Z | changed | configuration approach: Configure default headers on the supplied HttpClient → — | [1] 2026-11-18T13:38:02Z | check-failed | Extraction did not pass verification: answer does not contain any extracted value | — 2026-11-13T13:28:33Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/effect-client-headers/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/integrations/effect-client-headers POST: https://latestn.com/dispute/tool/opencode/integrations/effect-client-headers with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/effect-client-headers?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I add custom headers to requests with the opencode Effect client? Revision 2, last verified 2026-11-20T13:44:24Z. https://latestn.com/tool/opencode/integrations/effect-client-headers (accessed 2026-11-21T09:50:26Z). @misc{LatestN_tool_opencode_integrations_effect_client_headers_r2, title = {How do I add custom headers to requests with the opencode Effect client?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/effect-client-headers}}, note = {Revision 2; digest sha256:6400f3a2380b886c; last verified 2026-11-20T13:44:24Z; accessed 2026-11-21T09:50:26Z} } 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/integrations/effect-client-headers