Elevated and unelevated terminal windows prune eachothers' session states #23780

Open
opened 2026-01-31 08:52:17 +00:00 by claunia · 0 comments
Owner

Originally created by @AndisGrossteins on GitHub (Nov 5, 2025).

Originally assigned to: @lhecker on GitHub.

Description of the new feature

Currently, the session state buffers are saved for whichever window was closed last. If there is one unelevated and one elevated window, when both are closed (to apply Terminal updates or reboot system), buffers are saved for the instance that exited last.

This leads to loss of buffer history for one of the windows that were open during last session – usually the elevated window.

Proposed technical implementation details

The buffers could be kept for both as it's done for session states with state.json and elevated-state.json. The buffers could be written to a separate subdirectory under LocalState directory or using a filename prefix – elevated-{GUID}.txt.

Originally created by @AndisGrossteins on GitHub (Nov 5, 2025). Originally assigned to: @lhecker on GitHub. ### Description of the new feature Currently, the session state buffers are saved for whichever window was closed last. If there is one unelevated and one elevated window, when both are closed (to apply Terminal updates or reboot system), buffers are saved for the instance that exited last. This leads to loss of buffer history for one of the windows that were open during last session – usually the elevated window. ### Proposed technical implementation details The buffers could be kept for both as it's done for session states with `state.json` and `elevated-state.json`. The buffers could be written to a separate subdirectory under `LocalState` directory or using a filename prefix – `elevated-{GUID}.txt`.
claunia added the Issue-BugNeeds-Tag-FixProduct-TerminalPriority-2Area-Windowing labels 2026-01-31 08:52:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23780