anomalyco / anomalyco/opencode

TUI freezes when switching themes repeatedly via theme menu (desktop app)

Open
#42,165 1 comment 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 12, 2026.

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

Description

Description

Switching themes from the theme menu repeatedly causes the TUI to freeze. After the first successful theme change, a second consecutive theme change hangs the app — no keystrokes or UI updates are processed. The app only recovers if you tab out to another section (e.g. away from the theme menu) and tab back; then a theme change works once before it hangs again.

Reproduction

  1. Launch the opencode desktop app (OpenCode.app) and open the theme menu.
  2. Select a theme — it applies fine.
  3. Open the theme menu again and select another theme.
  4. The TUI freezes: no response to input, new theme never renders.
  5. Tab out to another section and tab back to the theme menu.
  6. Select a theme — works once. Repeat step 3 and the hang returns.

Expected behavior

Themes should switch repeatedly without hanging; the TUI should stay responsive.

Actual behavior

Every second consecutive theme switch freezes the TUI until you leave the section and return.

Environment

  • opencode 1.18.16 (desktop app, OpenCode.app)
  • macOS (darwin)
  • Related: #24475 covers a TUI hang from theme detection after the opentui upgrade — this may be the same underlying theme-detection/render stall but triggered by repeated theme changes rather than tmux.

Notes

Willing to capture logs / a trace if maintainers point me at the right flags.

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.