anomalyco / anomalyco/opencode

tui: crash with UnsupportedContentType (event stream)

Open
#49,719 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Summary

The OpenCode TUI crashed with ClientError: UnsupportedContentType originating from the event-stream client. It happened once; the log shows a single event-stream disconnect with the same error followed by a successful reconnect ~80ms later.

Environment

  • opencode version: 2.0.7
  • OS: Darwin 25.6.0 (arm64)
  • Terminal: Orca 1.4.205 (TERM=xterm-256color, TERM_PROGRAM=Orca, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: release (opencode v2.0.7 via npm global @opencode/cli)
  • Active plugins: local project plugin .opencode/plugins/agentmemory-capture.ts (note: this plugin is currently failing to load on the server with Cannot find package '@opencode/plugin' — separate issue, possibly unrelated)

Reproduction

  1. Have the TUI open (project workspace, exact view unknown).
  2. Crash occurred once without a clear triggering action from the user.

Minimal steps are unavailable — the triggering action is unknown and it has only happened once.

Expected Behavior

The TUI should stay alive; at most the event stream should reconnect silently (as the log shows it can).

Actual Behavior

The TUI crashed to the crash screen with:

ClientError: UnsupportedContentType
    at S (/$bunfs/root/chunk-0vaztdxa.js:13:25549)
    at async <anonymous> (/$bunfs/root/chunk-0vaztdxa.js:2:912)
    at processTicksAndRejections (native:7:39)

Additional Context

  • Server log shows exactly one matching entry: 2026-09-18T09:09:23.698Z ... "event stream disconnected" component=client attempt=1 error=UnsupportedContentType role=cli, followed by event stream connecting (attempt 1) and event stream connected 84ms later. The client recovered at the log level, but the TUI still crashed.
  • Frequency: once. No other UnsupportedContentType entries in the log.
  • No workaround tried (single occurrence, client reconnected on its own per the log).

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.

Research direction

No source file or test is identified; start by tracing the TUI event-stream client handling of UnsupportedContentType and the reconnect path described in the logs. Investigate how this one-time disconnect reaches the crash screen, using the bundled stack and server log as entry points. Done means the TUI stays alive while the event stream reconnects after this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.