mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-12-04 01:18:39 +00:00
The shared Chromium, Xvfb and Xpra runtime could remain alive indefinitely after chats stopped using it. Suspend it after one hour of inactivity by default, preserving saved tab URLs and the shared sign-in profile. Protect running and paused owners, subordinate parent tasks, connected viewers, browser calls and downloads; passive polling must not restart the runtime or extend its lifetime. Add Stop internal browser to Browser Settings, release the runtime on global plugin disable, and clean stale display directories only when no live owner or process reference remains. Document the global timeout, opt-out and loss of unsaved page state on suspension. Validation: 206 focused tests and 20 real-Chromium security tests passed. Live Docker checks verified periodic and manual shutdown from 13 child processes to zero, download protection, tab/cookie recovery, the WebUI control and CSRF rejection. The reported GPU busy-loop was not reproduced; this change bounds idle lifetime without changing graphics flags. Refs #1892, #2029.