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
Firing a SIGTERM at opencode causes the TUI to close but then the process sits and hangs.
When opencode's TUI receives SIGINT (kill -INT <pid>) or SIGTERM (kill <pid>), the main thread dies without shutting down the Bun Worker. The worker never calls Instance.disposeAll(), so Effect runtimes, child processes (MCP servers, LSP clients, PTYs), and file watchers are all orphaned.
Why Ctrl+C works but SIGTERM doesn't
The renderer runs in raw terminal mode with exitOnCtrlC: false, so Ctrl+C is just the byte \x03. OpenTUI catches it as a keyboard event and triggers the graceful exit path. SIGTERM is an OS-level signal that bypasses the terminal entirely, and nothing handles it.
Root cause
The exit() function in exit.tsx handles the full teardown: plugin disposal, renderer destroy, recap output, then resolving the tui() promise which cascades to stop() in thread.ts -> client.call("shutdown") -> Instance.disposeAll().
Activity
github-actions commentedon Jul 3, 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.