You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Desktop app fails to start on Linux/Wayland - 'open terminal failed: not a terminal' #9505
The OpenCode desktop app (Tauri-based) fails to start with terminal-related errors when launched on a Wayland system.
Error Message
Error: Failed to spawn OpenCode Server. Logs:
[STDERR] bash: cannot set terminal process group (2657565): Inappropriate ioctl for device
[STDERR] bash: no job control in this shell
[STDERR] open terminal failed: not a terminal
The error originates from tauri://localhost/assets/index-D9T6R7qf.js.
Expected Behavior
The desktop app should launch and spawn the OpenCode server successfully without requiring an actual TTY.
Actual Behavior
The app fails to spawn the server because the subprocess spawner is not allocating a pseudo-terminal (PTY), causing bash to fail with "no job control" and the underlying process to fail with "not a terminal".
Workaround
Running opencode in a terminal emulator (Alacritty, Kitty, Ghostty) works perfectly. Only the desktop app fails.
Additional Context
The TUI version works perfectly in terminal emulators
This appears to be a PTY allocation issue in the Tauri process spawner
The OpenCode server process seems to require a TTY that isn't being provided when launched from the GUI app
Error: Failed to spawn OpenCode Server (Sidecar terminated before becoming healthy (code=Some(1) signal=None)). Logs:
2026-02-17T06:48:16.628255Z INFO opencode_lib: Initializing app
2026-02-17T06:48:16.638179Z INFO opencode_lib: Main and loading windows created
2026-02-17T06:48:16.638265Z INFO opencode_lib::cli: No CLI installation found, skipping sync
2026-02-17T06:48:16.638551Z INFO opencode_lib: Setting up server connection
2026-02-17T06:48:16.638949Z INFO opencode_lib: Attempting server connection custom_url=None
2026-02-17T06:48:16.639523Z INFO opencode_lib: Spawning new local server
2026-02-17T06:48:16.639534Z INFO opencode_lib::cli: Spawning sidecar port=34753
2026-02-17T06:48:16.639760Z INFO opencode_lib: Server connection setup
2026-02-17T06:48:16.639771Z INFO opencode_lib: server connection started
2026-02-17T06:48:16.665228Z INFO sidecar: opencode_lib::cli: open terminal failed: not a terminal
2026-02-17T06:48:16.741563Z INFO sidecar: opencode_lib::cli: Sidecar terminated code=Some(1) signal=None
ge@tauri://localhost/assets/bindings-CGDisT-S.js:1:10362
@tauri://localhost/assets/bindings-CGDisT-S.js:1:3248
System Information
OpenCode version: 1.2.6 (both TUI and desktop)
Package: opencode-desktop-linux-x86_64.rpm from releases page
During troubleshooting, I observed the following:
Steps taken:
Moved ~/.local/share/opencode to ~/.local/share/opencode.bak
Started OpenCode - it froze during startup
Removed the new ~/.local/share/opencode directory
Moved ~/.local/share/opencode.bak back to ~/.local/share/opencode
OpenCode now starts successfully
Logs from step 2 (frozen startup with fresh directory):
Wayland session detected; forcing native Wayland from settings
2026-02-17T07:02:12.364850Z INFO opencode_lib: Initializing app
2026-02-17T07:02:12.375337Z INFO opencode_lib: Main and loading windows created
2026-02-17T07:02:12.375375Z INFO opencode_lib: Sqlite file not found, waiting for it to be generated path=/home/julian/.local/share/opencode/opencode.db
2026-02-17T07:02:12.375418Z INFO opencode_lib: Setting up server connection
2026-02-17T07:02:12.375433Z INFO opencode_lib::cli: No CLI installation found, skipping sync
2026-02-17T07:02:12.375902Z INFO opencode_lib: Attempting server connection custom_url=None
2026-02-17T07:02:12.376508Z INFO opencode_lib: Spawning new local server
2026-02-17T07:02:12.376518Z INFO opencode_lib::cli: Spawning sidecar port=44065
2026-02-17T07:02:12.376676Z INFO opencode_lib: Server connection setup
2026-02-17T07:02:12.376681Z INFO opencode_lib: server connection started
2026-02-17T07:02:12.888502Z INFO sidecar: opencode_lib::cli: Performing one time database migration, may take a few minutes...
2026-02-17T07:02:12.896375Z INFO sidecar: opencode_lib::cli: sqlite-migration:done
2026-02-17T07:02:12.896395Z INFO sidecar: opencode_lib::cli: Database migration complete.
2026-02-17T07:02:12.918867Z INFO sidecar: opencode_lib::cli: opencode server listening on http://127.0.0.1:44065
2026-02-17T07:02:12.991673Z INFO opencode_lib::server: Server ready elapsed=614.983041ms
After restoring the original directory, the app starts without issues. The cause is unclear.
Error: Failed to spawn OpenCode Server (Sidecar terminated before becoming healthy (code=Some(1) signal=None)). Logs:
2026-02-18T22:11:29.428507Z INFO opencode_lib: Initializing app
2026-02-18T22:11:29.428539Z INFO opencode_lib: Main and loading windows created
2026-02-18T22:11:29.428880Z INFO opencode_lib: Setting up server connection
2026-02-18T22:11:29.430167Z INFO opencode_lib: Attempting server connection custom_url=None
2026-02-18T22:11:29.430493Z INFO opencode_lib: Spawning new local server
2026-02-18T22:11:29.430499Z INFO opencode_lib::cli: Spawning sidecar port=60747
2026-02-18T22:11:29.430898Z INFO opencode_lib: Server connection setup
2026-02-18T22:11:29.430922Z INFO opencode_lib: server connection started
2026-02-18T22:11:29.672175Z INFO sidecar: opencode_lib::cli: open terminal failed: not a terminal
2026-02-18T22:11:29.739369Z INFO sidecar: opencode_lib::cli: Sidecar terminated code=Some(1) signal=None
ge@tauri://localhost/assets/bindings-CGDisT-S.js:1:10362
@tauri://localhost/assets/bindings-CGDisT-S.js:1:3248
Activity
github-actions commentedon Jan 19, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
justindotdevv commentedon Jan 19, 2026
JHK commentedon Feb 17, 2026
Having a similar, probably related issue:
System Information
JHK commentedon Feb 17, 2026
During troubleshooting, I observed the following:
Steps taken:
~/.local/share/opencodeto~/.local/share/opencode.bakOpenCode- it froze during startup~/.local/share/opencodedirectory~/.local/share/opencode.bakback to~/.local/share/opencodeOpenCodenow starts successfullyLogs from step 2 (frozen startup with fresh directory):
After restoring the original directory, the app starts without issues. The cause is unclear.
Edit: The next start is broke again.
cdbattags commentedon Feb 18, 2026
I'm getting the same on macOS, actually!
github-actions commentedon Apr 20, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.