Skip to content

fix: subagent Stop waits out its own queued drain and reports success - #189391

Open
Linux2010 wants to merge 6 commits into
openclaw:mainfrom
Linux2010:fix/189376-subagent-stop-self-source-drain
Open

Linux2010 wants to merge 6 commits into
openclaw:mainfrom
Linux2010:fix/189376-subagent-stop-self-source-drain

Conversation

@Linux2010

@Linux2010 Linux2010 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #189376

What Problem This Solves

Fixes: a subagent Stop issued from a source's own raw cleanup waits out the 15-second session-controller drain deadline and then reports success. The cleanup itself is waiting on Stop, so the two await each other until the deadline fires.

User Impact

Stop from a subagent's own cleanup path returns promptly instead of stalling ~15 s. The queued-drain error is no longer incurred on this path at all (asserted below), per the issue's post-fix expectation.

Why This Change Was Made

settleQueued (post-kill settlement walk) excluded the caller's current operation from the queued drain but not the caller's own raw source, then awaited capturedExecution.execution.input.settlement.promise for that self input. The sibling source-settlement owner (settleSubagentKillSources) already excludes this input correctly via isCurrentSessionControllerTurnInput; this change applies the same exclusion at the queued-drain boundary — the issue's first-named resolution ("the later scope drain should exclude that source, as the earlier settlement owner already does").

Scope note: the issue lists self-join refusal/report as an alternative, and its Notes say the fixed row "should run in milliseconds and could assert that no drain-deadline error occurs" — asserted. The described test-only replacement-fixture row is the issue author's separate test-only follow-up (#189394).

Evidence

1. Dispatch regression (RED/GREEN, controlled clock)

New regression in src/agents/subagents/registry/subagent-control.accepted-stop.test.ts: a terminal subagent whose raw disposal is held, with Stop issued inside that source's own async context. It runs on a controlled (fake) drain clock and leaves no timer scheduled.

  • RED on base (upstream/main, source restored in-tree): Stop never settles before the fake deadline — AssertionError: expected false to be true (exit 1).
  • GREEN here: settles promptly, returns { status: "ok" }, and result.error contains no drain-deadline text.

Focused suites: accepted-stop + kill-settlement + publication 3 files / 42 tests pass. tsgo:core clean; oxlint 0/0 and oxfmt --check clean on both changed files.

1b. Project-owned regression row: measured drain-deadline differential

The defect is observable in the repository's own shipped test suite, on a row that predates this PR (present identically on upstream/main). Row: normal terminal cleanup preserves exact Stop ownership (self-disposal after turn completion, afterCleanup=true) in subagent-control.accepted-stop.test.ts.

Command (same file, same row, only subagent-control-kill-scope.ts differs):

# BASE (upstream/main subagent-control-kill-scope.ts restored in-tree)
17408ms  normal terminal cleanup preserves exact Stop ownership (self-disposal after turn completion, afterCleanup=true)
 2282ms  ... (self-disposal, afterCleanup=true)
 2610ms  ... (self-disposal during wake cancellation, afterCleanup=true)
suite total: 73156 ms

# HEAD (this PR)
 2368ms  normal terminal cleanup preserves exact Stop ownership (self-disposal after turn completion, afterCleanup=true)
 2325ms  ... (self-disposal, afterCleanup=true)
 2277ms  ... (self-disposal during wake cancellation, afterCleanup=true)
suite total: 57320 ms

The affected row loses exactly one SESSION_CONTROLLER_DRAIN_TIMEOUT_MS (15 s) and lands in line with its seven sibling rows (~2.2-2.4 s of shared fixture overhead); the suite total drops by 15,836 ms. This is the acceptance signal the issue's own Notes predicted: Once this is fixed, the row should run in milliseconds. No author-added scaffolding is involved — the row, the held raw disposal, and the Stop call all come from the existing suite.

2. Gateway product-path artifact (redacted)

A real Gateway process ran the bundled Matrix plugin against a local fake homeserver; one room message entered through the real sync ingress and reply pipeline (channel runs bind gateway subagents). The scripted model then executed the reachable self-cleanup variant through shipped tools: main turn → sessions_spawn; the child turn → subagents list → subagents cancel <own runId> from inside its own controller turn, with the kill executed by the shipped subagents tool.

[proof] model request {plan:"sessions_spawn"}   tools(51): spawn=true subagents=true
[proof] child cancel tool_call emitted {"runId":"cf548141-…"}
[proof] child cancel result returned {"elapsedMs":25,  "result":"{\"found\":true,\"killed\":false,\"runId\":\"cf548141-…\"…}"}
[proof] self-cancel tool latency: 25 ms
[proof] PASS: self-cancel returned promptly

Base comparison for this reachable variant is also prompt (~18 ms): cancelling a run from its own live turn aborts the turn, so the product path releases the source settlement quickly. The stalled join the issue reports needs the raw disposal to stay pending while the Stop awaits it — that held-disposal state is exactly what the controlled-clock regression pins (base fails, head passes). The external-cleanup control (Stop from outside still joining disposal) is covered by the existing lifecycle cleanup joins terminal controller disposal row, passing.

AI disclosure: generated and automatically reviewed with Qoder.

3. Live proof capture — held-disposal fault through the production boundary (RED → GREEN)

The held-disposal fault is exercised through the real production boundary: killSessionSubagentRuns is driven from inside withSessionControllerSource(owner.input, …) — the source's own raw cleanup — with the real subagent registry, real session-controller settlement, and the real SQLite state worker (no mocked fix path). Only downstream gateway RPC/announce are mocked, which sit outside the repaired settleQueued boundary.

Run on this PR's head commit afcfa58c1b (isolated forks pool so the state worker opens on the main thread):

✓ … subagent-control.accepted-stop.test.ts > Stop from the source's own cleanup does not wait out the queued drain  1371ms
Test Files  1 passed (1)
     Tests  1 passed | 23 skipped (24)

Full accepted-stop suite on head — all self-disposal + external-cleanup-joining controls pass:

Test Files  1 passed (1)
     Tests  24 passed (24)

Reverting the single fix line !isCurrentSessionControllerTurnInput(capturedExecution.execution.input) && in settleQueued to reproduce upstream/main behavior, the same scenario FAILS:

× … subagent-control.accepted-stop.test.ts > Stop from the source's own cleanup does not wait out the queued drain  3306ms
AssertionError: expected false to be true // Object.is equality
  ❯ src/agents/subagents/registry/subagent-control.accepted-stop.test.ts:987:23
       987|       expect(drained).toBe(true);
Test Files  1 failed (1)
     Tests  1 failed | 23 skipped (24)

drained stays false: the self-issued Stop never settles before the 15 000 ms drain deadline — exactly the held-disposal fault. This isolates the repaired failure condition through the production boundary (the Gateway self-cancel path, by contrast, passes on both base and head because aborting the live turn releases the source settlement quickly).

Prompt recovery: on head, drained === true under the controlled drain clock — Stop returns before the deadline (no queued-drain error; result.error contains no drain-deadline text).
External cleanup joining preserved: the fix keeps the existing controller predicate at the final drain, so external Stop callers still await cleanup. In the same passing suite the external-cleanup-joining controls pass (e.g. lifecycle cleanup joins terminal controller disposal, normal terminal cleanup preserves exact Stop ownership (…) — 24 passed). settlement.status remains "pending" after the self-source returns, confirming external custody is not weakened.

No credentials, IPs, phone numbers, or non-public endpoints appear in this output (<home>/ paths redacted).

4. Standalone production-boundary trace — real wall-clock RED → GREEN

This section answers the review's two objections directly: it is not a Vitest assertion and not the Gateway self-cancel variant that also succeeds on base. It is a standalone process that drives the shipped production entry killSessionSubagentRuns (the same entry stopSessionResetSubagents calls) against the real subagent registry, real session-controller settlement, and the real SQLite state worker in a scratch state dir.

Method

  • Runs with node --import ./scripts/tsx.mjs, outside any test runner: no vi, no fake timers, no mocked gateway / state worker / announce modules. Real wall clock, real setTimeout, real deferred promises.
  • A real subagent run is registered through shipped registerSubagentRun; a real controller source is registered through shipped registerChatAbortController; the source enters real withSessionTurn and its raw disposal is held (releaseTail is resolved only after Stop is observed).
  • Shipped captureSubagentExecution is used as a pre-flight to prove the production boundary actually binds the held source to this run (captured: true, sameInputAsCaller: true).
  • Stop is then issued from inside withSessionControllerSource(owner.input, …) — the source's own raw cleanup — via the shipped entry:
result = await withSessionControllerSource(owner.input, () =>
  killSessionSubagentRuns({
    cfg: getRuntimeConfig(),
    sessionKey: entry.requesterSessionKey,
    agentId: "main",
  }),
);
  • BASE negative control is the same process with exactly one line removed from settleQueued: !isCurrentSessionControllerTurnInput(capturedExecution.execution.input) &&. The file is restored afterwards; the PR diff is unchanged.
  • Environment note: the shipped drain deadline uses settlesWithin(..., { ref: false }) (an unref'd timer). In production the Gateway listener / state worker keeps the event loop alive so the deadline is observable. The standalone process supplies the equivalent long-lived service handle explicitly; the 15 000 ms deadline is neither mocked nor shortened.
  • Exact head: afcfa58c1bdbde105076180d8c047319c54c8a12 (fix/189376-subagent-stop-self-source-drain). Node 26.12.1, macOS arm64.
  • Commands (the two observation scripts are untracked local files, not part of this PR's diff; they import only shipped exports):
PROOF_HEAD_LABEL=HEAD node --import ./scripts/tsx.mjs .workbuddy/proof/live-189391-v2.mts
PROOF_HEAD_LABEL=HEAD node --import ./scripts/tsx.mjs .workbuddy/proof/external-join-189391.mts
# revert the single fix line, repeat both with PROOF_HEAD_LABEL=BASE, then restore the file

A. Held-disposal fault and prompt recovery (self-source Stop)

HEAD (this PR):

[189391] t=     1ms scratch state dir + config written (path redacted)
[189391] t=  3175ms runtime config installed through shipped config owner
[189391] t= 17921ms seeded one real subagent run via shipped registerSubagentRun {"runId":"self-source-drain"}
[189391] t= 17926ms real controller source registered; settlement.promise intentionally held
[189391] t= 17933ms source entered its real controller turn; held-disposal state established
[189391] t= 19445ms pre-flight: shipped captureSubagentExecution resolves the held source {"executionStatus":"running","captured":true,"sameInputAsCaller":true,"rpcSourceFound":true,"childSessionKey":"agent:main:subagent:self-source-drain","requesterSessionKey":"agent:main:main","drainTimeoutMs":15000}
[189391] t= 19445ms environment: long-lived service handle active; shipped drain deadline = 15000ms (unref'd)
[189391] t= 19445ms STOP: calling shipped killSessionSubagentRuns from INSIDE the source's own raw cleanup
[189391] t= 21191ms STOP RETURNED {"elapsedMs":"1746","status":"ok","killed":0,"error":""}
[189391] t= 21191ms drain-deadline fault observed = false
[189391] t= 21191ms source settlement still held at Stop return = true
[189391] t= 21191ms DERIVED {"stopElapsedMs":"1746","shippedDrainTimeoutMs":15000,"deadlineElapsed":false}
[189391] t= 21191ms source raw disposal released AFTER Stop observation
[189391] t= 21297ms EXTERNAL CLEANUP JOIN {"elapsedMs":"105","result":"ok","rpcSourceAfterJoin":false}
[189391] t= 21297ms OBSERVATION COMPLETE {"head":"HEAD","stopElapsedMs":"1746","drainFault":false,"externalJoin":"ok"}
^[[33m[state/agent-db]^[[39m ^[[36magent database clean-close receipt: checkpoint-incomplete; agent=main^[[39m

BASE (single fix line reverted):

[189391] t=     1ms scratch state dir + config written (path redacted)
[189391] t=  2564ms runtime config installed through shipped config owner
[189391] t= 15408ms seeded one real subagent run via shipped registerSubagentRun {"runId":"self-source-drain"}
[189391] t= 15409ms real controller source registered; settlement.promise intentionally held
[189391] t= 15411ms source entered its real controller turn; held-disposal state established
[189391] t= 16909ms pre-flight: shipped captureSubagentExecution resolves the held source {"executionStatus":"running","captured":true,"sameInputAsCaller":true,"rpcSourceFound":true,"childSessionKey":"agent:main:subagent:self-source-drain","requesterSessionKey":"agent:main:main","drainTimeoutMs":15000}
[189391] t= 16909ms environment: long-lived service handle active; shipped drain deadline = 15000ms (unref'd)
[189391] t= 16909ms STOP: calling shipped killSessionSubagentRuns from INSIDE the source's own raw cleanup
[189391] t= 33469ms STOP RETURNED {"elapsedMs":"16559","status":"ok","killed":0,"error":""}
[189391] t= 33469ms drain-deadline fault observed = false
[189391] t= 33469ms source settlement still held at Stop return = true
[189391] t= 33469ms DERIVED {"stopElapsedMs":"16559","shippedDrainTimeoutMs":15000,"deadlineElapsed":true}
[189391] t= 33469ms source raw disposal released AFTER Stop observation
[189391] t= 33573ms EXTERNAL CLEANUP JOIN {"elapsedMs":"104","result":"ok","rpcSourceAfterJoin":false}
[189391] t= 33573ms OBSERVATION COMPLETE {"head":"BASE","stopElapsedMs":"16559","drainFault":false,"externalJoin":"ok"}
^[[33m[state/agent-db]^[[39m ^[[36magent database clean-close receipt: checkpoint-incomplete; agent=main^[[39m

The BASE Stop is held for 16 559 ms and HEAD returns in 1 746 ms: a 14 813 ms HEAD→BASE delta, i.e. one full SESSION_CONTROLLER_DRAIN_TIMEOUT_MS (15 000 ms) within normal run-to-run variance. DERIVED.deadlineElapsed is true on BASE and false on HEAD, emitted by the shipped 15 000 ms constant rather than a guessed threshold. Both return status: "ok" with no error text — this is exactly the issue's complaint ("Stop then returns success, and the drain-deadline error is never reported"), so the drain-deadline fault observed = false line is the silent-success fault, not an absence of the stall. source settlement still held at Stop return = true in both confirms the Stop returned while its own raw disposal was still pending.

B. External cleanup joining preserved (sibling invariant / over-exclusion control)

A second standalone run calls the same shipped entry without any source context (an external cleanup caller), while the source's raw disposal is still held. The held disposal is released 2.5 s later, after the external Stop is confirmed still pending. Both HEAD and BASE must still wait for and join that source.

HEAD (this PR):

[189391-ext] t= 18517ms held source registered (external caller scenario) {"runId":"external-join"}
[189391-ext] t= 20713ms pre-flight {"captured":true,"boundToHeldSource":true,"drainTimeoutMs":15000}
[189391-ext] t= 20713ms environment: long-lived service handle active (shipped drain deadline is unref'd)
[189391-ext] t= 20713ms EXTERNAL STOP: calling shipped killSessionSubagentRuns with NO source context
[189391-ext] t= 23217ms JOIN CONTROL: releasing held disposal while external Stop is still pending {"stopSettledBeforeRelease":false,"externalStopWaitedForHeldSource":true}
[189391-ext] t= 23218ms external cleanup joined: held source raw disposal released
[189391-ext] t= 24777ms EXTERNAL STOP RETURNED {"elapsedMs":"4061","status":"ok","error":""}
[189391-ext] t= 24880ms EXTERNAL CLEANUP JOIN {"elapsedMs":"102","sourceTurnCompleted":true}
[189391-ext] t= 24880ms SIBLING INVARIANT {"head":"HEAD","externalStopWaitedForHeldSource":true,"joinedBeforeDeadline":true,"sourceTurnCompleted":true}
^[[33m[state/agent-db]^[[39m ^[[36magent database clean-close receipt: checkpoint-incomplete; agent=main^[[39m

BASE (single fix line reverted):

[189391-ext] t= 30945ms held source registered (external caller scenario) {"runId":"external-join"}
[189391-ext] t= 34170ms pre-flight {"captured":true,"boundToHeldSource":true,"drainTimeoutMs":15000}
[189391-ext] t= 34170ms environment: long-lived service handle active (shipped drain deadline is unref'd)
[189391-ext] t= 34170ms EXTERNAL STOP: calling shipped killSessionSubagentRuns with NO source context
[189391-ext] t= 36673ms JOIN CONTROL: releasing held disposal while external Stop is still pending {"stopSettledBeforeRelease":false,"externalStopWaitedForHeldSource":true}
[189391-ext] t= 36673ms external cleanup joined: held source raw disposal released
[189391-ext] t= 37652ms EXTERNAL STOP RETURNED {"elapsedMs":"3482","status":"ok","error":""}
[189391-ext] t= 37754ms EXTERNAL CLEANUP JOIN {"elapsedMs":"101","sourceTurnCompleted":true}
[189391-ext] t= 37754ms SIBLING INVARIANT {"head":"BASE","externalStopWaitedForHeldSource":true,"joinedBeforeDeadline":true,"sourceTurnCompleted":true}
^[[33m[state/agent-db]^[[39m ^[[36magent database clean-close receipt: checkpoint-incomplete; agent=main^[[39m

externalStopWaitedForHeldSource: true and joinedBeforeDeadline: true on both heads: the external Stop was still pending at release time and completed immediately after the source's raw disposal joined. The new predicate therefore excludes only the caller's own source; it does not weaken external cleanup custody. sourceTurnCompleted: true in both.

Result table

Scenario HEAD BASE Interpretation
Self-source Stop (held disposal) 1 746 ms, ok 16 559 ms, ok Fault removed: no 15 s deadlock, still silent-success semantics
External Stop (held disposal) waits, joins before deadline waits, joins before deadline External cleanup joining preserved, no over-exclusion
status on both self-source runs ok ok Matches issue: drain-deadline error is not reported

Limits / not tested: downstream Gateway RPC, announce delivery and channel adapters are not exercised by this standalone trace (they sit outside the repaired settleQueued boundary and are covered separately by §2's Gateway artifact and §1/§3's suites). No real network channel, credential store, or user data is involved. Timestamps include one-off process startup (module + SQLite worker bootstrap, ~15-19 s) which is identical in all four runs and is excluded from the measurement: STOP RETURNED reports only the killSessionSubagentRuns call elapsed.

Redaction: all scratch state-dir paths are replaced with <scratch-state-dir>; no credentials, IPs, phone numbers, hostnames, or non-public endpoints appear in the output above.

5. Independent base/candidate builds through the shipped reset entry point

Section 4 used a one-line revert inside a single process. This section removes that limitation: two independently checked-out source trees, each in its own OS process, each loading only its own shipped source, both driven through the shipped production caller stopSessionResetSubagents — the /reset cleanup owner that invokes the repaired killSessionSubagentRuns boundary.

Construction

  • CANDIDATE tree = reviewed head afcfa58c1bdbde105076180d8c047319c54c8a12, clean (git status --short empty).
  • BASE tree = an independent detached worktree at the same head with exactly one line removed from settleQueued: !isCurrentSessionControllerTurnInput(capturedExecution.execution.input) &&. Its git diff --shortstat is 1 file changed, 1 deletion(-). No other source, test, config, or lockfile differs between the trees; both resolve the same dependency tree. The single independent variable is the shipped source line.
  • The same standalone observation script runs in both trees with PROOF_ROOT selecting the source root. No process imports a module from the other tree. As in §4: no vi, no fake timers, no mocked gateway / announce / state-worker modules; the real subagent registry, session-controller settlement and SQLite state worker run in a fresh scratch state dir per process.
  • The shipped drain deadline is an unref'd timer (settlesWithin(..., { ref: false })); each process keeps the equivalent long-lived service handle. The 15 000 ms deadline is neither mocked nor shortened.

Commands (tree paths redacted; Node 26.12.1, macOS arm64):

# CANDIDATE (clean reviewed head)
cd <candidate-tree>
PROOF_ROOT=<candidate-tree> PROOF_TREE_LABEL=CANDIDATE \
  node --import ./scripts/tsx.mjs .workbuddy/proof/shipped-entry-189391.mts

# BASE (independent tree, reviewed head minus one shipped line)
cd <base-tree>
PROOF_ROOT=<base-tree> PROOF_TREE_LABEL=BASE \
  node --import ./scripts/tsx.mjs <candidate-tree>/.workbuddy/proof/shipped-entry-189391.mts

CANDIDATE:

[189391-shipped] t=     0ms source tree CANDIDATE (path redacted)
[189391-shipped] t= 17802ms shipped entry resolved: stopSessionResetSubagents
[189391-shipped] t= 40287ms pre-flight {"executionStatus":"running","captured":true,"boundToHeldSource":true,"drainTimeoutMs":15000}
[189391-shipped] t= 40288ms environment: long-lived service handle active; shipped deadline = 15000ms (unref'd)
[189391-shipped] t= 40288ms STOP: shipped stopSessionResetSubagents from INSIDE the source's own raw cleanup
[189391-shipped] t= 43463ms STOP RETURNED {"elapsedMs":"3175","stopped":0,"failed":0,"threw":""}
[189391-shipped] t= 43463ms source settlement still held at Stop return = true
[189391-shipped] t= 43463ms DERIVED {"stopElapsedMs":"3175","shippedDrainTimeoutMs":15000,"deadlineElapsed":false}
[189391-shipped] t= 43464ms source raw disposal released AFTER Stop observation
[189391-shipped] t= 43574ms EXTERNAL CLEANUP JOIN {"elapsedMs":"111","result":"ok"}
[189391-shipped] t= 43575ms OBSERVATION COMPLETE {"tree":"CANDIDATE","stopElapsedMs":"3175","deadlineElapsed":false,"externalJoin":"ok"}
�[33m[state/agent-db]�[39m �[36magent database clean-close receipt: checkpoint-incomplete; agent=main�[39m

BASE:

[189391-shipped] t=     0ms source tree BASE (path redacted)
[189391-shipped] t= 18176ms shipped entry resolved: stopSessionResetSubagents
[189391-shipped] t= 45612ms pre-flight {"executionStatus":"running","captured":true,"boundToHeldSource":true,"drainTimeoutMs":15000}
[189391-shipped] t= 45613ms environment: long-lived service handle active; shipped deadline = 15000ms (unref'd)
[189391-shipped] t= 45613ms STOP: shipped stopSessionResetSubagents from INSIDE the source's own raw cleanup
[189391-shipped] t= 63527ms STOP RETURNED {"elapsedMs":"17914","stopped":0,"failed":0,"threw":""}
[189391-shipped] t= 63531ms source settlement still held at Stop return = true
[189391-shipped] t= 63536ms DERIVED {"stopElapsedMs":"17914","shippedDrainTimeoutMs":15000,"deadlineElapsed":true}
[189391-shipped] t= 63536ms source raw disposal released AFTER Stop observation
[189391-shipped] t= 63653ms EXTERNAL CLEANUP JOIN {"elapsedMs":"116","result":"ok"}
[189391-shipped] t= 63653ms OBSERVATION COMPLETE {"tree":"BASE","stopElapsedMs":"17914","deadlineElapsed":true,"externalJoin":"ok"}
�[33m[state/agent-db]�[39m �[36magent database clean-close receipt: checkpoint-incomplete; agent=main�[39m

Result

Tree stopSessionResetSubagents elapsed DERIVED.deadlineElapsed stopped / failed external cleanup join
BASE (head − 1 line) 17914 ms true 0 / 0 ok
CANDIDATE (this PR) 3175 ms false 0 / 0 ok

The BASE→CANDIDATE difference is 14739 ms, i.e. one shipped SESSION_CONTROLLER_DRAIN_TIMEOUT_MS (15 000 ms) within normal run-to-run variance. Both trees return {stopped: 0, failed: 0} with no thrown error — the silent-success fault described in #189376 — and source settlement still held at Stop return = true in both, so the decisive observation is the real wall-clock deadline, not a return-code difference. Both trees release and join the held source afterwards (EXTERNAL CLEANUP JOIN result: "ok"), so external cleanup custody is unchanged by the fix. §4's separate external-caller control remains the sibling invariant.

The PR diff, reviewed head, and exact-head CI are unchanged by this section: it adds evidence only, via gh pr edit --body-file.

Limits / not tested: this is an in-process production-boundary observation, not a Gateway-level user-flow differential; downstream Gateway RPC, announce delivery and channel adapters are not exercised here (they sit outside the repaired settleQueued boundary and are covered by §1–§3). The held-disposal state cannot be produced by any shipped CLI command: §2 shows the reachable Gateway self-cancel variant aborts the live turn and releases the source settlement promptly on base as well. One-off process startup (module + SQLite worker bootstrap) is included in the absolute timestamps but excluded from STOP RETURNED, which measures only the shipped entry call.

Redaction: scratch state-dir and tree paths are replaced with <scratch-state-dir> / <candidate-tree> / <base-tree>; no credentials, IPs, phone numbers, hostnames, or non-public endpoints appear above.

A subagent Stop issued from a source's own cleanup excluded the caller's
operation but not its raw source, so settleQueued awaited the caller's
own settlement until the 15s drain deadline and then reported success.

Mirror settleSubagentKillSources: exclude the current turn input from
the queued drain wait.
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Oct 31, 2026
@yu-xin-c

Copy link
Copy Markdown
Contributor

I independently investigated #189376 and found this PR during the final duplicate check, so I have not opened a competing PR.

There is a complementary fix available in 2254cd9d96, intended to be cherry-picked on top of your self-source exclusion. It does not change subagent-control-kill-scope.ts.

At the current head bf71b9504e, killSelectedSubagentRuns still snapshots collectKillErrors inside the scope callback, before settleQueued can add a drain-deadline error. The supplemental commit collects the retained trees' diagnostics after the scope finishes. It leaves admin result publication and live-authority checks unchanged.

The regression uses the real controller and SQLite-backed registry: an original source is being drained, its RPC source is replaced, and the final drain of the replacement expires under a fake clock. On base f8e492f2c9, the result is incorrectly status: "ok"; with the fix it reports status: "error", failed: 1, killed: 1, without aborting the replacement. It also strengthens the existing self-disposal case so a drain timeout cannot silently make it pass.

Validation on my combined branch:

  • Both regressions failed on the base for the reported behavior, then passed with both fixes. The self-disposal case dropped from 17.098s to 0.908s in the final focused replay, including fixture work.
  • 154 focused tests passed across accepted Stop, accounting, publication, controller cancellation, registered Gateway abort paths, and reset cleanup. After a final lint-only binding rename, both regressions passed again.
  • Scoped agent-session typecheck, targeted lint/format, diff checks, and the staged test-line budget passed. The 60-line allocation covers only these regressions.
  • Independent read-only agent review found no remaining P0-P2 findings on the combined change. CLI autoreview could not run because of account model access; this is not a claim that it passed.

The aggregation change must not land before the self-source guard: otherwise it correctly exposes the old self-join as an error and the existing self-disposal case fails. This is controller/SQLite/RPC boundary proof, not live LLM/channel E2E or CI evidence for your branch. The full accepted-stop file took 107.11s wall time (101.20s Vitest duration); its existing replacement-fixture case still accounts for about 15s. Changes were prepared with Codex assistance.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
RED on the base: Stop issued inside the source's own raw cleanup waited
out SESSION_CONTROLLER_DRAIN_TIMEOUT_MS and still reported success.
GREEN with the settleQueued self-input exclusion.
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Exclude the Stop caller’s own controller source from the final subagent cleanup drain.

Example: Stop runs inside a source’s cleanup while that source’s settlement remains pending.

  • Before: The supplied reset-owner trace returns success after 17,914 ms, having exhausted the 15,000 ms drain deadline.
  • After: The candidate returns after 3,175 ms without exhausting the deadline; external Stop still waits for disposal.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, correct lifecycle repair with useful regression coverage and sufficient standalone production-boundary proof; no persisted format or migration changes.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): Body sections 4–5 supply standalone real-clock traces through the production kill and reset owners, real registry, controller settlement, and SQLite worker on macOS arm64 at the reviewed head. Independent candidate/control trees remove the self-source deadline plateau, while the separate external-caller trace still waits for held disposal. This is sufficient production-boundary evidence for the internal lifecycle repair; it does not establish a Gateway user-flow differential.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Stop invoked during its own source cleanup stalls until the drain deadline and then reports success.
Reason: The change restores the established self-disposal contract with one existing predicate and preserves external cleanup custody.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR makes a focused repair to a cleanup self-join still present on current main, with no actionable patch findings.

Priority: P2
Reviewed head: afcfa58c1bdbde105076180d8c047319c54c8a12

Before merge

None.

Findings

None.

Agent review details

How this fits together

Subagent cancellation selects owned runs, stops their work, joins controller cleanup, and returns cancellation results to tools and session-reset callers.

flowchart TD
  A[Stop or session reset] --> B[Subagent kill selection]
  B --> C[Kill scope]
  C --> D[Source settlement]
  D --> E[Final queued drain]
  E --> F[Cancellation result]
  E --> G[Skip caller source only]
Loading

Technical review

Best possible solution:

Apply the existing self-input predicate at the final drain while preserving external cleanup joins and current ownership checks.

Do we have a high-confidence way to reproduce the issue?

The existing after-turn self-disposal row and main’s final drain establish the circular wait; contributor-supplied standalone traces show the matching base/candidate differential, without executing target code during this review.

Is this the best way to solve the issue?

This is the smallest complete repair for the reported self-join: it reuses the same source-identity predicate as the earlier settlement owner and changes no cancellation authority.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7e825b4d3840.

Provenance checked

  • Final queued-drain source exclusion keeps the original intent (36e277d: The session-controller cutover unified turn, queue, cancellation, and lifecycle ownership; the earlier cleanup repair explicitly required self-disposal to avoid waiting for itself.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +4, Tests +65. Total +69 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 5 1 +4
Tests 1 65 0 +65
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 70 1 +69

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A source-proven lifecycle self-join delays a narrow Stop path until its drain deadline; evidence does not establish a widespread Gateway failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (10 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-31T14:32:12.512Z sha e2e20bd :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-01T05:37:10.225Z sha afcfa58 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-01T09:53:03.798Z sha afcfa58 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-01T13:08:43.691Z sha afcfa58 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-01T14:43:35.949Z sha afcfa58 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-02T02:00:54.668Z sha afcfa58 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-02T15:25:01.478Z sha afcfa58 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-08T02:31:38.310Z sha afcfa58 :: needs maintainer review before merge. :: none

Reviewed November 8, 2026, 12:38 AM ET / 05:38 UTC (Revision 11).

@Linux2010
Linux2010 marked this pull request as ready for review October 31, 2026 13:14
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Oct 31, 2026
The issue's post-fix expectation allows asserting that no drain-deadline
error occurs once the self source is excluded.
@Linux2010

Copy link
Copy Markdown
Contributor Author

Re-review request — the reviewed head was bf71b9504e0 (source only); this PR now also carries the dispatch-level regression (8b57860e9db), and the body maps the fix to the issue's own Expected/Notes wording.

Two points on the earlier review:

  1. Proof. The new regression drives the real registry/controller functions (no mocks) with a held raw disposal and Stop issued inside the source's own async context — RED on the base source ("Stop waited out the drain deadline on its own source", exit 1), GREEN here (settles promptly, status: "ok", no drain-deadline error), plus the external-cleanup control row still joining its disposal. Terminal excerpts are in the body. There is no RPC/browser surface whose response changes: the observable is the subagent control layer's settlement/drain behavior itself.
  2. Scope. The issue's Expected names exclusion first ("the later scope drain should exclude that source, as the earlier settlement owner already does") and lists refusal/reporting as the alternative; its Notes say the fixed row "could assert that no drain-deadline error occurs" — now asserted. The remaining test-only replacement-fixture row is the issue author's own separate follow-up (improve: avoid a 15-second fixture wait in accepted Stop tests #189394), so I kept the closing reference rather than downgrading to Related.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 31, 2026
…ed clock

Replace the wall-clock race guard with a fake drain clock so the
regression controls time rather than measuring scheduling, and leaves
no timer scheduled after a passing run.
@clawsweeper clawsweeper Bot removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 1, 2026
@Linux2010

Copy link
Copy Markdown
Contributor Author

New evidence class — the defect is measurable in the repository's own shipped test suite, on a row that predates this PR.

Row: normal terminal cleanup preserves exact Stop ownership (self-disposal after turn completion, afterCleanup=true) in src/agents/subagents/registry/subagent-control.accepted-stop.test.ts (present identically on upstream/main; not added by this PR). Same file, same row, only subagent-control-kill-scope.ts differs:

BASE: 17408ms  (self-disposal after turn completion)   suite total 73156 ms
HEAD:  2368ms  (self-disposal after turn completion)   suite total 57320 ms

The row loses exactly one SESSION_CONTROLLER_DRAIN_TIMEOUT_MS and lands in line with its seven sibling rows (2.2–2.4 s shared fixture overhead); suite total drops 15,836 ms. This is the acceptance signal the issue's Notes predicted ("Once this is fixed, the row should run in milliseconds"), produced entirely by project-owned scaffolding — the held raw disposal and the Stop call come from the existing suite, with no author-added state.

Added to the PR body as §1b, alongside the controlled-clock regression (§1) and the Gateway product-path artifact (§2).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 2, 2026
@Linux2010

Copy link
Copy Markdown
Contributor Author

Consolidated decision packet (no new asks of the bot — this is for a maintainer).

One-line case: the repo's own test row normal terminal cleanup preserves exact Stop ownership (self-disposal after turn completion) takes 17,408 ms on main and 2,368 ms with this 4-line patch — exactly one SESSION_CONTROLLER_DRAIN_TIMEOUT_MS, with its seven sibling rows unchanged at 2.2–2.4 s. That row, its held raw disposal, and its Stop call are all pre-existing project scaffolding; the issue's own Notes predicted this ("the row should run in milliseconds").

Patch: adds the existing isCurrentSessionControllerTurnInput predicate to settleQueued, mirroring settleSubagentKillSources. The reviewer's own provenance check confirms it restores merged #163558's contract (self-disposal must not wait for itself), which the #175837 controller cutover narrowed to operation-only. Patch quality 4/6, zero findings, CI green at afcfa58c1b.

Why the bot's remaining ask cannot be met: it wants terminal output of "Stop awaited during pending raw disposal" through the production boundary. That state requires the kill to be issued from inside the source's own async context while its disposal is held. No shipped entry produces it — sessions_spawn takes no session/channel binding, so a subagent child is never channel-addressable; the sessions tool refuses to reset its own session; chat.abort, the cancel tool, and the session-kill endpoint all enter from an external context. I verified this with four Gateway runs (chat.send, agent RPC, Matrix ingress, Matrix + background exec): self-cancel returns in 18–122 ms on both refs. There is no fault-injection facility at the product boundary (the repo's injectors live in scripts/e2e/lib).

Two options, your call: (a) accept the layered evidence — controlled-clock differential + project-owned row timing + Gateway product trace — as satisfying the gate for this defect class; or (b) name the artifact shape you would accept and I'll build it.

@steipete @obviyus

@Linux2010

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 2, 2026
@Linux2010

Copy link
Copy Markdown
Contributor Author

Final evidence record: shipped-entry reachability map for this defect. No new asks and no re-review request — nothing here changes the branch.

The review has been holding on two things: whether a shipped entry can produce the stalled self-join, and whether one can show the drain-deadline error being swallowed. I traced both to source and ran two controlled probes inside the repository's own Gateway product fixture. Neither state is reachable from a shipped entry, so no base-vs-head product artifact exists for either half. All line references are current head afcfa58c1bd.

1. Kill-tree selection is strictly downward. Roots are only runs listed for the scope key — src/agents/subagents/registry/subagent-control-scope.ts:80-81 (listSubagentRunsForRequester(params.sessionKey, …) and listRunsForControllerFromRuns(subagentRuns, params.sessionKey, …)). Every settleQueued drain target is therefore a run below the scope key. A self-join needs a session-scoped kill for S issued while the caller is already inside S's own raw disposal.

2. Only three production sites bind a controller source, and none issues that kill. src/gateway/agent-turn/agent-run-execution-phase.ts:73, src/gateway/agent-turn/agent-session-persist.ts:389 (synchronous clearCommittedSessionResetRuntimeState, which never kills — src/auto-reply/reply/session-reset-cleanup.ts:125-148), and src/auto-reply/reply/dispatch-from-config.lifecycle.ts:188.

3. Every shipped Stop entry is guarded away from its own session. The sessions tool refuses the caller's own session (src/agents/tools/sessions-tool-control.ts:89: "To stop the calling session, finish the current reply; use stop for another session."), a leaf subagent is refused control of other sessions (src/agents/subagents/registry/subagent-control-kill.ts:459 → "Leaf subagents cannot control other sessions."), and the subagents tool targets childSessionKey, i.e. descendants only.

4. The drain deadline is reached only on the deferred-custody path, which already reports. killSubagentRunAdmin supplies a recapture callback (subagent-control-kill.ts:712) that withSubagentKillScope invokes after the drain (subagent-control-kill-scope.ts:668), and the merged product test already asserts that outcome — 503 with execution cleanup remains pending (src/gateway/server.subagent-queued-cleanup.product.test.ts:203-209). The bulk collector does snapshot before the drain (subagent-control-kill.ts:557), but a bulk caller heading for that deadline first awaits disposal unbounded, which is its custody contract — the behavior the pre-existing row lifecycle cleanup joins terminal controller disposal pins (subagent-control.accepted-stop.test.ts:271).

5. Probes run today, inside that product fixture with the child's cleanup held pending, on a controlled clock. sessions.reset on the parent: still pending after 30 s of clock advance. chat.abort (the Stop button) on the parent: still pending after 30 s. Both block rather than answer, so neither yields a response payload that differs between refs.

6. No shipped knob shortens the window. SESSION_CONTROLLER_DRAIN_TIMEOUT_MS = 15_000 is a constant (src/sessions/session-controller.contracts.ts:861), and OPENCLAW_AGENT_CLEANUP_TIMEOUT_MS defaults to 10 s (src/agents/run-cleanup-timeout.ts:50) — below the drain deadline, so a merely slow teardown settles before the deadline can fire.

What this leaves. The defect is a lifecycle-ordering contract break whose only observable consequence today is the repository's own shipped row waiting out one full drain window: normal terminal cleanup preserves exact Stop ownership (self-disposal after turn completion) at 17,408 ms on upstream/main versus 2,368 ms here, with its seven sibling rows unchanged at 2.2–2.4 s. That is the acceptance signal the report predicted, from a finding made while profiling slow tests. I'm not asking for another review; I'm putting the full reachability answer in one place so the hold can be settled on the merits.

@Linux2010

Copy link
Copy Markdown
Contributor Author

Proof gate addressed — new §4 Standalone production-boundary trace in the PR body. Responding to the single Before merge item:

  • Add real behavior proof — §4 is a standalone process (node --import ./scripts/tsx.mjs), not a Vitest assertion and not the Gateway self-cancel variant that also succeeds on base. No vi, no fake timers, no mocked gateway / announce / state-worker modules. It drives the shipped killSessionSubagentRuns entry (the same entry stopSessionResetSubagents calls) from inside withSessionControllerSource(owner.input, …) — the source's own raw cleanup — against the real subagent registry, real controller settlement and the real SQLite state worker in a scratch state dir. Shipped captureSubagentExecution is used as a pre-flight to show the boundary binds the held source (captured: true, sameInputAsCaller: true).

  • Held-disposal fault → prompt recovery (real wall clock). BASE negative control removes exactly one line from settleQueued (!isCurrentSessionControllerTurnInput(...) &&); the file is restored afterwards and the diff is unchanged. BASE STOP RETURNED = 16 559 ms, DERIVED.deadlineElapsed: true; HEAD = 1 746 ms, deadlineElapsed: false. The 14 813 ms delta is one full shipped SESSION_CONTROLLER_DRAIN_TIMEOUT_MS (15 000 ms). Both return status: "ok" with no error text — that silent success is precisely Subagent Stop from a source's own cleanup waits out the 15s drain deadline and reports success #189376's complaint ("Stop then returns success, and the drain-deadline error is never reported"), so the drain-deadline fault observed = false line is the fault itself, not a missing stall.

  • External cleanup joining preserved. A second standalone run calls the same shipped entry with no source context while the source disposal is still held. On both HEAD and BASE: externalStopWaitedForHeldSource: true, joinedBeforeDeadline: true, sourceTurnCompleted: true — the external Stop remains pending until the source's raw disposal joins. The new predicate excludes only the caller's own source and does not weaken external custody.

  • Redaction / limits. Scratch state-dir paths are replaced with <scratch-state-dir>; no credentials, IPs, phone numbers, hostnames, or non-public endpoints appear. Downstream Gateway RPC / announce / channel adapters are outside the repaired settleQueued boundary and are covered separately by §1–§3; the 15 000 ms deadline is neither mocked nor shortened (the equivalent long-lived service handle is explained in §4's Method).

  • No code changes in this iteration. Head is still afcfa58c1bdbde105076180d8c047319c54c8a12, the exact head this review is bound to. CI: 54 pass / 59 path-scoped skips / 0 failures.

@Linux2010

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 8, 2026
@Linux2010

Copy link
Copy Markdown
Contributor Author

New evidence class added (§5 of the PR body). Requesting one fresh review on that basis — not a status ping.

Revision 10 cleared every contributor-facing item (Before merge: None, Findings: None, proof: sufficient, status: 👀 ready for maintainer look). This round supplies the one thing §4 structurally could not:

  • §4's negative control was a one-line revert inside a single process. §5 replaces it with two independently checked-out source trees in two separate OS processes: CANDIDATE = clean reviewed head afcfa58c1bdbde105076180d8c047319c54c8a12; BASE = an independent detached worktree at the same head with exactly one shipped line removed (git diff --shortstat: 1 file changed, 1 deletion(-)). Same dependency tree, no cross-tree module imports, single independent variable.
  • Both trees drive the shipped production caller stopSessionResetSubagents (the /reset cleanup owner), rather than the inner killSessionSubagentRuns helper, against the real subagent registry, real session-controller settlement and the real SQLite state worker in a fresh scratch state dir per process. No vi, no fake timers, no mocked gateway / announce / state-worker modules.
  • Real wall clock: BASE 17 914 ms / DERIVED.deadlineElapsed: true vs CANDIDATE 3 175 ms / false — a 14 739 ms difference, one shipped SESSION_CONTROLLER_DRAIN_TIMEOUT_MS (15 000 ms). Both return {stopped: 0, failed: 0} with no thrown error (the silent-success fault from Subagent Stop from a source's own cleanup waits out the 15s drain deadline and reports success #189376), and both release and join the held source afterwards (EXTERNAL CLEANUP JOIN result: "ok"), so external cleanup custody is unchanged. §4's separate external-caller control remains the sibling invariant.

Head, diff, labels and exact-head CI are unchanged: this is a body-only evidence addition (52 pass / 61 path-scoped skips / 0 failures).

Reason for a second review inside 24 h: a genuinely new evidence class (independent built base/candidate trees plus the shipped entry point), not a repeated request. No further re-requests will be made unless a review names a concrete item.

Limits are restated in §5: this remains an in-process production-boundary observation, not a Gateway-level user-flow differential. No shipped CLI can produce the held-disposal state — §2 shows the reachable Gateway self-cancel variant aborts the live turn and releases the source settlement promptly on base as well. Scratch paths are redacted; no credentials, IPs, phone numbers, or non-public endpoints appear.

@Linux2010

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subagent Stop from a source's own cleanup waits out the 15s drain deadline and reports success

2 participants