You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AgentSession.requestAbort() (packages/coding-agent/src/core/agent-session.ts) aborts retry, compaction, bash, refine, and agent.abort() — but does not cancel active RLM child runs. Only abort() calls _cancelActiveRlmChildRuns(). Every user-facing cancel path uses requestAbort(): in-process-agent-connection.ts (both call sites), daemon abort and abort_and_clear_queue, and interactive Ctrl-C. So when a user cancels a parent turn, in-flight RLM children keep running — holding proxy concurrency slots and consuming the Claude Max subscription until they finish or idle out. This is the Prime-side half of Meridian's documented "incomplete parent-to-child cancellation" failure mode; per-child cancel machinery already exists (cancelRlmChildRun, _cancelRlmChildRun) but nothing user-facing invokes it.
Proposed shape
requestAbort() cancels (or explicitly quiesces, for children intentionally detached as background work) active RLM child runs, or a cascade option threaded from the user-facing call sites — decide the default deliberately: retained/background children may need to survive a parent turn abort, but interactively cancelled foreground work should not leave orphans.
The fork's correlated prompt lifecycle (packages/coding-agent/src/core/prompt-lifecycle.ts, currently pre-delivery only via cancelPromptLifecycle) is the natural home for scoped, recursive post-delivery cancellation — it already owns per-prompt ownership and request fingerprints.
Ctrl-C / connection abort on a parent with running foreground RLM children terminates the children's provider streams (verify no further child requests hit a stub provider after the abort).
Retained/background children behavior is explicitly specified and tested, not incidental.
Part of #22 (Meridian reliability umbrella). P1.
Problem
AgentSession.requestAbort()(packages/coding-agent/src/core/agent-session.ts) aborts retry, compaction, bash, refine, andagent.abort()— but does not cancel active RLM child runs. Onlyabort()calls_cancelActiveRlmChildRuns(). Every user-facing cancel path usesrequestAbort():in-process-agent-connection.ts(both call sites), daemonabortandabort_and_clear_queue, and interactive Ctrl-C. So when a user cancels a parent turn, in-flight RLM children keep running — holding proxy concurrency slots and consuming the Claude Max subscription until they finish or idle out. This is the Prime-side half of Meridian's documented "incomplete parent-to-child cancellation" failure mode; per-child cancel machinery already exists (cancelRlmChildRun,_cancelRlmChildRun) but nothing user-facing invokes it.Proposed shape
requestAbort()cancels (or explicitly quiesces, for children intentionally detached as background work) active RLM child runs, or acascadeoption threaded from the user-facing call sites — decide the default deliberately: retained/background children may need to survive a parent turn abort, but interactively cancelled foreground work should not leave orphans.packages/coding-agent/src/core/prompt-lifecycle.ts, currently pre-delivery only viacancelPromptLifecycle) is the natural home for scoped, recursive post-delivery cancellation — it already owns per-prompt ownership and request fingerprints.metadata.user_id, Meridian can also tear down child SDK subprocesses when the parent's request aborts.Acceptance
aborton a parent with running foreground RLM children terminates the children's provider streams (verify no further child requests hit a stub provider after the abort).