anomalyco / anomalyco/opencode

Session-not-found errors are only detected in the exact V1 shape, other wrappers are missed

Open
#48,012 2 comments 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Sep 8, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Description

isSessionNotFoundError / isLocalSessionNotFoundError in the app only recognise the exact V1 tagged shape (_tag === "SessionNotFoundError" with matching sessionID) and the exact local Error.message. When the server returns session-deletion errors through other wrappers — a plain string body, an object with name: "NotFoundError" and data.message, or any serialised object whose message contains the not-found text — the detector misses it, so UI code that should treat the session as gone (hide the entry, stop retrying, drop references) instead keeps it or shows a generic failure.

Plugins

N/A

OpenCode version

dev (current upstream/dev)

Steps to reproduce
  1. Open a session, then delete it on the server (or let a worker remove it).
  2. Trigger a request against the deleted session (rename, load, switch).
  3. The error arrives shaped as a string "Session not found: <id>" or as a NotFoundError object. isSessionNotFoundError returns false, so the app does not route to the "session gone" handling and surfaces a generic error.
Screenshot and/or share link

N/A

Operating System

Windows 11 (platform-independent)

Terminal

N/A (app UI / desktop)

Related / duplicate check
  • No open issue matches this specific error-shape detection gap; verified by search.

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.