acp-command unhandled rejection #2629

Open
opened 2026-02-16 17:36:32 -05:00 by yindo · 6 comments
Owner

Originally created by @fnigsch on GitHub (Nov 6, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

Running opencode in a company where any network traffic needs to go through company proxy. I found that opencode crashes in function of http_proxy being set or not. https_proxy does not have the same effect. This was not the case with versions <1.0.0.

Setting http_proxy to the actual proxy address results in opencode crashing:

ERROR 2025-11-06T13:32:45 +1322ms service=acp-command promise={} reason=undefined is not an object (evaluating 'x3.data.providers') Unhandled rejection
ERROR 2025-11-06T13:32:45 +0ms service=default e=undefined is not an object (evaluating 'x3.data.providers') rejection
ERROR 2025-11-06T13:32:45 +27ms service=default e=Failed to create optimized buffer: undefinedxNaN exception

Setting http_proxy to the string "nonexistent" results in opencode crashing:

ERROR 2025-11-06T13:45:28 +1263ms service=acp-command promise={} reason=Unable to connect. Is the computer able to access the url? Unhandled rejection
ERROR 2025-11-06T13:45:28 +0ms service=default e=Unable to connect. Is the computer able to access the url? rejection
ERROR 2025-11-06T13:45:28 +18ms service=default e=Failed to create optimized buffer: undefinedxNaN exception
ERROR 2025-11-06T13:45:28 +1ms service=acp-command promise={} reason=Unable to connect. Is the computer able to access the url? Unhandled rejection
ERROR 2025-11-06T13:45:28 +0ms service=default e=Unable to connect. Is the computer able to access the url? rejection

OpenCode version

1.0.35

Steps to reproduce

See above.

Screenshot and/or share link

No response

Operating System

macOS 15.7.1

Terminal

iTerm2, gohstty, and MacOS System terminal all give the same

Originally created by @fnigsch on GitHub (Nov 6, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description Running opencode in a company where any network traffic needs to go through company proxy. I found that opencode crashes in function of http_proxy being set or not. https_proxy does not have the same effect. This was not the case with versions <1.0.0. Setting http_proxy to the actual proxy address results in opencode crashing: ERROR 2025-11-06T13:32:45 +1322ms service=acp-command promise={} reason=undefined is not an object (evaluating 'x3.data.providers') Unhandled rejection ERROR 2025-11-06T13:32:45 +0ms service=default e=undefined is not an object (evaluating 'x3.data.providers') rejection ERROR 2025-11-06T13:32:45 +27ms service=default e=Failed to create optimized buffer: undefinedxNaN exception Setting http_proxy to the string "nonexistent" results in opencode crashing: ERROR 2025-11-06T13:45:28 +1263ms service=acp-command promise={} reason=Unable to connect. Is the computer able to access the url? Unhandled rejection ERROR 2025-11-06T13:45:28 +0ms service=default e=Unable to connect. Is the computer able to access the url? rejection ERROR 2025-11-06T13:45:28 +18ms service=default e=Failed to create optimized buffer: undefinedxNaN exception ERROR 2025-11-06T13:45:28 +1ms service=acp-command promise={} reason=Unable to connect. Is the computer able to access the url? Unhandled rejection ERROR 2025-11-06T13:45:28 +0ms service=default e=Unable to connect. Is the computer able to access the url? rejection ### OpenCode version 1.0.35 ### Steps to reproduce See above. ### Screenshot and/or share link _No response_ ### Operating System macOS 15.7.1 ### Terminal iTerm2, gohstty, and MacOS System terminal all give the same
yindo added the bug label 2026-02-16 17:36:32 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2025):

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

  • #3868: Same exact error message "undefined is not an object (evaluating 'x3.data.providers')" with acp-command unhandled rejection
  • #3730: Similar acp-command connection issues with "ENOTCONN: socket is not connected" and unhandled rejections

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Nov 6, 2025): This issue might be a duplicate of existing issues. Please check: - #3868: Same exact error message "undefined is not an object (evaluating 'x3.data.providers')" with acp-command unhandled rejection - #3730: Similar acp-command connection issues with "ENOTCONN: socket is not connected" and unhandled rejections Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Nov 6, 2025):

someone said if u unset HTTP_PROXY it should fix it

just helped someone with same issue

@rekram1-node commented on GitHub (Nov 6, 2025): someone said if u unset `HTTP_PROXY` it should fix it just helped someone with same issue
Author
Owner

@floux commented on GitHub (Nov 6, 2025):

thanks @rekram1-node. unsetting http_proxy means that opencode won't be able to communicate via http anymore with the outside world. Is that not required? is https enough?

@floux commented on GitHub (Nov 6, 2025): thanks @rekram1-node. unsetting http_proxy means that opencode won't be able to communicate via http anymore with the outside world. Is that not required? is https enough?
Author
Owner

@floux commented on GitHub (Nov 6, 2025):

Running a minimal example such as

opencode run "hello" --format json --print-logs --log-level DEBUG

indicates that no_proxy should probably contain 127.0.0.1:

ERROR 2025-11-06T20:05:51 +9ms service=default name=Error message=Unable to connect. Is the computer able to access the url? fatal
Error: Unexpected error, check log file at  for more details

error: Unable to connect. Is the computer able to access the url?
  path: "http://127.0.0.1:58443/session",
 errno: 0,
  code: "ConnectionRefused"

Will have to try this later in the original setting where I encountered the error.

@floux commented on GitHub (Nov 6, 2025): Running a minimal example such as `opencode run "hello" --format json --print-logs --log-level DEBUG` indicates that no_proxy should probably contain 127.0.0.1: ``` ERROR 2025-11-06T20:05:51 +9ms service=default name=Error message=Unable to connect. Is the computer able to access the url? fatal Error: Unexpected error, check log file at for more details error: Unable to connect. Is the computer able to access the url? path: "http://127.0.0.1:58443/session", errno: 0, code: "ConnectionRefused" ``` Will have to try this later in the original setting where I encountered the error.
Author
Owner

@caomingpei commented on GitHub (Nov 6, 2025):

thanks @rekram1-node. unsetting http_proxy means that opencode won't be able to communicate via http anymore with the outside world. Is that not required? is https enough?

I had the same issue. After unsetting http_proxy, the problem was resolved. It seems that https_proxy alone is sufficient for my use case.

@caomingpei commented on GitHub (Nov 6, 2025): > thanks [@rekram1-node](https://github.com/rekram1-node). unsetting http_proxy means that opencode won't be able to communicate via http anymore with the outside world. Is that not required? is https enough? I had the same issue. After unsetting http_proxy, the problem was resolved. It seems that https_proxy alone is sufficient for my use case.
Author
Owner

@fastknifes commented on GitHub (Jan 13, 2026):

Image

run opencode acp no response
why ?

@fastknifes commented on GitHub (Jan 13, 2026): <img width="650" height="227" alt="Image" src="https://github.com/user-attachments/assets/4876fc7e-95a2-4e03-8a6a-2220f36bceec" /> run `opencode acp` no response why ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2629