"Open windows from a previous session" opens wrong tabs after crash #23204

Closed
opened 2026-01-31 08:35:17 +00:00 by claunia · 3 comments
Owner

Originally created by @sparrowt on GitHub (Apr 25, 2025).

Originally assigned to: @lhecker, @carlos-zamora on GitHub.

Windows Terminal version

1.22.10731.0

Windows build number

10.0.26100.0

Other Software

No response

Steps to reproduce

  1. Run Windows Terminal for several days, over which period many tabs have been opened, closed, renamed etc.
  2. Somehow Windows Terminal crashes (this in itself is obviously caused by a different bug, but inevitably this will sometimes happen)
  3. Re-launch Windows Terminal and find that it has restored the wrong tabs (the ones that were open last time it had a clean shutdown)

Expected Behavior

Windows Terminal should restore the tabs that were open at least vaguely recently before the crash (e.g. by persisting this state either on a regular interval, or each time a new tab is opened/renamed.

Actual Behavior

Instead it restores whatever tabs were open last time I explicitly closed it (i.e. the same set that it restored last time) which may well be multiple days ago and completely different from the tabs that I had been using before the crash.

Unfortunately this makes the restore feature pretty useless in the case of a crash 😢

Originally created by @sparrowt on GitHub (Apr 25, 2025). Originally assigned to: @lhecker, @carlos-zamora on GitHub. ### Windows Terminal version 1.22.10731.0 ### Windows build number 10.0.26100.0 ### Other Software _No response_ ### Steps to reproduce 1. Run Windows Terminal for several days, over which period many tabs have been opened, closed, renamed etc. 2. Somehow Windows Terminal crashes (this in itself is obviously caused by a _different_ bug, but inevitably this will sometimes happen) 3. Re-launch Windows Terminal and find that it has restored the wrong tabs (the ones that were open last time it had a _clean_ shutdown) ### Expected Behavior Windows Terminal should restore the tabs that were open at least vaguely recently before the crash (e.g. by persisting this state either on a regular interval, or each time a new tab is opened/renamed. ### Actual Behavior Instead it restores whatever tabs were open last time I explicitly closed it (i.e. the same set that it restored last time) which may well be multiple days ago and completely different from the tabs that I had been using before the crash. Unfortunately this makes the restore feature pretty useless in the case of a crash 😢
claunia added the Issue-BugPriority-3Needs-Tag-FixProduct-TerminalArea-Windowing labels 2026-01-31 08:35:18 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 30, 2025):

Hmmmmmmm. Well, that's not good. Thanks!

@DHowett commented on GitHub (Apr 30, 2025): Hmmmmmmm. Well, that's not good. Thanks!
Author
Owner

@DHowett commented on GitHub (Apr 30, 2025):

Notes from discussion: maybe we should persist the window layout (cheap) every couple minutes or whatever, but not the buffers yet (too expensive to do serially).

Right now, we only clear the old session off disk when we save a new one. You can well imagine what that means. 🙂

@DHowett commented on GitHub (Apr 30, 2025): Notes from discussion: maybe we should persist the window layout (cheap) every couple minutes or whatever, but not the buffers yet (too expensive to do serially). Right now, we only _clear the old session off disk_ when we save a new one. You can well imagine what that means. 🙂
Author
Owner

@sparrowt commented on GitHub (May 1, 2025):

maybe we should persist the window layout (cheap) every couple minutes or whatever, but not the buffers yet

Thanks yes that would be great - the crucial thing is remembering which set of things I was keeping an eye on and the terminal type + tab title (+ cwd) is much better than nothing. I'm not fussed about the buffers (in fact would be nice to be able to disable that, pretty sure I've seen another ticket for that).

@sparrowt commented on GitHub (May 1, 2025): > maybe we should persist the window layout (cheap) every couple minutes or whatever, but not the buffers yet Thanks yes that would be great - the crucial thing is remembering which set of things I was keeping an eye on and the terminal type + tab title (+ cwd) is much better than nothing. I'm not fussed about the buffers (in fact would be nice to be able to disable that, pretty sure I've seen another ticket for that).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23204