[Bug] OpenCode Crashes on Launch When http_proxy Environment Variable is Set #4338

Open
opened 2026-02-16 17:43:28 -05:00 by yindo · 2 comments
Owner

Originally created by @dsdashun on GitHub (Jan 6, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

OpenCode crashes immediately on startup when the http_proxy environment variable is set with the right value, displaying [object Object] .

Plugins

None

OpenCode version

1.1.4

Steps to reproduce

  1. Make sure the proxy can be connected successfully
  2. Start the opencode with the http_proxy environment set, like the following command:
http_proxy='http://127.0.0.1:18080' opencode

Some additional points:

  • If the endpoint cannot be connected, the error message is different, please see the screenshot below.
  • If the http_proxy is not set, it can be started successfully.
  • If start OpenCode with some other similar environment variables, like https_proxy, all_proxy, it also can be started successfully, except http_proxy .

Screenshot and/or share link

http_proxy is set with a normal endpoint:

Image

http_proxy is set with a wrong endpoint:

Image

Operating System

Debian 12.12

Terminal

Windows Terminal

Originally created by @dsdashun on GitHub (Jan 6, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description OpenCode crashes immediately on startup when the `http_proxy` environment variable is set with the right value, displaying `[object Object]` . ### Plugins None ### OpenCode version 1.1.4 ### Steps to reproduce 1. Make sure the proxy can be connected successfully 2. Start the opencode with the `http_proxy` environment set, like the following command: ``` http_proxy='http://127.0.0.1:18080' opencode ``` Some additional points: - If the endpoint cannot be connected, the error message is different, please see the screenshot below. - If the `http_proxy` is not set, it can be started successfully. - If start OpenCode with some other similar environment variables, like `https_proxy`, `all_proxy`, it also can be started successfully, except `http_proxy` . ### Screenshot and/or share link `http_proxy` is set with a normal endpoint: <img width="590" height="53" alt="Image" src="https://github.com/user-attachments/assets/69ebe9b6-7ce5-4684-bdbc-ed8b5e645ef4" /> `http_proxy` is set with a wrong endpoint: <img width="805" height="57" alt="Image" src="https://github.com/user-attachments/assets/40c1ab94-e99d-493d-82dd-4ccc4eeec122" /> ### Operating System Debian 12.12 ### Terminal Windows Terminal
yindo added the bug label 2026-02-16 17:43:28 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 6, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5206: [object Object] error output when running opencode over SSH

Both issues show the same [object Object] error being displayed instead of a proper error message. While #5206 occurs over SSH, the underlying cause might be the same error handling issue that manifests in both scenarios.

Feel free to ignore if your specific case is different.

@github-actions[bot] commented on GitHub (Jan 6, 2026): This issue might be a duplicate of existing issues. Please check: - #5206: `[object Object]` error output when running opencode over SSH Both issues show the same `[object Object]` error being displayed instead of a proper error message. While #5206 occurs over SSH, the underlying cause might be the same error handling issue that manifests in both scenarios. Feel free to ignore if your specific case is different.
Author
Owner

@rekram1-node commented on GitHub (Jan 7, 2026):

hmm crashing is v bad but also see here:
https://opencode.ai/docs/network/

You are missing at least 1 var

@rekram1-node commented on GitHub (Jan 7, 2026): hmm crashing is v bad but also see here: https://opencode.ai/docs/network/ You are missing at least 1 var
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4338