Buffer restore is created even if "persistedWindowLayout" is not set #21640

Open
opened 2026-01-31 07:50:36 +00:00 by claunia · 0 comments
Owner

Originally created by @jiangzhenjerry on GitHub (May 8, 2024).

Windows Terminal version

1.21.1272.0

Windows build number

10.0.26200.5001

Other Software

No response

Steps to reproduce

  1. Delete everything in LocalState folder, just so that Terminal is vanilla with factory defaults.
  2. Open Terminal, and then close it.
  3. Repeat Step 2 several times.
  4. Check your LocalState folder.

Expected Behavior

By default, firstWindowPreference is set to "defaultProfile", therefore no buffer file should be created.

Actual Behavior

  1. A buffer restore file (buffer_xxxx.txt) is still created.
  2. What's worse, this file won't be deleted automatically. Every time Terminal starts, an additional buffer file is created. Very soon the LocalState folder will be filled with tons of such files.
    sshot-1
Originally created by @jiangzhenjerry on GitHub (May 8, 2024). ### Windows Terminal version 1.21.1272.0 ### Windows build number 10.0.26200.5001 ### Other Software _No response_ ### Steps to reproduce 1. Delete everything in `LocalState` folder, just so that Terminal is vanilla with factory defaults. 2. Open Terminal, and then close it. 3. Repeat Step 2 several times. 4. Check your `LocalState` folder. ### Expected Behavior By default, `firstWindowPreference` is set to `"defaultProfile"`, therefore no buffer file should be created. ### Actual Behavior 1. A buffer restore file (`buffer_xxxx.txt`) is still created. 2. What's worse, this file won't be deleted automatically. Every time Terminal starts, an additional buffer file is created. Very soon the `LocalState` folder will be filled with tons of such files. <img width="624" alt="sshot-1" src="https://github.com/microsoft/terminal/assets/9311082/387c9c68-fdfe-4096-9021-43973921e47a">
claunia added the Needs-TriageArea-SettingsIssue-BugProduct-TerminalPriority-1 labels 2026-01-31 07:50:37 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21640