You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI: opening a long session waits for its last 100 messages before drawing #53428
Opening a session in the TUI (from the session list, or via /tui/select-session) fetches its last 100 messages before the session is drawn. For long sessions that request is most of the switch time: in my logs the 100-message fetch takes about 290–430 ms, while the last 20 messages of the same sessions come back in 7–8 ms.
Twenty messages already fill a tall terminal, so the rest could load after the session is on screen. The full fetch is also wasted for sessions you only pass through while switching, and its layout blocks input for a moment.
Plugins
None
OpenCode version
1.18.34, and current dev
Steps to reproduce
Have two sessions with a few hundred messages each
Switch between them from the session list (ctrl+x l)
Each switch pauses before the session appears, longer for longer sessions
The v2 TUI initially fetches the newest 20 messages and loads older history in additional pages. Opening a session no longer requires the reported initial 100-message fetch. To get v2: npm i -g @opencode/cli@latest or curl -fsSL https://opencode.ai/v2/install | bash (desktop: update the app). If you still see this on v2, please open a new issue with the details.
Activity
github-actions commentedon Oct 7, 2026
Thanks for updating the issue with the reproduction steps and system details!
neriousy commentedon Oct 19, 2026
The v2 TUI initially fetches the newest 20 messages and loads older history in additional pages. Opening a session no longer requires the reported initial 100-message fetch. To get v2:
npm i -g @opencode/cli@latestorcurl -fsSL https://opencode.ai/v2/install | bash(desktop: update the app). If you still see this on v2, please open a new issue with the details.