opencode icon indicating copy to clipboard operation
opencode copied to clipboard

AppImage Desktop fails to start: opencode-cli not found at hardcoded path

Open e792a8 opened this issue 5 days ago • 1 comments

this issue is written by opencode

Bug Description

OpenCode Desktop AppImage fails to start with error:

[PasError: Failed to spawn OpenCode Server. Logs:
[STDERR] bash: /home/tsan/Downloads/opencode-cli: No such file or directory

The app is attempting to spawn opencode-cli from /home/tsan/Downloads/, which is a hardcoded or incorrectly resolved path.

Environment

  • OS: Linux (AppImage)
  • Platform: AppImage
  • OpenCode Version: 1.1.11

Error Logs

[PasError: Failed to spawn OpenCode Server. Logs:
[STDERR] bash: 无法设定终端进程组 (7287): 对设备不适当的 ioctl 操作
[STDERR] bash: 此 shell 中无任务控制
[STDOUT] HINT: COMPILER_PATH points to gcc 14 # <- printed from my .bashrc
[STDERR] bash: /home/tsan/Downloads/opencode-cli: No such file or directory

zu@tauri://localhost/assets/index-Bv3YnF19.js:2:11977
@tauri://localhost/assets/index-Bv3YnF19.js:2:4664

Expected Behavior

The AppImage should either:

  1. Bundle the opencode-cli binary within the AppImage
  2. Resolve the path dynamically to the correct location
  3. Download the CLI to the correct location if needed

Actual Behavior

The AppImage tries to execute /home/tsan/Downloads/opencode-cli, which does not exist. The path appears to be hardcoded or incorrectly resolved.

Steps to Reproduce

  1. Download OpenCode Desktop AppImage
  2. Launch the AppImage
  3. Observe the error on startup

Suggested Fix

The desktop app should:

  1. Bundle opencode-cli within the AppImage and reference it using APPDIR environment variable
  2. Or dynamically resolve the CLI path relative to the AppImage location
  3. Or properly configure the CLI path via user settings/environment variables instead of hardcoding ~/Downloads/

Relevant code location: The path resolution likely happens in the desktop app's server spawning logic (packages/desktop/src-tauri/)

Additional Context

The bash warnings about terminal process group are expected when running outside a terminal, but the critical issue is the path to opencode-cli.

e792a8 avatar Jan 10 '26 09:01 e792a8

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

  • #6168: Open code Amd64 Linux appimage fails to launch (AppImage startup errors on Linux with 'Script not found "serve"' and similar path resolution issues)
  • #6258: OpenCode desktop unable to run in Bazzite Linux using AppImage and RPM (AppImage launch failures with 'Server not running' and path resolution issues)
  • #7475: Error: Failed to spawn OpenCode Server (Generic server spawn failure with missing error details, may share the same root cause)

Feel free to ignore if your specific case differs from these issues.

github-actions[bot] avatar Jan 10 '26 09:01 github-actions[bot]