anomalyco / anomalyco/opencode

TUI crash: EditorView is destroyed

Open
#48,723 1 comment 1 reaction 1 assignee View on GitHub

@simonklee is already working on this.

Since Sep 12, 2026.

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

Description

Description

The OpenCode TUI crashed with an unexpected error after upgrading to 2.0.1 (from 0.0.0-beta-19425).

Error: EditorView is destroyed

Stack trace:

Error: EditorView is destroyed
    at guard (/$bunfs/root/chunk-4vr1e9w8.js:182:110632)
    at getVisualCursor (/$bunfs/root/chunk-4vr1e9w8.js:182:113150)

This looks like OpenTUI accessing an EditorView after it was already destroyed (cursor measurement during a layout/input update).

Reported automatically from the OpenCode crash screen.

Plugins

None specified.

OpenCode version

2.0.1 (npm i -g @opencode/cli@2.0.1)

Steps to reproduce

Reported automatically from the OpenCode crash screen. If you can, describe what you were doing when it crashed.

  1. Upgrade OpenCode from 0.0.0-beta-19425 to 2.0.1
  2. Start the TUI in Cursor's integrated terminal (opencode)
  3. TUI stops with the crash screen above
Screenshot and/or share link

OpenCode crash screen shows:

  • Error: EditorView is destroyed
  • Buttons: Restart / Quit
  • Version footer: OpenCode 2.0.1
Operating System

Linux 6.8.0-124-generic (x64), Ubuntu 24.04.4 LTS

Terminal

vscode 3.19.13

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.