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
opencode -c hangs indefinitely in directories with no prior sessions #23437
Running opencode -c in a directory that has never had a session causes the TUI to hang. The process becomes unresponsive and must be killed with kill -9.
This worked correctly in 1.4.11 and broke sometime between then and 1.14.18.
Root cause
The --continue flag seeds the router with an initial { type: "session", sessionID: "dummy" } route to prevent a visual flash when resuming a session (introduced in 65b2a10e9 / #23037). When no sessions exist in the directory:
The session route component eagerly fetches GET /session/dummy, which fails server-side validation ("dummy" doesn't start with "ses")
The createEffect in App() that is responsible for replacing the dummy route with the real most-recent session never fires, because there are no sessions to match against
The TUI stays stuck on the broken dummy session screen with no way to recover
This issue might be a duplicate of existing issues. Please check:
opencode -c 在新目录中导致黑屏无法退出 #23432: Same bug — opencode -c in a new directory (no prior sessions) causes a black screen/hang with no way to exit, reported on version 1.14.17
Activity
github-actions commentedon Apr 19, 2026
This issue might be a duplicate of existing issues. Please check:
opencode -cin a new directory (no prior sessions) causes a black screen/hang with no way to exit, reported on version 1.14.17fix(tui): handle --continue in directories with no prior sessions
rmk40 commentedon Apr 28, 2026
No longer hangs but throws a toast error, which is good enough. Closing.
fix(runtime): detect saved opencode sessions across both storage gene…