colorScheme not respected when Windows Terminal is restarted (depending on how it was previously closed) #22781

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

Originally created by @thernstig on GitHub (Jan 21, 2025).

Windows Terminal version

1.21.3231.0

Windows build number

10.0.26100.2894

Other Software

WSL: 2.3.26.0

Steps to reproduce

  1. Launch Windows Terminal
  2. Close the window on the top-right X button.
  3. Re-open Windows Terminal

Sometimes the color scheme selected is incorrect.

Expected Behavior

The selected color scheme to be correct.

Actual Behavior

I have the following settings.json:

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "id": "User.copy.644BA8F2",
            "keys": "ctrl+c"
        },
        {
            "command": "paste",
            "id": "User.paste",
            "keys": "ctrl+v"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "id": "User.splitPane.A6751878",
            "keys": "alt+shift+d"
        },
        {
            "command": "find",
            "id": "User.find",
            "keys": "ctrl+shift+f"
        }
    ],
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{51855cb2-8cce-5362-8f54-464b92b32386}",
    "firstWindowPreference": "persistedWindowLayout",
    "launchMode": "maximized",
    "newTabMenu": 
    [
        {
            "type": "remainingProfiles"
        }
    ],
    "profiles": 
    {
        "defaults": 
        {
            "font": 
            {
                "size": 10
            },
            "historySize": 50000,
            "padding": "5, 5, 5, 5"
        },
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Command Prompt"
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": true,
                "source": "Windows.Terminal.Wsl"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "colorScheme": "One Half Dark",
                "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}",
                "hidden": false,
                "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc"
            }
        ]
    },
    "schemes": [],
    "themes": []
}

First time I start Windows Terminal I see this:

Image

If I press the circled X on the tab, then reopen Windows Terminal, it uses the same One Half Dark.

If I press the X on the top-right and reopen Windows Terminal, it looks like this instead:

Image

Notice how it is not using One Half Dark anymore.

Since my default profile is set to {51855cb2-8cce-5362-8f54-464b92b32386} it should in both cases use One Half Dark, even if I have "firstWindowPreference": "persistedWindowLayout" set.

https://github.com/microsoft/terminal/issues/16996
https://github.com/microsoft/terminal/issues/11457

Originally created by @thernstig on GitHub (Jan 21, 2025). ### Windows Terminal version 1.21.3231.0 ### Windows build number 10.0.26100.2894 ### Other Software WSL: 2.3.26.0 ### Steps to reproduce 1. Launch Windows Terminal 2. Close the window on the top-right X button. 3. Re-open Windows Terminal Sometimes the color scheme selected is incorrect. ### Expected Behavior The selected color scheme to be correct. ### Actual Behavior I have the following settings.json: ```jsonc { "$help": "https://aka.ms/terminal-documentation", "$schema": "https://aka.ms/terminal-profiles-schema", "actions": [ { "command": { "action": "copy", "singleLine": false }, "id": "User.copy.644BA8F2", "keys": "ctrl+c" }, { "command": "paste", "id": "User.paste", "keys": "ctrl+v" }, { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "id": "User.splitPane.A6751878", "keys": "alt+shift+d" }, { "command": "find", "id": "User.find", "keys": "ctrl+shift+f" } ], "copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{51855cb2-8cce-5362-8f54-464b92b32386}", "firstWindowPreference": "persistedWindowLayout", "launchMode": "maximized", "newTabMenu": [ { "type": "remainingProfiles" } ], "profiles": { "defaults": { "font": { "size": 10 }, "historySize": 50000, "padding": "5, 5, 5, 5" }, "list": [ { "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": false, "name": "Windows PowerShell" }, { "commandline": "%SystemRoot%\\System32\\cmd.exe", "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "hidden": false, "name": "Command Prompt" }, { "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "hidden": true, "source": "Windows.Terminal.Wsl" }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": false, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" }, { "colorScheme": "One Half Dark", "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}", "hidden": false, "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc" } ] }, "schemes": [], "themes": [] } ``` First time I start Windows Terminal I see this: <img width="336" alt="Image" src="https://github.com/user-attachments/assets/b1f6b5a1-7ddb-436a-b6fc-56099c8111c1" /> If I press the circled X on the tab, then reopen Windows Terminal, it uses the same `One Half Dark`. If I press the X on the top-right and reopen Windows Terminal, it looks like this instead: <img width="310" alt="Image" src="https://github.com/user-attachments/assets/1b77e090-06df-4553-864e-ed3dc17fb3a6" /> Notice how it is not using `One Half Dark` anymore. Since my default profile is set to `{51855cb2-8cce-5362-8f54-464b92b32386}` it should in both cases use `One Half Dark`, even if I have ``"firstWindowPreference": "persistedWindowLayout"`` set. ## Possibly related https://github.com/microsoft/terminal/issues/16996 https://github.com/microsoft/terminal/issues/11457
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 08:23:23 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22781