After changing the settings, settings.json will be quickly modified. #23085

Closed
opened 2026-01-31 08:31:52 +00:00 by claunia · 4 comments
Owner

Originally created by @LoneTyde on GitHub (Mar 28, 2025).

Originally assigned to: @PankajBhojwani on GitHub.

Windows Terminal version

1.22.10731.0

Windows build number

1000.26100.54.0

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal.
  2. Open settings.
    1. Randomly change a configuration (a configuration that can cause changes to the settings.json file).
  3. After the settings.json file is modified, it will be rewritten frantically, and the terminal will flash rapidly until it becomes unresponsive and eventually crashes.

https://github.com/user-attachments/assets/e7a66435-df13-430b-88a8-3de8f3f4f048

Expected Behavior

No response

Actual Behavior

After the settings.json file is modified, it will be rewritten frantically, and the terminal will flash rapidly until it becomes unresponsive and eventually crashes.

Originally created by @LoneTyde on GitHub (Mar 28, 2025). Originally assigned to: @PankajBhojwani on GitHub. ### Windows Terminal version 1.22.10731.0 ### Windows build number 1000.26100.54.0 ### Other Software _No response_ ### Steps to reproduce 1. Open Windows Terminal. 2. Open settings. 3. 3. Randomly change a configuration (a configuration that can cause changes to the settings.json file). 4. After the settings.json file is modified, it will be rewritten frantically, and the terminal will flash rapidly until it becomes unresponsive and eventually crashes. https://github.com/user-attachments/assets/e7a66435-df13-430b-88a8-3de8f3f4f048 ### Expected Behavior _No response_ ### Actual Behavior After the settings.json file is modified, it will be rewritten frantically, and the terminal will flash rapidly until it becomes unresponsive and eventually crashes.
claunia added the Area-SettingsIssue-BugNeeds-Tag-FixProduct-Terminal labels 2026-01-31 08:31:52 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 2, 2025):

Well, that's not good.

@DHowett commented on GitHub (Apr 2, 2025): Well, that's not good.
Author
Owner

@DHowett commented on GitHub (Apr 2, 2025):

Would you be able to share your settings file? If possible, would you also be able to grab the two different copies? I know that may be tough given the tight timing.

As you've intuited, settings should be stable once written 😆

@DHowett commented on GitHub (Apr 2, 2025): Would you be able to share your settings file? If possible, would you also be able to grab the two different copies? I know that may be tough given the tight timing. As you've intuited, settings should be stable once written 😆
Author
Owner

@LoneTyde commented on GitHub (Apr 3, 2025):

Would you be able to share your settings file? If possible, would you also be able to grab the two different copies? I know that may be tough given the tight timing.

As you've intuited, settings should be stable once written 😆


Thank you for your reply. The following is the configuration file where I encountered the problem. You can reproduce it using the relevant version of Windows Terminal.

settings.json

@LoneTyde commented on GitHub (Apr 3, 2025): > Would you be able to share your settings file? If possible, would you also be able to grab the two different copies? I know that may be tough given the tight timing. > > As you've intuited, settings should be stable once written 😆 --- Thank you for your reply. The following is the configuration file where I encountered the problem. You can reproduce it using the relevant version of Windows Terminal. [settings.json](https://github.com/user-attachments/files/19579648/settings.json)
Author
Owner

@carlos-zamora commented on GitHub (Aug 27, 2025):

Thanks for sharing! Took a look under the debugger and found the issue:

        {
            "commands": 
            [
                {
                    "command": 
                    {
                        "action": "newTab",
                        "profile": "${profile.name}"
                    },
                    "icon": "${profile.icon}",
                    "iterateOn": "profiles",
                    "name": "${profile.name}"
                }
            ],
            "keys": "ctrl+shift+k",
            "name": "Anew"
        }

The "keys" property here is from a legacy syntax. Nowadays, users are expected to use the "keybindings" top-level property to bind "keys" to an action id "id". Finding the "keys" property causes the action map to set _fixupsAppliedDuringLoad to true, then trigger a write to settings.json. However, the new settings.json ends up having the same problem, which results in an endless loop of writing to the settings.json!

On your end, adding an action id to the "Anew" command and binding it in the "keybindings" array fixes the issue. Should look something like this:

"actions": 
    [
        // other actions...
        {
            "commands": 
            [
                {
                    "command": 
                    {
                        "action": "newTab",
                        "profile": "${profile.name}"
                    },
                    "icon": "${profile.icon}",
                    "iterateOn": "profiles",
                    "name": "${profile.name}"
                }
            ],
            "id": "anewID",
            "name": "Anew"
        }
    ],
"keybindings": 
    [
        {
            "id": "anewID",
            "keys": "ctrl+shift+k"
        }
        // other key bindings...
    ]

Assigning @PankajBhojwani since he's working on the action map.

@carlos-zamora commented on GitHub (Aug 27, 2025): Thanks for sharing! Took a look under the debugger and found the issue: ```js { "commands": [ { "command": { "action": "newTab", "profile": "${profile.name}" }, "icon": "${profile.icon}", "iterateOn": "profiles", "name": "${profile.name}" } ], "keys": "ctrl+shift+k", "name": "Anew" } ``` The `"keys"` property here is from a legacy syntax. Nowadays, users are expected to use the `"keybindings"` top-level property to bind `"keys"` to an action id `"id"`. Finding the `"keys"` property causes the action map to set `_fixupsAppliedDuringLoad` to true, then trigger a write to settings.json. However, the new settings.json ends up having the same problem, which results in an endless loop of writing to the settings.json! On your end, adding an action id to the `"Anew"` command and binding it in the `"keybindings"` array fixes the issue. Should look something like this: ```js "actions": [ // other actions... { "commands": [ { "command": { "action": "newTab", "profile": "${profile.name}" }, "icon": "${profile.icon}", "iterateOn": "profiles", "name": "${profile.name}" } ], "id": "anewID", "name": "Anew" } ], "keybindings": [ { "id": "anewID", "keys": "ctrl+shift+k" } // other key bindings... ] ``` Assigning @PankajBhojwani since he's working on the action map.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23085