Skip to content

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

Closed as not planned

Description

@nicehiro

Description

Hi,

When running opencode via SSH on a remote server, the application outputs [object Object] instead of a proper error message or UI. Additionally, terminal escape sequences are not handled correctly, resulting in garbled output.

OpenCode version

1.0.134

Steps to reproduce

  1. On Ubuntu 20 docker image, install opencode using: curl -fsSL https://opencode.ai/install | bash
  2. Run opencode --print-logs --log-level DEBUG

Screenshot and/or share link

root@subgoalvla-111010-task1-0:~/openpi# opencode --print-logs --log-level DEBUG
INFO  2025-12-07T15:09:43 +169ms service=default version=1.0.134 args=["--print-logs","--log-level","DEBUG"] opencode
[object Object]
root@subgoalvla-111010-task1-0:~/openpi# :>|ghostty 1.2.3^[\^[[?0u^[[4;1720;3000t

Operating System

Ubuntu 22.04

Terminal

Using ghostty on MacOS to connect remote by ssh

Activity

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

    @github-actions
    Contributor

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

    These issues also report SSH connection problems with terminal escape sequences and output corruption. The [object Object] error and garbled escape sequences you're seeing may be related to how opentui handles terminal detection and output formatting over SSH.

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

  3. self-assigned this
    on Dec 7, 2025
  4. junjieit commented on Dec 10, 2025

    @junjieit

    I encountered this error even though I wasn't using SSH.

    ➜  ~ opencode --print-logs --log-level DEBUG
    INFO  2025-12-10T11:38:03 +222ms service=default version=1.0.141 args=["--print-logs","--log-level","DEBUG"] opencode
    [object Object]
    ➜  ~

    Operating System

    Linux archhostname 6.17.9-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Mon, 24 Nov 2025 15:21:16 +0000 x86_64 GNU/Linux

    Terminal

    Ghostty

  5. junjieit commented on Dec 11, 2025

    @junjieit

    The error on my end occurred because I had a network proxy enabled.
    The error likely originates from this location: https://github.com/sst/opencode/blob/dev/packages/sdk/js/src/v2/gen/client/client.gen.ts#L196

  6. nicehiro commented on Dec 11, 2025

    @nicehiro
    Author

    The error on my end occurred because I had a network proxy enabled.

    Same here. I also have a local proxy set.

  7. junjieit commented on Dec 11, 2025

    @junjieit

    You can bypass the local address first.

    export NO_PROXY=localhost,127.0.0.1,::1
  8. nicehiro commented on Dec 11, 2025

    @nicehiro
    Author

    You can bypass the local address first.

    export NO_PROXY=localhost,127.0.0.1,::1

    Thanks for the suggestion. However, my situation is a bit different — I actually need the proxy to access the full network (e.g., npm registries and other external resources).
    If I set NO_PROXY, the opencode CLI itself seems to work, but it still fails to launch properly because some dependencies can't be downloaded without the proxy.

  9. timiil commented on Dec 24, 2025

    @timiil

    same problem here?

    timiil@tim-work:~$ opencode --print-logs --log-level DEBUG
    INFO  2025-12-24T03:39:13 +175ms service=default version=1.0.193 args=["--print-logs","--log-level","DEBUG"] opencode
    [object Object]
    

    in a new wsl ubuntu 24.04.
    thanks for help

  10. timiil commented on Dec 24, 2025

    @timiil

    very strange, ssh from a lan computer and start opencode is OK. the problem is related by Terminal ?

  11. nicehiro commented on Dec 24, 2025

    @nicehiro
    Author

    @timiil I guess the problem is related to using proxy.

    I have following configs in my .bashrc as here

    export HTTP_PROXY=xxx
    export HTTPS_PROXY=xxx
    export NO_PROXY=localhost,127.0.0.1
    

    And also I need to set:

    export OPENCODE_DISABLE_DEFAULT_PLUGINS=1
    

    And now I can use opencode.

  12. timiil commented on Dec 24, 2025

    @timiil

    @timiil I guess the problem is related to using proxy.

    I have following configs in my .bashrc as here

    export HTTP_PROXY=xxx
    export HTTPS_PROXY=xxx
    export NO_PROXY=localhost,127.0.0.1
    

    And also I need to set:

    export OPENCODE_DISABLE_DEFAULT_PLUGINS=1
    

    And now I can use opencode.

    seems not , i do have these envs:

    timiil@tim-work:~/jpda$ echo $http_proxy
    http://127.0.0.1:10811
    timiil@tim-work:~/jpda$ echo $https_proxy
    http://127.0.0.1:10811
    timiil@tim-work:~/jpda$ echo $HTTP_PROXY
    http://127.0.0.1:10811
    timiil@tim-work:~/jpda$ echo $HTTPS_PROXY
    http://127.0.0.1:10811
    timiil@tim-work:~/jpda$ opencode
    [object Object]
    
  13. nicehiro commented on Dec 24, 2025

    @nicehiro
    Author
  14. timiil commented on Dec 24, 2025

    @timiil

    Do you have no_proxy env variable settings?
    …

    (base) timiil@tim-work:~$ cd /home/timiil/
    (base) timiil@tim-work:~$ echo $no_proxy
    172.31.*,172.30.*,172.29.*,172.28.*,172.27.*,172.26.*,172.25.*,172.24.*,172.23.*,172.22.*,172.21.*,172.20.*,172.19.*,172.18.*,172.17.*,172.16.*,10.*,192.168.*,127.*,localhost,<local>
    (base) timiil@tim-work:~$ opencode
    [object Object]
    

    yep, i do

  15. timiil commented on Dec 24, 2025

    @timiil

    Image i can ssh my own wsl , and then start OpenCode ...

  16. jiehai4 commented on Jan 5, 2026

    @jiehai4

    Terrible, using a proxy results in [object Object], and without it, I can't connect to the URL, but it was working fine yesterday.

  17. jiehai4 commented on Jan 5, 2026

    @jiehai4

    I just tried it and became even more confused. I can use opencode in the terminal when I open a single file with VSCode, but it doesn't work when I open a project folder with VSCode.

  18. grey8848 commented on Jan 7, 2026

    @grey8848

    evn: windows 11 wsl debian zsh
    error: [object Object]
    ❯ vim .zshrc
    ❯ echo $no_proxyROXY

    ❯ echo $NO_PROXY
    local-registry,192.168.,172.31.,172.30.,172.29.,172.28.,172.27.,172.26.,172.25.,172.24.,172.23.,172.22.,172.21.,172.20.,172.19.,172.18.,172.17.,172.16.,10.,127.*,localhost,
    ❯ opencode
    [object Object]
    ❯ opencode --print-logs --log-level DEBUG
    INFO 2026-01-07T00:55:25 +209ms service=default version=1.1.4 args=["--print-logs","--log-level","DEBUG"] opencode
    INFO 2026-01-07T00:55:25 +1ms service=config path=/home/jack111/.config/opencode/config.json loading
    INFO 2026-01-07T00:55:25 +0ms service=config path=/home/jack111/.config/opencode/opencode.json loading
    INFO 2026-01-07T00:55:25 +2ms service=config path=/home/jack111/.config/opencode/opencode.jsonc loading
    [object Object]
    ❯ vim .zshrc
    ❯ vim .p10k.zsh
    ❯ export OPENCODE_DISABLE_DEFAULT_PLUGINS=1
    ❯ opencode --print-logs --log-level DEBUG
    INFO 2026-01-07T00:56:54 +180ms service=default version=1.1.4 args=["--print-logs","--log-level","DEBUG"] opencode
    INFO 2026-01-07T00:56:54 +1ms service=config path=/home/jack111/.config/opencode/config.json loading
    INFO 2026-01-07T00:56:54 +0ms service=config path=/home/jack111/.config/opencode/opencode.json loading
    INFO 2026-01-07T00:56:54 +2ms service=config path=/home/jack111/.config/opencode/opencode.jsonc loading
    [object Object]
      ~ ❯

  19. timiil commented on Jan 7, 2026

    @timiil

    no any update opencode, but today:

    (base) timiil@nanyuan:~$ opencode -v
    1.0.218
    

    can not start opencode inside a ssh session any more, it is hang for long time no any char showup in ssh

  20. hezhexi2002 commented on Jan 9, 2026

    @hezhexi2002

    You can bypass the local address first.
    export NO_PROXY=localhost,127.0.0.1,::1

    Thanks for the suggestion. However, my situation is a bit different — I actually need the proxy to access the full network (e.g., npm registries and other external resources). If I set NO_PROXY, the opencode CLI itself seems to work, but it still fails to launch properly because some dependencies can't be downloaded without the proxy.

    Hi, I ran into the same problem.
    When I use SSH to forward my local proxy and then run opencode, I get the same error output.

    It seems that setting NO_PROXY allows the CLI itself to start, but then it fails again because some dependencies cannot be downloaded without the proxy.

    May I ask if you’ve found a solution or workaround for this issue?

  21. nicehiro commented on Jan 9, 2026

    @nicehiro
    Author
  22. 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.

  23. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions