Repository navigation
Replies: 2 comments
|
cc @nwparker — would value your input on two points: (1) whether a warm pool with a concurrency cap is acceptable versus keeping every task's session alive, and (2) whether the reaper should live in the daemon (which owns the agent tree) or the renderer (which owns task state). Happy to prototype against the existing session-close path if useful. |
0 replies
|
One clarification: we are not asking to change the default resume behavior. A conservative, opt-in cap/TTL (or even just an API hook) would be enough for high-concurrency users to protect their host. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Agent session lifecycle: what should happen to a completed or idle agent?
Opening this as a discussion rather than a bug: the individual symptoms are reported separately (see #38188 for the per-workspace TypeScript LSP), but the underlying question is a product/policy one — when should Orca release the resources behind an agent session?
What a session actually carries
Each agent session is more than one process. In our traces, one session tree looks like:
Keeping sessions warm makes resume instant, which is a good default. The gap is that nothing bounds how many stay warm or for how long, and the process tree is not released when a task is known to be finished.
What that looks like at scale
On a Windows workstation (8C/16T, 96 GB) running Orca’s task queue for a few days:
claude.exesessionsTask completion is already known to Orca (the
DONE:line and the per-task status file), but it does not trigger any resource release. A single idle LSP was still resident after ~48 hours with 0.00 CPU (details in #38188). Processes from finished work also survive; on Windows nothing reaps them because there is no SIGHUP-to-process-group semantics — on macOS/Linux the OS usually cleans this up, which may explain why it is reported mainly from Windows.Options worth considering
status: done, either close immediately or keep warm for a bounded window; make it a setting rather than an unconditional "keep forever".JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSEon Windows) so MCP/hook/LSP children cannot outlive it.Items 1–3 are policy decisions; 4 is implementation hardening; the LSP-specific part is already covered by #38188 / #38189.
Questions for maintainers
Happy to prototype any of the above against the existing session-close path if that helps.
All reactions