anomalyco / anomalyco/opencode
TUI freezes when switching themes repeatedly via theme menu (desktop app)
@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
- Launch the opencode desktop app (OpenCode.app) and open the theme menu.
- Select a theme — it applies fine.
- Open the theme menu again and select another theme.
- The TUI freezes: no response to input, new theme never renders.
- Tab out to another section and tab back to the theme menu.
- 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
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.