`[object Object]` error output when running opencode over SSH
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
- On Ubuntu 20 docker image, install opencode using:
curl -fsSL https://opencode.ai/install | bash - 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
This issue might be a duplicate of existing issues. Please check:
- #4430: Phantom input on startup when running over SSH (Windows Terminal -> Remote SSH)
- #3769: SSH session with iTerm2 auto-writes 'iTerm2 3.6.5Gi-1;invalid payload' in agent panel
- #2773: Clipboard copy issues in remote SSH console (opentui-related)
- #3320: Bash commands not working in SSH session
- #4517: Theme and terminal output issues on macOS
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.
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
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
The error on my end occurred because I had a network proxy enabled.
Same here. I also have a local proxy set.
You can bypass the local address first.
export NO_PROXY=localhost,127.0.0.1,::1
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.