Skip to content

Restoring persisted session with custom tab colors/titles causes sequential visual focus jumping (macro-like execution) #19970

@abrahamgalue

Description

@abrahamgalue

Windows Terminal version

1.23.20211.0

Windows build number

10.0.22631.0

Other Software

No response

Steps to reproduce

  1. Set "firstWindowPreference": "persistedWindowLayout" in settings.json.
  2. Open 4 PowerShell tabs.
  3. Right-click on two of the tabs and manually set a Custom Title and a Custom Color.
  4. Close Windows Terminal to save the state.
  5. Reopen Windows Terminal.

Expected Behavior

Windows Terminal should restore the session and apply the custom colors and titles to the background tabs silently, without sequentially shifting the visual focus (focusPane) to each tab during the startup process.

Actual Behavior

When restoring a persisted session ("firstWindowPreference": "persistedWindowLayout") that contains tabs with manually modified titles or colors, Windows Terminal does not restore the background tabs silently. Instead, it visually jumps and shifts focus through each tab one by one.

This happens because the state.json file records these manual customizations as a sequence of discrete actions (newTab, setTabColor, renameTab, and explicitly focusPane). During startup, Windows Terminal executes this sequence like a macro, forcefully shifting the visual focus to each tab as it applies the custom title/color.

Because my underlying shell (PowerShell + Oh-My-Posh) currently takes over 1000ms to load per tab, this macro execution becomes painfully visible. The user experiences a jarring, sequential flickering and jumping of the UI from tab to tab for several seconds until the final active tab is reached.

Recording.2026-03-12.121955.mp4

Metadata

Metadata

Assignees

Labels

Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions