Windows desktop app abruptly quits on closing last tab with Ctrl+W; align behavior with macOS via System Tray
Summary
On Windows (installed via .exe), pressing Ctrl+W when no editor tabs or terminals are open (or closing the last remaining tab) abruptly terminates the entire desktop application process without any confirmation or warning.
Motivation & Context
- Discrepancy with macOS: On macOS, closing windows via
Cmd+Wleaves the application active in the Dock / Tray, which allows reopening or restoring the application without terminating the background process. - Accidental Closure: In Windows editor workflows, users frequently hit
Ctrl+Wto close tabs in succession. When the last tab closes,Ctrl+Wdirectly kills the entire app and drops running background processes. - Dedicated Exit Mechanism: T3 Code already provides a deliberate double
Ctrl+Qgesture to exit the application cleanly.
Proposed Solution
- Introduce native System Tray support on Windows with a context menu (Open / Quit) and click/double-click activation.
- Update
DesktopLifecycleto keep the background process alive on Windows uponwindow-all-closed, mirroring the macOS experience.
I have prepared a PR to address this cleanly.
Related: pingdotgg/t3code#11069 adds File → New Window and ⌘N / Ctrl+N to reopen or focus the main window, addressing the macOS reopening problem reported in pingdotgg/t3code#435.
It leaves Windows/Linux last-window-close behavior unchanged, so it does not resolve this issue or add tray support. Keeping the host alive after closing its last window would still need a separate change.
The same issue also occurs on Linux: pressing Ctrl+W closes the entire application without any warning or confirmation.
+1 on this one, very much needed
Where this stands on main (f7f9e21785), for anyone following:
- On Windows and Linux, closing the last window quits the app, and so does Ctrl+W when there's nothing left to close. Quitting stops the bundled server and any desktop-managed WSL backend, so running agent turns stop with it. Ctrl+Q has the hold/double-press guard; the close button and Ctrl+W don't.
- Five tray PRs were closed unmerged: #7493, #8423, #10162, #10163, #19176. None was turned down on the idea. They closed for missing design approval, missing evidence, or because another PR replaced them.
- The open question is the one in #10697: hide to tray, or confirm before closing while work is running. That needs a decision here or in an Ideas discussion before another PR is worth opening.
t3 service installsupports Linux and macOS only, so on Windows the way to keep agents running without the window today is a separatet3 servewith its own T3 home.
Posted by Claude Opus 5.5 for @SunkenInTime.
[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of Theo
Closing: this is covered by #25860, which landed. Reopen if an important part is still missing.
The X button still quits T3 Code on Windows (and Linux), which stops the bundled server and every running agent turn with no warning. #25860 fixed Ctrl+W, but the close button, the main part of this issue, still does it. macOS keeps the app running with no window. Could this be reopened?
A minimal version that covers it: closing the last window hides it to a tray icon (Open / Quit) instead of quitting, with a setting to turn that off and an optional start-at-login. I've been running exactly that locally on Windows and it works well.