Repository navigation
Closed
Description
Description
When starting OpenCode with the -s flag and passing an arbitrary/invalid string as the session name (instead of a valid session ID), the application crashes and the terminal becomes completely unresponsive ctrl+C and all other interrupt signals are ignored, forcing a hard terminal kill.
Expected Behavior
OpenCode should either:
- Show a clear error message like
Error: "test" is not a valid session IDand exit cleanly, OR - Treat it as a new session name and start normally
Actual Behavior
- Application crashes on launch
- Terminal becomes completely frozen/unresponsive
- No signal (SIGINT, SIGTERM, etc.) is accepted
- Only way to recover is closing the terminal window entirely
Environment
./o. apex@skynet
./sssso- -----------
`:osssssss+- OS: EndeavourOS x86_64
`:+sssssssssso/. Host: B550M DS3H AC (-CF)
`-/ossssssssssssso/. Kernel: Linux 6.12.44-1-lts
`-/+sssssssssssssssso+:` Uptime: 3 hours, 40 mins
`-:/+sssssssssssssssssso+/. Packages: 1298 (pacman)
`.://osssssssssssssssssssso++- Shell: zsh 5.9
.://+ssssssssssssssssssssssso++: Display (G24F 2): 1920x1080 @ 0.91x in 23", 120 Hz [External]
.:///ossssssssssssssssssssssssso++: DE: Xfce4 4.20
`:////ssssssssssssssssssssssssssso+++. WM: Xfwm4 (X11)
`-////+ssssssssssssssssssssssssssso++++- WM Theme: Arc-Dark
`..-+oosssssssssssssssssssssssso+++++/` Theme: Arc-Dark [GTK2/3/4]
./++++++++++++++++++++++++++++++/:. Icons: Qogir-Dark [GTK2/3/4]
`:::::::::::::::::::::::::------`` Font: Open Sans (11pt) [GTK2/3/4]
Cursor: Qogir-dark
Terminal: xfce4-terminal 1.1.5
Terminal Font: JetBrains Mono (10pt)
CPU: AMD Ryzen 5 5600X (12) @ 4.65 GHz
GPU: NVIDIA GeForce RTX 3060 Ti GDDR6X [Discrete]
Memory: 8.77 GiB / 15.52 GiB (57%)
Additional Context
- This is reproducible with any non-existent/invalid session string passed to
-s - The issue does NOT occur when passing a valid session ID
Plugins
No response
OpenCode version
1.14.19
Steps to reproduce
- Open a terminal
- Run:
opencode -s test - OpenCode crashes
- Terminal is now stuck — Ctrl+C, Ctrl+Z, Ctrl+\ all ignored
Screenshot and/or share link
No response
Operating System
EndeavourOS x86_64
Terminal
xfce4-terminal 1.1.5
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Apr 23, 2026
This issue might be a duplicate of existing issues. Please check:
opencode -changs indefinitely in directories with no prior sessions #23437:opencode -changs indefinitely in directories with no prior sessions — describes the same symptom (TUI hang/freeze requiring kill -9) triggered by an invalid session ID being passed to the router, which may be the same underlying root cause as this issue.Arjith8 commentedon May 4, 2026
Seems to be fixed, tested on Fedora linux