buzz icon indicating copy to clipboard operation
buzz copied to clipboard

[Bug] Buzz Desktop leaves large numbers of terminal/console processes running (not cleaned up after agent tasks)

Open abduosmanaj opened this issue 4 months ago • 0 comments

Title: Buzz Desktop leaves large numbers of terminal/console processes running (not cleaned up after agent tasks)

Reported by: abduosmanaj, investigated by Bumble (agent) Date observed: 2026-07-22, ~19:35 UTC Environment: Windows 11 Home 10.0.26200, Buzz Desktop + buzz-acp harness (local), PowerShell 5.1

Summary

Buzz Desktop opens a large number of terminal/console-related processes while agent sessions and background tasks run, and these do not appear to get cleaned up afterward. Over the course of roughly 1 hour and 20 minutes of normal agent usage, the count grew to 284 related processes, with a sharp burst suggesting a parallel-task fan-out that isn't being reaped.

Evidence

Captured via Get-Process filtered on process names matching cmd|powershell|pwsh|conhost|WindowsTerminal|OpenConsole|bash|buzz|node.

Total processes at time of check: 284

Process name Count
node 79
cmd 78
conhost 70
OpenConsole 51
buzz-acp 3
WindowsTerminal 1
powershell 1

Visible windows: Only 1 process (WindowsTerminal) had a non-empty MainWindowTitle at inspection time. The remaining 283 are background console-host processes (conhost/OpenConsole) paired with cmd/node children — i.e. most are not literal on-screen windows, but they are live OS processes/handles consuming resources.

Burst pattern: ~150+ of the processes (node + cmd + conhost + OpenConsole) had StartTime clustered between 22:25:57 and 22:26:06 (under 10 seconds) — consistent with a batch of subagents/tasks fanning out in parallel, each spawning its own cmd → node → conhost/OpenConsole chain.

Longest-lived stragglers: Oldest matching process observed had a StartTime of 21:12:10, over an hour before the check — indicating processes from earlier tasks are not being terminated once their task completes.

Expected behavior

  • Console/host processes spawned to run a background agent task or subagent should be terminated when that task finishes.
  • Process count for cmd/node/conhost/OpenConsole should stay roughly proportional to currently running tasks, not accumulate monotonically across a session.

Actual behavior

  • Process count keeps growing across the session (didn't drop back down after tasks completed).
  • A burst of ~150 processes can appear within a few seconds when several tasks/subagents run concurrently.

Impact

  • Growing RAM and OS handle usage over long sessions.
  • Visible terminal window clutter on the user's desktop (the user's original report).
  • Potential slowdown or resource exhaustion on long-running Buzz Desktop sessions.

Repro steps

  1. Open Buzz Desktop and run an agent session that triggers multiple background tasks/subagents over ~1 hour of normal use.
  2. In PowerShell, run:
    Get-Process | Where-Object { $_.ProcessName -match 'cmd|powershell|pwsh|conhost|WindowsTerminal|OpenConsole|bash|buzz|node' } | Measure-Object
    
  3. Compare the count before/after a burst of parallel tasks, and check whether it drops after those tasks finish.

Suggested next steps for Buzz team

  • Confirm whether buzz-acp (or Desktop) is supposed to terminate the cmd/node/conhost chain per task, and whether that cleanup is failing silently.
  • Consider running background tasks without spawning a new console host per task (e.g. reuse a pool, or use CREATE_NO_WINDOW and terminate reliably on task completion).

abduosmanaj avatar Jul 22 '26 19:07 abduosmanaj