anomalyco / anomalyco/opencode
TUI black screen when running from source outside the repo directory
@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
- Clone the repo and
bun install. cd /tmp(anywhere outside the repo).- Run
bun run --conditions=browser /path/to/repo/packages/opencode/src/index.ts. - 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
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.