新版本1.1.0开始无法在客户端通过attach连接远程server #4371

Closed
opened 2026-02-16 17:43:35 -05:00 by yindo · 3 comments
Owner

Originally created by @aokihu on GitHub (Jan 7, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

远程服务器开启指令opencode serve --hostname 0.0.0.0 --port 4069之后

客户端使用指令opencode attach http://<server_ip>:4096之后,无法连接到远程服务器,变成打开了本地目录运行状态.

但是浏览器却能够正常的连接到远程服务器运行,当版本退回到1.0.22之后,客户端能够正常连接到服务器工作

Plugins

No response

OpenCode version

1.1.0

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

macOS26,macOS16,CachyOS Linux

Terminal

iTerm2,Ghostty

Originally created by @aokihu on GitHub (Jan 7, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description 远程服务器开启指令`opencode serve --hostname 0.0.0.0 --port 4069`之后 客户端使用指令`opencode attach http://<server_ip>:4096`之后,无法连接到远程服务器,变成打开了本地目录运行状态. 但是浏览器却能够正常的连接到远程服务器运行,当版本退回到`1.0.22`之后,客户端能够正常连接到服务器工作 ### Plugins _No response_ ### OpenCode version >1.1.0 ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System macOS26,macOS16,CachyOS Linux ### Terminal iTerm2,Ghostty
yindo added the bugweb labels 2026-02-16 17:43:35 -05:00
yindo closed this issue 2026-02-16 17:43:36 -05:00
Author
Owner

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

I've searched through the repository for potential duplicates of this issue. While there are related issues with remote server functionality:

  • #7200: Reports blank screen when running opencode serve --hostname 0.0.0.0 on WSL2
  • #6835: Desktop crashes when opening project after attach to remote server
  • #6461: Feature request for named remote connections (not directly related)

However, your specific issue—where opencode attach fails to connect in version 1.1.0+ but works in 1.0.22—does not appear to have an exact duplicate. This suggests a regression introduced in version 1.1.0.

If this issue is related to the WSL2 or Desktop crashes mentioned above, those threads might provide additional context.

@github-actions[bot] commented on GitHub (Jan 7, 2026): I've searched through the repository for potential duplicates of this issue. While there are related issues with remote server functionality: - #7200: Reports blank screen when running `opencode serve --hostname 0.0.0.0` on WSL2 - #6835: Desktop crashes when opening project after attach to remote server - #6461: Feature request for named remote connections (not directly related) However, your specific issue—where `opencode attach` fails to connect in version 1.1.0+ but works in 1.0.22—does not appear to have an exact duplicate. This suggests a regression introduced in version 1.1.0. If this issue is related to the WSL2 or Desktop crashes mentioned above, those threads might provide additional context.
Author
Owner

@aokihu commented on GitHub (Jan 7, 2026):

Yes, the problem just appear from 1.1.0

Use 1.0.220 the client can connect server successfully

Image

Use 1.1.4 the client just work in my local computer

Image Image

There is share (Link)[https://opncd.ai/share/bsjc4hve]

There is the session log

**Session ID:** ses_466ec016bffeCSPNnjbsjc4hve
**Created:** 1/7/2026, 11:29:43 PM
**Updated:** 1/7/2026, 11:29:51 PM

---

## User

执行`uname -a`

---

## Assistant (Build · glm-4.7 · 3.7s)

Tool: bash

Input:

{
  "command": "uname -a",
  "description": "Displays detailed system information"
}

Error:

Error: ENOENT: no such file or directory, posix_spawn '/usr/bin/bash'

---

## Assistant (Build · glm-4.7 · 2.3s)

Tool: bash

Input:

{
  "command": "sh -c \"uname -a\"",
  "description": "Displays system information using sh"
}

Error:

Error: ENOENT: no such file or directory, posix_spawn '/usr/bin/bash'

---

## Assistant (Build · glm-4.7 · 2.3s)

无法执行命令 - 系统中找不到 bash shell。

---
@aokihu commented on GitHub (Jan 7, 2026): Yes, the problem just appear from 1.1.0 *Use 1.0.220* the client can connect server successfully <img width="2032" height="1167" alt="Image" src="https://github.com/user-attachments/assets/2985c5b5-a444-482c-85e8-b91803f0e3c8" /> *Use 1.1.4* the client just work in my local computer <img width="2032" height="1167" alt="Image" src="https://github.com/user-attachments/assets/67cd4d83-074a-45d4-8330-d1d6930bcbff" /> <img width="2032" height="1167" alt="Image" src="https://github.com/user-attachments/assets/b44338eb-c093-4e28-b17d-2aa6e71a6d48" /> There is share (Link)[https://opncd.ai/share/bsjc4hve] There is the session log ```markdown **Session ID:** ses_466ec016bffeCSPNnjbsjc4hve **Created:** 1/7/2026, 11:29:43 PM **Updated:** 1/7/2026, 11:29:51 PM --- ## User 执行`uname -a` --- ## Assistant (Build · glm-4.7 · 3.7s) ``` Tool: bash **Input:** ```json { "command": "uname -a", "description": "Displays detailed system information" } ``` **Error:** ``` Error: ENOENT: no such file or directory, posix_spawn '/usr/bin/bash' ``` ``` --- ## Assistant (Build · glm-4.7 · 2.3s) ``` Tool: bash **Input:** ```json { "command": "sh -c \"uname -a\"", "description": "Displays system information using sh" } ``` **Error:** ``` Error: ENOENT: no such file or directory, posix_spawn '/usr/bin/bash' ``` ``` --- ## Assistant (Build · glm-4.7 · 2.3s) 无法执行命令 - 系统中找不到 bash shell。 --- ```
Author
Owner

@aokihu commented on GitHub (Jan 8, 2026):

新版本已经修复了

@aokihu commented on GitHub (Jan 8, 2026): 新版本已经修复了
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4371