This article provides instructions on how to enable or disable the warning message when closing multiple tabs in Windows Terminal. The process involves either accessing ‘Settings’ and adjusting the ‘Warn when closing more than one tab’ option or manually adding a specific line to the Terminal app’s built-in JSON configuration file.
This article explains how to turn on or off warning when closing more than one tab in Windows Terminal.
Windows Terminal is a modern host application for the command-line shells, including Command Prompt, Windows PowerShell, and bash (via Windows Subsystem for Linux (WSL)).
Unlike the previous shell apps in Windows, Windows Terminal has many features, including multiple tabs, panes, Unicode and UTF-8 character support, a GPU-accelerated text rendering engine, and themes customization with text, colors, backgrounds, and shortcuts.
When you close Windows Terminal with more than one tab open, you will get a warning message “Do you want to close all tabs?“.
This is the default behavior. However, if you are not getting the prompt when closing Windows Terminal with multiple tabs open, here’s how to enable or disable it.
Turn on or off warning when closing Windows Terminal with multiple tabs
As described above, you will be alerted when you close Windows Terminal with more than one tab open by default.
If you are not getting a warning, here’s how to turn it on or off if you don’t want it enabled.
First, open the Windows Terminal app.
You can do that by clicking on the Start menu and searching for Terminal. Then, under Best match, select and open the Windows Terminal app.

When the Terminal app opens, click the down arrow button on the top bar, and select Settings (Ctrl +,).

On the Settings window, click on the Interaction tab. Then select the tile “Warn when closing more than one tab,” and toggle the button to the On position to enable the Terminal app to warn you when closing with multiple tabs.
To disable it, toggle the button back to the Off position.

Click on the Save button to save your changes and exit.
Turn on or off warning when closing the Terminal app with multiple tabs using JSON file
Another way you can enable or disable this feature in the Terminal app is to use its built-in JSON configuration file.
Select the Open JSON file button on the bottom left.

When the file opens, location the highlighted section.

To disable the warning, add the line below to the exact area of the configuration file.
Disable:
"confirmCloseAllTabs":false,
Add the line at the exact location in the file and save.
"copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "confirmCloseAllTabs":false, "profiles":
Enable:
"confirmCloseAllTabs":true,
Add the line to the exact location in the configuration file.
"copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "confirmCloseAllTabs":true, "profiles":
Save the JSON configuration file to apply your changes.
Below is an example of the Windows Terminal app with a warning window.

That should do it!
Reference:
https://learn.microsoft.com/en-us/windows/terminal/
Conclusion:
This post showed you how to enable or disable “Warn when closing with more than one tab” in the Windows Terminal app. If you find any errors above or have something to add, please use the comment form below.