anomalyco / anomalyco/opencode

tui: user messages not rendered after compaction in session (blank between assistant turns)

Open
#42,400 0 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 13, 2026.

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

Description

Summary

In OpenCode 2 (next/beta), user messages stopped rendering in the TUI
conversation view mid-session. The view jumped straight from one assistant
turn to the next (Build -> Thought -> text) with no user bubble between them,
even though the user messages existed server-side and in the Timeline.

Environment

  • opencode version: 0.0.0-next-17403
  • OS: Windows_NT 10.0.26200 (win32 x64)
  • Terminal: xterm-256color (TERM_PROGRAM unset)
  • Shell: cmd.exe
  • Install/channel: next (beta)
  • Active plugins: C:\Users\Santi.config\opencode\plugins\opencode-go-fallback.ts

Reproduction

  1. Start opencode2.
  2. Send a message (hit provider usage limit / quota error on the first key).
  3. Run /compact (manual compaction, no pending message).
  4. Send the same message again; it renders.
  5. After the model finishes the task, keep sending more messages.
  6. Observed: user messages after step 4 no longer render in the conversation
    view, even though the model clearly received and answered them (I sent
    7+ messages, all answered, none visible).
  7. Ctrl+G (Timeline) initially showed only the first 2 messages.
  8. Ctrl+U (undo) jumped to the very first message in one press.
  9. Could NOT reproduce in a fresh session with the same steps.
  10. Returning to the original session later: messages rendered again and
    loaded in the Timeline.

Expected Behavior

User messages should always render in the conversation view, one bubble per
sent message, regardless of compaction or API errors earlier in the session.
A single undo should only stage the latest message, not jump to the first.

Actual Behavior

After a manual compaction, user messages silently stopped rendering in the
TUI. The message data existed (visible in Timeline and via the API/DB) but the
conversation view showed assistant turns with no user input between them.
Timeline briefly showed only 2 entries, and one undo reverted to the very
first message. Behavior was intermittent and later self-resolved for the
original session.

Additional Context

  • Screenshots: TUI conversation showing Build/Thought/assistant text with no
    user bubble between turns; Timeline panel showing the user prompts exist.
  • Session had a manual compaction checkpoint; the bug appeared only in the
    session where compaction ran.
  • Data was never lost: all messages (including the first) remained in the
    durable message store.

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.