anomalyco / anomalyco/opencode
[Bug]: Desktop app crash loop – PTY session 404, Backend API disconnect, File Tree failure & Clipboard access denied
@Brendonovich is already working on this.
Since Aug 5, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The OpenCode desktop client enters a complete failure state after a backend restart/reconnect (e.g., following an RDP session change or process crash). The UI continuously attempts to recover stale PTY terminal sessions from persistent storage, resulting in endless HTTP 404 errors, broken WebSocket connections (Invalid frame header), and a failure to load the workspace file tree.
Additionally, the terminal renderer (ghostty-web) repeatedly fails with NotAllowedError: Failed to execute 'write' on 'Clipboard': Write permission denied.
Clearing standard app cache does not resolve the issue as stale session states persist in local storage/AppData.
Plugins
"opencode-skills", "opencode-sessions", "opencode-subagent-statusline", "@tarquinen/opencode-dcp@latest", "@involvex/opencode-autoweb-plugin
OpenCode version
1.18.13, OpenCode Desktop v0.0.0-beta-202608052139
Steps to reproduce
Open multiple workspace tabs with active terminal instances
Force a backend restart or disconnect/reconnect the display session
Re-open the OpenCode Desktop client.
Observe the DevTools console spamming 404 errors for non-existent PTY IDs (pty_...), failed WebSocket connections, and an uncaught TypeError: Failed to fetch when requesting workspace assets/file tree.
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
windows terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.