Windows: closing Buzz stops managed agents but leaves desktop process running
- Dominant language
- Rust
- Stars
- 32.7k
- Forks
- 4.3k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 253
Description
## Bug description
On Windows, closing Buzz can stop all managed-agent workers but leave `buzz-desktop.exe` running indefinitely. A non-force `taskkill` signal is acknowledged but does not terminate the process; an exact-PID force-stop is required.
## Reproduction
Reproduced on two consecutive controlled launches:
1. Launch Buzz Desktop and wait for managed-agent restoration to finish.
2. Confirm 7 launch-enabled agents across 4 relays (`28` `buzz-acp.exe` processes).
3. Send `WM_CLOSE` to the Buzz top-level windows (equivalent Windows close request).
4. Wait 60 seconds.
## Actual behavior
- All ACP workers exit cleanly: `28 → 0`.
- `buzz-desktop.exe` remains running after 60 seconds.
- `taskkill /PID ` reports that a termination signal was sent, but the same PID remains after another 30 seconds.
- `taskkill /PID /F` is required.
- Reproduced 2/2 times with different desktop PIDs.
- No shutdown or panic error was emitted in the captured application output.
## Expected behavior
After Windows sends the close request and managed-agent cleanup completes, `buzz-desktop.exe` should exit without requiring force termination.
## Source observation
The main-window `CloseRequested` interception and `tray_menu::init` in `desktop/src-tauri/src/lib.rs` are both gated to macOS, so a persistent background/tray process does not appear intentional on Windows. `RunEvent::ExitRequested` and `RunEvent::Exit` call `shut_down_app`; managed-agent cleanup completes, but process exit does not.
## Environment
- OS: Windows 11 x64
- Buzz Desktop: 0.5.23
- Source base: upstream 0.5.23
- Tested commit: `5d43ee6ae177f1c77a6db1ac592847f74ba2a420`
- The tested commit changes Windows credential storage only (`secret_store.rs`, `reset.rs`, and managed-agent storage tests); it does not change window, tray, or shutdown logic.
## Additional safety note
Each force-stop was applied only after the ACP count reached zero and persisted state had been verified. No broad process-name force termination was used.
Contributor guide
Research direction
Start in desktop/src-tauri/src/lib.rs and trace the Windows close handling, RunEvent::ExitRequested, RunEvent::Exit, and shut_down_app. Reproduce the Windows close request after managed-agent cleanup, then verify that buzz-desktop.exe exits without requiring an exact-PID force termination.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, tauri
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100