anomalyco / anomalyco/opencode
tui: user messages not rendered after compaction in session (blank between assistant turns)
@simonklee is already working on this.
Since Aug 13, 2026.
- 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
- Start
opencode2. - Send a message (hit provider usage limit / quota error on the first key).
- Run
/compact(manual compaction, no pending message). - Send the same message again; it renders.
- After the model finishes the task, keep sending more messages.
- 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). Ctrl+G(Timeline) initially showed only the first 2 messages.Ctrl+U(undo) jumped to the very first message in one press.- Could NOT reproduce in a fresh session with the same steps.
- 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
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.