You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Startup hangs restoring large persisted buffers; allow persisting layout without buffer contents #20765
Set "firstWindowPreference": "persistedWindowLayout".
Keep several windows with many tabs open (I had 3 windows, 33 tabs), some holding long build output in scrollback.
Restart Windows.
Expected Behavior
Terminal restores its windows and tabs.
Actual Behavior
Unelevated Terminal hangs on startup (Not Responding, ~250 MB). Every later wt / default-terminal cmd launch is handed to the hung process and no window ever appears; elevated Terminal works because it does not use the persisted state. LocalState held 62 buffer_*.txt files totalling 27 MB, the largest 3.3 MB (~4,800 lines of dotnet build analyzer warnings, ~350 chars/line). Moving state.json and the buffer files aside fixed it.
Request: a setting to persist the layout (tabs, titles, starting directories) without buffer contents, or a cap on how much scrollback gets persisted per pane.
Upgraded, thanks. Correction to my report: scrollback wasn't the cause. On 1.24 the hang reproduced with no buffer files at all, only when restoring split panes (looks like #18610). On 1.25.2733.0 the same layout restores fine, so closing.
One thing: profiles.schema.json describes persistedWindowLayout as layout-only, but in 1.25 it maps to PersistedLayoutAndContent and gets rewritten to persistedLayoutAndContent. The layout-only value is persistedLayout, which the schema doesn't list.
It's likely that your editor has cached an old schema; the current latest should mention persistedLayout as of #20475 (backported to 1.24, 1.25; I should not have backported it to 1.24, but even so it is there)
Not an editor cache: I read it straight from the repo. On main, release-1.25 and v1.25.2733.0, the firstWindowPreference enum is defaultProfile / persistedWindowLayout / persistedLayoutAndContent, and it describes persistedWindowLayout as layout-only. #20475 added persistedLayoutAndContent but not persistedLayout, while TerminalSettingsSerializationHelpers.h maps persistedWindowLayout to PersistedLayoutAndContent.
Activity
zadjii-msft commentedon Oct 5, 2026
This literally already exists in 1.25! You should update to that build☺️
virzak commentedon Oct 5, 2026
Upgraded, thanks. Correction to my report: scrollback wasn't the cause. On 1.24 the hang reproduced with no buffer files at all, only when restoring split panes (looks like #18610). On 1.25.2733.0 the same layout restores fine, so closing.
One thing:
profiles.schema.jsondescribespersistedWindowLayoutas layout-only, but in 1.25 it maps toPersistedLayoutAndContentand gets rewritten topersistedLayoutAndContent. The layout-only value ispersistedLayout, which the schema doesn't list.DHowett commentedon Oct 5, 2026
It's likely that your editor has cached an old schema; the current latest should mention
persistedLayoutas of #20475 (backported to 1.24, 1.25; I should not have backported it to 1.24, but even so it is there)virzak commentedon Oct 5, 2026
Not an editor cache: I read it straight from the repo. On
main,release-1.25andv1.25.2733.0, thefirstWindowPreferenceenum isdefaultProfile/persistedWindowLayout/persistedLayoutAndContent, and it describespersistedWindowLayoutas layout-only. #20475 addedpersistedLayoutAndContentbut notpersistedLayout, whileTerminalSettingsSerializationHelpers.hmapspersistedWindowLayouttoPersistedLayoutAndContent.DHowett commentedon Oct 5, 2026
oh, the distinction between
persistedLayoutandpersistedWindowLayout. Yeah, we should fix thatschema: fix persistedWindowLayout (#20770)
schema: fix persistedWindowLayout (#20770)
schema: fix persistedWindowLayout (#20770)