tui: hours of historical output vanish from the view while the rows are still in the DB, under a sibling session id

オープン
#65,244 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
sqlite, typescript
領域
cli, database

調査の方向性

Start in the TUI session-selection and binding code that maps the rendered view to a session id, then trace how a model/provider switch can rebind or drop that id. Use the two SQLite sessions and the session_message table as the reference: session A has the gap while session B holds the missing rows. First reproduce on a long-running TUI with a provider switch; done means the view stays bound to the original session and its full history remains visible.

索引モデルが issue の本文から書いたものです。

説明

area/tui inference/go platform/linux triaging type/bug version/v2
Version

opencode 2.3.2 (channel latest), Linux, TUI.

What happened

While working in a single TUI, output that had been on screen for hours is no longer
visible. The current session's message history contains a hole of 21,356 s
(5 h 55 m 56 s)
— 10:56:34 -> 16:52:30 — and the turns that were rendered during
that window are not in it at all. They are still on disk, in a sibling session in the
same project and the same directory
, which is what makes this a view/binding problem
rather than data loss.

Measured (sqlite, read-only, both sessions)
session A (the one the TUI shows now) session B (holds the missing output)
id ses_e07a922f3ffe15Qu06K0bHbGU7 ses_e0763c5b5ffelNqQoTsGuwDjCv
project / directory a3b70b365cae50c572407228dc7cd6ea9ae6eb8f / /home/user same / same
model opencode-go/mimo-v2.6-flash opencode-go/glm-5.3-flash
rows (session_message) 119, 09:43:24 -> 17:21:24 453, 10:59:10 -> 16:55:21
rows inside A's hole — 451, 10:59:10 -> 16:50:20
parent_id / fork_session_id None / None None / None
time_compacting null null

Gaps in session A larger than 180 s: 307 s, 1046 s, 210 s, 21,356 s, 637 s.

Because time_compacting is null on both and neither session is a parent/fork of the
other, this is not a compaction or a fork that the user asked for — the TUI simply
stopped being bound to the conversation it was displaying.

Expected

Historical output stays visible in the TUI for the session that produced it.

Actual

The view switches to a different session id (or drops the earlier one), so hours of
output disappear from the screen even though session_message still holds every row.
The user has no way to get that transcript back from the UI.

Notes
  • Both sessions are readable and unmodified, so nothing was deleted.
  • The model differs between the two (mimo-v2.6-flash vs glm-5.3-flash), which is the
    only obvious difference; a model/provider switch around that time may be the trigger.
  • Repro steps not yet determined — observed on a long-running TUI (opened 09:43, still
    running).
主要言語
TypeScript
スター
227k
フォーク
30.7k
平均マージ
3時間 57分
マージ済み PR(30日)
484

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

anomalyco/opencode のほかの issue

anomalyco/opencode の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。