anomalyco / anomalyco/opencode

TUI black screen when running from source outside the repo directory

Open
#40,231 2 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 3, 2026.

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

Description

Description

Running opencode from source (bun run packages/opencode/src/index.ts) from any directory outside the repo shows a black screen — the TUI never mounts and ctrl-c is unresponsive. It works only when the current working directory (or an ancestor) is inside the repo.

The TUI uses the Solid JSX transform from @opentui/solid, which is applied by a Bun plugin registered only when the CWD's bunfig.toml chain contains preload = ["@opentui/solid/preload"]. That bunfig only exists in the repo. From any other directory, Bun falls back to its default React-style JSX transform, emitting element objects opentui's reconciler cannot mount: App never runs, nothing draws, and ctrl-c is unresponsive.

The compiled binary is unaffected (the transform is bundled at build time via compile: { autoloadBunfig: false }).

Plugins

None.

OpenCode version

Running from source on dev (1882c33).

Steps to reproduce
  1. Clone the repo and bun install.
  2. cd /tmp (anywhere outside the repo).
  3. Run bun run --conditions=browser /path/to/repo/packages/opencode/src/index.ts.
  4. Observe a black screen; the app does not respond to ctrl-c.

Running the same command from packages/opencode works normally.

Screenshot and/or share link

N/A.

Operating System

macOS 13 arm64

Terminal

iTerm2 / pty

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.