Skip to content

acp-command unhandled rejection #3989

Closed

Description

@fnigsch

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 6, 2025
  2. github-actions commented on Nov 6, 2025

    @github-actions
    Contributor

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

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

  3. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 6, 2025
  4. self-assigned this
    on Nov 6, 2025
  5. rekram1-node commented on Nov 6, 2025

    @rekram1-node
    Contributor

    someone said if u unset HTTP_PROXY it should fix it

    just helped someone with same issue

  6. floux commented on Nov 6, 2025

    @floux

    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?

  7. floux commented on Nov 6, 2025

    @floux

    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.

  8. caomingpei commented on Nov 7, 2025

    @caomingpei

    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.

  9. fastknifes commented on Jan 14, 2026

    @fastknifes
    Image

    run opencode acp no response
    why ?

  10. thdxr commented on Mar 25, 2026

    @thdxr
    Member

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions