Black Friday33% off all plans See plans Enter it at checkout
New

Closed terminals and their agent workers leave bash and conhost processes running; handles pile up over days

0

After about 6 days of uptime with heavy use of GreenLight Dash terminals, an AI Agent Boss and its worker terminals, the PC became very slow (jittery mouse, UI taking ages to respond) although CPU and RAM were fine (22% CPU, 30 GB of 64 GB free). The cause was a very large number of leftover console processes: roughly 420 bash.exe, 620 conhost.exe, 330 OpenConsole.exe and 200 cygwin-console-helper.exe, about 557,000 open handles in total, plus about 43 headless test browsers. 124 bash and 134 conhost processes were true orphans (their parent process no longer existed), and the oldest bash was about 47 hours old. Stopping the orphaned bash/conhost and the headless browsers reduced handles to about 450,000, which is still very high; the remaining processes belong to live or leaked terminal sessions. A visible side effect was the Windows taskbar clock freezing at an old time.

Steps to reproduce
1. Use GreenLight Dash terminals for several days without restarting the PC, including a Boss that starts several worker terminals with gl-term new and workers that run poll loops (for … sleep) in bash.
2. Close the worker terminals and the Boss.
3. Run: Get-Process bash,conhost,OpenConsole | Group-Object ProcessName | Select Name,Count, and check for bash/conhost whose parent process no longer exists.

Expected
Closing a terminal (or a worker) ends its shell and console host and everything it started, so no bash/conhost/OpenConsole processes remain.

Actual
Hundreds of bash, conhost, OpenConsole and cygwin-console-helper processes remain after their terminals are closed; some are orphans with no parent. Handle count reaches about 557,000 and the PC becomes very slow.

Context
Feature area: terminals / Agent Boss workers (gl-term) on Windows 11, desktop app. Possibly related to the earlier report that closing the Boss terminal closes its workers (forum topic 2206). Workaround: a script that stops only orphaned bash/conhost older than 30 minutes and headless test browsers, run every 6 hours.

Environment
App version: 15.8.0
Platform: Windows 11 (AMD64)

Support Angel

⏱