[Bug] [0.8.0][WSL2] Single RLM child can make daemon worker unresponsive due to unthrottled rlm_child_update streaming #1643
Replies: 1 comment
|
+1 — reproduced on Linux, so this is not WSL2-specific. Prime Agent 0.7.4 (a soft fork, with no changes in this path), Ubuntu 24.04, Node What I think this thread is missing is a number for how far the worker misses It answers with a valid The starvation looks like exactly the cause described here. Sustained 215-243% Agreeing with the point that child count is not the driver: 8 of my 9 workers Two things that may be useful for triage: 1. That is consistent rather than contradictory: retry repairs a descriptor whose 2. The worker never loses data. Throughout, pid 1509762 stayed alive (2h+) Related: #1650 (terminal Happy to provide full supervisor/client logs or test any patch on Linux. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
On Prime Agent
0.8.0, a single long-running RLM child can make its parent session worker unresponsive. This is not caused by spawning many subagents.Environment
0.8.022.23.22.7.11.06.18.33.2-microsoft-standard-WSL2~/.primestored on ext4, not DrvFSReproduction
Actual behavior
The daemon eventually reports errors such as:
The worker process can still be alive, listening on its Unix socket, and using about 650 MiB RSS. No V8 OOM or fatal error was present.
Before one failure, the parent had only eight
child_usage_attributedentries. This rules out excessive child count or usage-attribution volume as the main trigger.Likely cause
In
packages/coding-agent/src/core/agent-session.ts, every child assistantmessage_updateperforms:emitChildUpdate()also calls:Therefore, every provider streaming delta triggers text reconstruction, context-token calculation, and an
rlm_child_updatedaemon event. As the child context grows, one streaming child can overload the worker and daemon event path.Current upstream
mainstill contains this behavior.Local workaround tested
Coalesce only streaming
message_updateevents to at most one update per second:Important lifecycle events remain immediate:
message_startmessage_endValidation
With this patch:
attachremained responsive while a child was running;Unknown active session, worker timeout, or replacement supervisor occurred during the controlled run;Expected fix
Please throttle or coalesce child streaming UI updates upstream. Ideally, avoid recalculating full context tokens and assistant text for every provider delta while preserving immediate terminal updates.
Related: #1054.
All reactions