Back to blog
Workflow
Opencode

Why does your terminal scrollback vanish when OpenCode restarts?

Thắng Đoàn
Thắng Đoàn

I kept losing terminal scrollback whenever the OpenCode server restarted mid-task, and renamed terminals reverted to old names. OpenCode now makes desktop terminals belong to the session, so they survive restarts with scrollback intact and stay synced with the TUI and other windows.

What it is

Persistent desktop terminals tie terminal state to the OpenCode session rather than the window process. Scrollback, names, and view state are preserved across server restarts and synchronized everywhere.

Applied case

In my multi-window setup, a server restart mid-run used to wipe all scrollback and reset terminal names. With this release, terminals belong to the session, keep their scrollback through restarts, and stay synchronized with the TUI and other windows. Renamed terminals also keep their names across restarts, so I never re-label anything after a bounce.

  • Terminals survive OpenCode restarts with scrollback and names intact (#60346)

When to use it

Use when you run long agent sessions across multiple windows and restart the server often.
Skip when you use a single throwaway terminal; this also does not recover output from a terminal closed before the restart.

Read more

Persistent terminals PR

OpenCode v2.2.4 release

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.