Skip to content

Startup hangs restoring large persisted buffers; allow persisting layout without buffer contents #20765

Closed

Description

@virzak

Windows Terminal version

1.24.12741.0

Windows build number

10.0.26300

Other Software

No response

Steps to reproduce

  1. Set "firstWindowPreference": "persistedWindowLayout".
  2. Keep several windows with many tabs open (I had 3 windows, 33 tabs), some holding long build output in scrollback.
  3. 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.

Activity

  1. added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    Needs-Tag-FixDoesn't match tag requirements
    on Oct 5, 2026
  2. zadjii-msft commented on Oct 5, 2026

    @zadjii-msft
    Member

    This literally already exists in 1.25! You should update to that build ☺️

  3. virzak commented on Oct 5, 2026

    @virzak
    Author

    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.

  4. DHowett commented on Oct 5, 2026

    @DHowett
    Member

    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)

  5. virzak commented on Oct 5, 2026

    @virzak
    Author

    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.

  6. DHowett commented on Oct 5, 2026

    @DHowett
    Member

    oh, the distinction between persistedLayout and persistedWindowLayout. Yeah, we should fix that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-Tag-FixDoesn't match tag requirementsNeeds-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions