anomalyco / anomalyco/opencode

Deleting a session is slow/hangs, leaves ghost sessions, and can freeze the whole app

Open
#42,538 4 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 14, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Deleting a session in the desktop app is very slow, often hangs, and can freeze the
entire app — with no error output in the logs. All three symptoms below appear to share
one root cause: session removal (removing share) gets stuck.

Observed symptoms (opencode 1.18.18 desktop, Windows 10):

  1. Deletion is slow / hangs. A single deletion takes 10–30+ seconds; the UI becomes
    unresponsive. In the log (%USERPROFILE%\.local\share\opencode\log\opencode.log)
    consecutive removing share entries during a bulk delete of ~40 sessions show gaps
    of 6–28 seconds each.
  2. Ghost sessions. If the app is killed during a deletion, the deleted session still
    appears on the home screen after restart. Clicking it opens the chat and immediately
    errors instead of loading. The interrupted removal apparently leaves the session in
    the local DB.
  3. Full freeze, silent. The app sometimes stops logging entirely and must be
    force-killed. Three incidents today (local time):
    • 11:50 → 12:11 (21.8 min of silence) right after the bulk deletion above;
    • 16:02 → 16:17 (14.6 min, no graceful shutdown) right after opening/closing a terminal
      (creating session pty → removing session);
    • 16:26:31 (exiting loop) → 16:27:54 (removing share) → hung until killed at
      ~16:28:25.
      A normal shutdown logs disposing all instances; in the 16:02 incident that never
      appeared. No level=ERROR, no stack trace, no abort — pure silent hang.
Plugins

None (only the default @opencode-ai/plugin dependency in ~/.config/opencode/package.json; no custom plugins or config)

OpenCode version

1.18.18 (desktop app)

Steps to reproduce
  1. Delete a session from the home screen (single or multiple)
  2. Observe that deletion takes tens of seconds or hangs the UI
  3. If the app freezes, force-kill it and restart
  4. The "deleted" session still appears on the home screen
  5. Click that session → an error occurs instead of loading the chat
  6. Optionally: open and close a terminal to reproduce the silent freeze
Screenshot and/or share link

No response

Operating System

Win11

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.