anomalyco / anomalyco/opencode
[FEATURE]: Add browser-style tab history and recovery to the TUI
@kommander is already working on this.
Since Sep 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Add browser-style tab history and recovery to the TUI.
Session tabs represent a working set over durable sessions. When that tab state is closed, reset, or separated from the current client state, the sessions may still exist but users lose their working layout. This can look like data loss and requires manually finding every session again.
Requested behavior:
- Provide a Recently closed tabs view containing more than the single last-closed tab.
- Allow restoring one tab or the complete previous tab set.
- Keep recovery history across TUI restarts.
- Detect recoverable tab sets after crashes, upgrades, release-channel changes, or UI-state resets.
- When the TUI starts with an empty or unexpectedly reduced tab set, offer an action such as Restore 7 previous tabs.
- Validate that referenced sessions still exist and avoid duplicating tabs already open.
- Retain
Ctrl+Shift+Tas the quick shortcut for restoring the most recently closed tab.
Motivating incident:
After upgrading from the V2 beta to stable, seven open tabs disappeared from the TUI. The sessions were not deleted. Beta and stable had separate tab manifests:
~/.local/state/opencode/beta/tui/tabs.json~/.local/state/opencode/latest/tui/tabs.json
The beta manifest still contained all seven tabs, and copying it into the stable channel restored the complete layout. This is one concrete recovery source, but the feature should work as a general tab-history mechanism rather than only as release-channel migration logic.
Other useful scenarios include accidental tab closure, forced exits, crashes, and other cases where durable sessions outlive their visible tabs.
Environment for the motivating incident:
- OpenCode: beta
0.0.0-beta-19425upgraded to stable2.0.2 - Install: global npm package
- OS: Windows 11, build 26200.9445
- Terminal: Windows Terminal
- Shell: PowerShell 7.6.6
- Active plugins: none found
Related but not duplicate:
- #46938 reports analogous tab-layout loss in the Desktop app.
- #47998 concerns TUI tab state being shared between local and remote servers.
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.