anomalyco / anomalyco/opencode
Session-not-found errors are only detected in the exact V1 shape, other wrappers are missed
@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
- Open a session, then delete it on the server (or let a worker remove it).
- Trigger a request against the deleted session (rename, load, switch).
- The error arrives shaped as a string
"Session not found: <id>"or as aNotFoundErrorobject.isSessionNotFoundErrorreturnsfalse, 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
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.