anomalyco / anomalyco/opencode

tui: tab freezes immediately after failed manual compaction

Open
#43,399 1 comment 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 19, 2026.

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

Description

Summary

Switching to one specific tab freezes the entire TUI immediately. This began after a
manual /compact in that session appeared to fail. Restarting opencode2 does not help —
all 6 sessions reappear, but switching to the affected tab still freezes the app.

Environment

  • opencode version: v0.0.0-next-17276 (channel: next)
  • OS: Darwin 24.6.0 (arm64), macOS
  • Terminal: WarpTerminal (TERM=xterm-256color, COLORTERM=truecolor)
  • Shell: /bin/zsh
  • Install/channel: next
  • Active plugins: @warp-dot-dev/opencode-warp, local plugins
    (~/.config/opencode/plugins/quota/index.ts, ~/.config/opencode/plugins/tui/quota.ts)

Reproduction

  1. Open a long-running session (787 messages, ~2.4M input tokens).
  2. Run /compact. The compaction appears to hang/fail.
  3. Switch to another tab, then back to the compacted tab.
  4. The entire TUI freezes immediately.
  5. Quit and restart opencode2 — all 6 sessions are still listed, but switching to
    that tab freezes the app again.

Expected Behavior

Compaction either completes or fails gracefully; the session tab remains usable after
switching away and back, and after restart.

Actual Behavior

The whole TUI becomes unresponsive the instant the affected tab is selected, and the
freeze persists across restarts.

Additional Context

  • Affected session id: ses_ff03a90a4ffeq1TnK2HQZ6iyqH ("Continue workflow from STATE.md")
  • Session metrics: 787 messages, tokens_input 2,413,824, tokens_output 314,356,
    tokens_cache_read 57,008,000, cost ~$1.74
  • time_compacting is NULL for this session in opencode.db, suggesting the compaction
    never committed its result.
  • opencode.db is ~582 MB with a ~3.5 MB WAL.
  • Relevant log warnings (not obviously causal): repeated "automatic update failed"
    (ETARGET), and plugin load failures for @warp-dot-dev/opencode-warp
    (SchemaError "Missing key at ["default"]").

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.