Skip to content

Capability cleanup + three admission/revocation fixes for the host-request dispatcher - #1357

Open
snimu wants to merge 62 commits into
core02-host-request-dispatcherfrom
review/core02-capability-cleanup
Open

Capability cleanup + three admission/revocation fixes for the host-request dispatcher#1357
snimu wants to merge 62 commits into
core02-host-request-dispatcherfrom
review/core02-capability-cleanup

Conversation

@snimu

@snimu snimu commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Capability cleanup + three admission/revocation fixes for the host-request dispatcher

Follow-up to #1243, based on its current head (77b188b). Targets core02-host-request-dispatcher so it can be reviewed in isolation and merged into the PR branch.

PR #1243 turned kernel→host callbacks into factory-minted capability handlers with per-request
abortable contexts. This branch removes the migration scaffolding that shipped with that change
and fixes three bugs in the revocation/admission paths.

Cleanup commits (behavior-preserving; suite green after each)

  1. 37189b7 — collapse HostRequestHandlerImplementation into HostRequestHandler
    Two exported names for the same binary (payload, context) => Promise<...> shape. Keep one.

  2. d877040 — drop the context-aware marker from createHostRequestHandler
    The options parameter (HostRequestHandlerOptions / contextAwareHostRequestHandler) had
    exactly one legal value at all 17 call sites. The factory + WeakSet is the provenance
    authority and the TS signature already forces the binary shape; the marker was ceremony.
    Also deletes the test that only exercised the marker.

  3. 9d45f21 — shrink HostRequestContext to the signal
    requestId and generation had zero production consumers (tests just echoed them). The
    KernelManager.hostRequestGeneration counter existed solely to feed the deleted field.

  4. d69df06 — drop the copyable handler brand symbol
    The symbol was copyable (the old test literally copied it onto a forgery) and rejected
    nothing the WeakSet did not already reject. With it gone, the
    HostRequestHandlerCapability intersection type is vacuous and is deleted too.

  5. 7e19130 — make the abort signal the single revocation authority
    isCurrent() reduced to !signal.aborted (the internal flag only flipped inside the abort
    listener), so call sites like rlm-runtime checked the same bit under two spellings. Delete
    isCurrent() everywhere; check signal.aborted. Revocation semantics change deliberately:
    a revoked context stays in the dispatcher WeakSet — it is still genuine, just no longer
    current. assertGenuineHostRequestContext now means only "minted by this dispatcher"; the
    factory wrapper rejects aborted contexts explicitly at dispatch ("host request authority was revoked" instead of the misleading "host request context is invalid" for replayed
    revoked contexts).

  6. a6a8f9d — drop migration-era wording from test names/comments ("staged", marker
    mechanics, "business-unit fixtures").

Fixes (one commit each, each with a regression test that fails on the base)

A. 06ae279rlm.delete_subagent ignored its authority context
Repro logic: open the delete comm, close it (revoking authority) while the async selector
listing is in flight → the child was still deleted; only the reply was suppressed.
Fix: deleteRlmSubagent(target, signal) threads the request signal through and re-asserts
authority immediately before each mutating delete (the factory wrapper already rejects an
aborted context at dispatch). Test: revoke mid-listing → child not deleted, still listed,
no reply sent.

B. 220fca4 — queued-run leak on pre-revoked spawn
Repro logic: the run entered _activeRlmChildRuns and emitChildUpdate() reached subscribers
before the abort listener attached and assertRequestCurrent() ran; a subscriber revoking in
reaction to the queued update made the assert throw outside any cleanup path, leaking the run
as "queued" forever (an abort listener attached to an already-aborted signal never fires).
Fix: attach the listener + assert immediately after registration and before the first emit;
route the early throw through the same cancel + deregister cleanup as the late path, and
remove the just-created child session dir like the neighbouring session-name failure path.
Tests: subscriber revokes on the queued update; revocation lands just before registration —
both reject the spawn, leave _activeRlmChildRuns empty, and leave no orphaned sub-* dir.

C. 75df2d8 — stale spawn handle for a cancelled child
Repro logic: after run.publication.promise resolves, admission re-checked only authority;
a concurrent _cancelRlmChildRun in that window still returned a "successful" handle.
Fix: the admission commit also throws when run.status === "cancelled".
Test: cancel between publication resolve and admission → spawn rejects, no run entry remains.

Validation

  • npx tsgo --noEmit clean at every commit.
  • biome check clean on all touched files.
  • Suites green (kernel/host-request/recursion/concurrent/bus/mcp discovery set):
    acp-kernel-features, agent-session-bus, agent-session-concurrent,
    agent-session-recursion, host-request-contract, kernel-abort,
    kernel-agent-message-skill, kernel-agent-observe-skill, kernel-attach-image-skill,
    kernel-bootstrap, kernel-fork-server, kernel-goal-skill, kernel-rlm-heartbeat-skill,
    kernel-startup, kernel-state-roundtrip, kernel-state-snapshot, mcp-manager
    224 passed, 15 skipped (skips are environment-gated kernel-python tests, skipped on base too).
  • Each fix's regression test was verified to fail with the fix reverted.

MERGE-ORDER NOTE

When this merges into core02-host-request-dispatcher and propagates up to
v080/core-split-c3-managed-catalog (PR #1333 and successors), the stacked
agent-messages.ts call sites still pass the deleted contextAwareHostRequestHandler
constant (import at line 3, call sites ~541/~614 on pr-1333-review). Resolution is a
trivial argument + import deletion; no behavioral conflict.


Note

High Risk
Changes span host-request revocation, RLM spawn/delete coordination, daemon registry tombstoning, session lease ownership, and close/archive ordering—core orchestration paths where races or partial failure could strand children or delete the wrong incarnation.

Overview
Host-request dispatcher now treats AbortSignal revocation as the only per-request authority: HostRequestContext drops requestId, generation, and isCurrent(), and createHostRequestHandler no longer needs the context-aware marker. Revoked requests fail with host request authority was revoked at dispatch. rlm.delete_subagent and rlm.run thread the signal through; spawn admission arms abort before the first queued update and rejects cancelled children after publication.

RLM subagent lifecycle is reworked around deletion durability (absent / tombstoned / unknown), RlmSubagentDeletionAuthority (generation + session incarnation fences), and _coordinateRlmSubagentDeletion so explicit deletes, compaction reapers, and quarantine retries cannot race or commit after revocation. Failed precommit releases land in private quarantine (hidden from listings); the daemon persists sessionId in the registry, validates rows strictly before destructive cleanup, tombstones before close, retries failed tombstoned closes with backoff, and hides terminalizing / quarantined sessions from public daemon APIs. Runtime teardown adds lease deferral to the daemon and dispose retry after one-shot failures.

Reviewed by Cursor Bugbot for commit 4e7bdf0. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Replace capability branding with AbortSignal-based revocation in the host-request dispatcher

  • Simplifies HostRequestContext to carry only an AbortSignal, removing requestId, generation, and isCurrent() from the interface and all call sites.
  • createHostRequestHandler now rejects dispatched requests whose signal is already aborted, throwing 'host request authority was revoked' without requiring an external context-aware marker.
  • AgentSession.deleteRlmSubagent and _startRlmChildRun now check the signal before and during admission, aborting spawns and deletions cleanly if authority is revoked mid-flight.
  • Provenance verification in assertHostRequestHandler is simplified to a WeakSet identity check, removing symbol-brand forgery concerns.
  • Behavioral Change: any code reusing a retained HostRequestContext after revocation will now receive 'host request authority was revoked' instead of a context-aware marker rejection.

Changes since #1357 opened

  • Added cancellation check before runtime creation, conditional parent transcript message publishing based on admission status, and recursive session directory cleanup for never-admitted cancelled children in AgentSession.rlm child spawn task [e83a5a2]
  • Reworked existing test for queued run cleanup on subscriber authority revocation and added new test for runtime disposal when spawn is revoked before admission [e83a5a2]
  • Modified AgentSession cleanup logic to conditionally delete never-admitted cancelled child artifact directories based on subagent runtime host presence [3110923]
  • Added and updated tests in AgentSession rlm recursion test suite to validate artifact directory cleanup behavior for revoked spawns [3110923]
  • Modified orphan directory removal condition for cancelled, never-admitted child runs in AgentSession [aa1908a]
  • Refactored test to validate dispose-only host directory cleanup behavior [aa1908a]
  • Modified AgentSession RLM child spawn task to track whether the host durably retained a cancelled child's artifacts and conditionally delete the child session directory based on this flag [2a26824]
  • Modified AgentDaemon.createSubagentRuntimeHost.releaseRlmSubagentRuntime handler to compute and return a retained flag for cancelled children and suppress exceptions on registry write failures [2a26824]
  • Changed SubagentRuntimeHost.releaseRlmSubagentRuntime interface method signature to return an object with a retained boolean property [2a26824]
  • Modified AgentDaemon.recordRlmSubagentDeletion utility to return a boolean indicating whether a durable deletion tombstone exists for the child [2a26824]
  • Updated test files to match the new releaseRlmSubagentRuntime return type and recordRlmSubagentDeletion boolean return, and added test coverage for durable retention scenarios [2a26824]
  • Introduced deletion durability type system and updated host interface contracts [8c97153]
  • Implemented quarantine mechanism for tracking cancelled child spawns with unproven deletion [8c97153]
  • Reworked child spawn cancellation and cleanup flow to distinguish deletion durability states [8c97153]
  • Implemented strict registry validation and durability-aware deletion recording in daemon host [8c97153]
  • Modified subagent listing and deletion operations to handle quarantined children [8c97153]
  • Updated test suites to validate deletion durability model and quarantine behavior [8c97153]
  • Modified AgentSession.deleteRlmSubagent and AgentSession._resolveRlmChildDeletionQuarantine to enforce deletion authority and durability guarantees before completing quarantined RLM subagent deletions [03ff589]
  • Added test infrastructure and test cases for RLM subagent deletion durability and authority revocation scenarios [03ff589]
  • Added test for discharging quarantined tombstone without removing retained artifact [7f504bc]
  • Introduced deletion coordinator with single-flight semantics and lease-based authority fencing for RLM subagent deletions [cefca6c]
  • Implemented authority-fenced daemon deletion with sessionId incarnation matching and legacy upgrade path [cefca6c]
  • Added typed deletion authority contract and phased error handling for host-request dispatcher [cefca6c]
  • Implemented authority-fenced deletion handlers in daemon subagent runtime host callbacks [cefca6c]
  • Extended session-level deletion methods with authority fencing and structured durability reporting [cefca6c]
  • Extended runtime host deletion methods with authority fencing and incarnation validation [cefca6c]
  • Updated test suite expectations and mocks for authority-fenced deletion contracts and durability reporting [cefca6c]
  • Refined authority validation in AgentDaemon.SubagentRuntimeHost.deleteRlmSubagentRuntime to require exact authority matching for passive RLM subagent deletions [43ca8dd]
  • Added quarantine tracking in AgentSession RLM subagent release finalizer for failed precommit deletions [43ca8dd]
  • Updated test expectations in agent-session-recursion and daemon-mode test files to reflect quarantine semantics and stricter authority validation [43ca8dd]
  • Detached tombstoned RLM subagent closes to asynchronous retry with exponential backoff [b0c206d]
  • Implemented quarantine detection and private session filtering across daemon operations [b0c206d]
  • Refactored disposal methods to deduplicate concurrent calls and enable retry after failures [b0c206d]
  • Fixed session map removal and cleanup order in close operations [b0c206d]
  • Added test coverage for disposal retry, tombstoned close detachment, and quarantine visibility [b0c206d]
  • Implemented session lease ownership coordination between AgentSessionRuntime and daemon with deferral mechanism [b01731e]
  • Modified AgentDaemon.closeSessionOnce to continue teardown despite cleanup failures and coordinate lease release with runtime [b01731e]
  • Added test coverage for session lease coordination and daemon close session behavior [b01731e]
  • Reordered session close sequence in AgentDaemon.closeSessionOnce to establish archive boundary before teardown, creating terminalizing records on archive failure [915faf9]
  • Extended FailedTombstonedRlmClose interface with terminalizing flag and optional fields for archive-failure session retention [915faf9]
  • Implemented shutdown-specific handling for terminalizing sessions in AgentDaemon.shutdown and AgentDaemon.closeTerminalizingSessionsForShutdown [915faf9]
  • Enhanced AgentDaemon.runTombstonedCloseAttempt to differentiate terminalizing records and honor original close reasons [915faf9]
  • Enforced privacy for terminalizing and failed tombstoned sessions across visibility and state resolution methods [915faf9]
  • Added pre-checks and helpers to detect and prevent operations on terminalizing sessions [915faf9]
  • Updated tests in daemon-mode.test.ts to validate terminalizing behavior, archive-failure retention, and shutdown sequences [915faf9]
  • Fixed tombstoned session close handling in AgentDaemon [4e7bdf0]
  • Added fake timer usage and timer count assertion to daemon shutdown test [4e7bdf0]
📊 Macroscope summarized 8c97153. 3 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted

🗂️ Filtered Issues

No issues evaluated.

snimu added 9 commits August 13, 2026 12:15
…o HostRequestHandler

The two exported names described the same binary (payload, context) shape;
keep the single public name and update the test fixtures that imported the
alias.
…RequestHandler

The options argument had exactly one legal value at all 17 call sites; the
factory + WeakSet is the provenance authority and the TypeScript signature
already forces the binary shape, so the marker was pure ceremony. Delete
HostRequestHandlerOptions, contextAwareHostRequestHandler, and the test that
only exercised the marker.
requestId and generation had zero production consumers (only tests echoed
them back); the abort signal is the only authority handlers act on. Also
delete the KernelManager generation counter that existed solely to feed
the deleted field.
The WeakSet is the real provenance check; the symbol was copyable (the old
test literally copied it) and rejected nothing the WeakSet did not already
reject. With the brand gone the capability intersection type is vacuous, so
the factory and assertion now speak plain HostRequestHandler.
…uthority

isCurrent() reduced to !signal.aborted (the internal flag only ever flipped
inside the abort listener), so callers ended up checking the same bit under
two spellings. Delete isCurrent() and check the signal everywhere.

A revoked context also stays registered in the dispatcher WeakSet: it is
still genuine, just no longer current. The factory wrapper now rejects
aborted contexts explicitly at dispatch, which is what the WeakSet removal
was previously (ab)used for.
…ation

The delete handler ignored its request context: a revoked request (comm
closed mid-flight) still deleted the child and only the reply was
suppressed. The handler now rejects an already-aborted context, and
deleteRlmSubagent threads the request signal through so authority is
re-checked after each async resolution step, immediately before the
mutating delete.

Regression test: revoke during the async selector listing; the child
survives, stays listed, and no reply is sent.
… update

The abort listener and the post-registration authority assert ran only
after the run had entered _activeRlmChildRuns and emitChildUpdate had
already reached subscribers. A subscriber that revoked authority in
reaction to that queued update (or a revocation landing in that window)
left the run entry queued forever: the throw at the old assert bypassed
every cleanup path.

The listener now attaches immediately after registration and before the
first emit, and an already-revoked authority is routed through the same
cancel + deregister cleanup as the late admission path, including
removing the just-created child session dir like the neighbouring
session-name failure path does.

Regression tests: a subscriber revoking on the queued update, and a
revocation landing just before registration, both reject the spawn and
leave _activeRlmChildRuns empty and no orphaned sub-* dir on disk.
…e commit

After run.publication.promise resolved, the admission commit re-checked
only request authority, not run.status. A _cancelRlmChildRun landing in
that window (e.g. a concurrent delete or parent abort) still handed the
caller a successful spawn handle for a child that would never run.

The commit now also throws when the run was cancelled, taking the same
revoke-and-cleanup path as a revoked authority.

Regression test: cancel the run between publication resolve and admission;
the spawn rejects and no run entry is left behind.

@jonaowen jonaowen left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The signal-only simplification is sound, but the pre-admission spawn fix is incomplete.

Revocation on/after the first queued update calls _cancelRlmChildRun, yet execution continues into detached _createRlmSubagentRuntime. Its cancellation catch can inject deliverTerminalMessageToParent even though admission never committed, and runtime disposal/deletion does not remove childSessionDir. The only new rmSync(childSessionDir) is in the earlier pre-emit catch. Thus a revoked, never-admitted request can mutate the parent transcript and leave a durable orphan sub-* artifact directory.

The queued-update regression asserts only the active-run map/list. Please gate absence of parent cancellation injection and removal of the artifact directory, including a runtime host that publishes/settles late after revocation. Also add exact coalesced-delete and late-publication cleanup ownership coverage so one revocation/current waiter cannot double-clean or inherit the wrong request's authority.

Follow-up to the queued-run leak fix, prompted by the #1357 review: making
the cancellation catch reachable for never-admitted spawns exposed three
latent gaps in that path.

- The detached task still created a full child runtime (potentially kernel
  startup) for an already-cancelled run; it now checks cancellation before
  awaiting runtime creation.
- The catch delivered a cancelled/failure notice into the parent transcript
  for a spawn whose caller already received the outcome as the admission
  exception; notices are now gated on committed admission. Admitted runs
  keep their notices.
- No cleanup path removed the child session dir; a never-admitted cancelled
  run now removes it after the dispose/release paths, so a late-created
  runtime is disposed before its dir is deleted.

Regression tests: the queued-update revocation test now also asserts no
runtime is created, no custom message lands in the parent transcript, and
no sub-* dir remains; a new variant publishes the child session after
revocation and asserts the same plus child disposal.
@snimu

snimu commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@jonaowen Verified all three findings and fixed them in e83a5a2 — thanks, the analysis was exactly right. For context: the notice/orphan-dir behavior is latent in #1243's cancellation catch (admitted-then-cancelled runs behave the same way there by design); our fix B exposed it by making the catch reachable for never-admitted spawns, so the never-admitted case now owns its full postcondition:

  • The detached task checks cancellation before _createRlmSubagentRuntime, so a revoked spawn no longer creates a runtime/kernel.
  • Terminal notices are gated on admissionCommitted: a never-admitted spawn already surfaced its outcome to the caller as the admission exception, so nothing is injected into the parent transcript. Admitted-run notices are unchanged (non-authority spawns commit admission synchronously, so internal/UI cancellations are untouched).
  • A never-admitted cancelled run removes its sub-* dir after the dispose/release paths, so a late-created runtime is disposed before its dir is deleted.

Tests: the queued-update regression now also asserts no runtime creation, no parent-transcript injection, and no orphan dir; a new variant publishes the child session late (after revocation) and asserts the same plus child disposal. Each assertion was verified to fail on the previous head (75df2d8). Src delta is +9/−1.

On the last paragraph (coalesced-delete and late-publication cleanup ownership coverage): the late-publication disposal path is now covered as above; broader double-clean/authority-inheritance coverage for the coalesced-delete path is deliberately not in this PR — that machinery predates it and is better owned by #1243 itself. Flagging it for @sethkarten.

Comment thread packages/coding-agent/src/core/agent-session.ts Outdated
…ed up

Cursor Bugbot flagged that the never-admitted rmSync ran unconditionally
after the release/delete hooks: when a runtime host had already created and
published the child before revocation, a daemon's release path records a
deleted registry entry whose sessionFile still points into the artifact
tree the rm then destroyed — violating the daemon contract that deletion
keeps the transcript and artifact tree on disk.

The rm is now gated on nothing durable referencing the dir: it fires only
when there is no runtime host at all, or the host never produced a runtime
or session. Any host-involved path — including a failed release hook, whose
retry state may still reference the dir — skips the rm and leaves
persistence to the host. A dir referenced by a deleted registry entry is
not an orphan; a dir nothing references still is, and is still removed.

Tests: the late-publication variant now uses a daemon-like host with a
release hook and asserts the dir survives and release is called with
"cancelled"; a new inline (no-host) variant asserts the dir is still
removed; the subscriber-revocation orphan assertions are unchanged.
Comment thread packages/coding-agent/src/core/agent-session.ts Outdated
snimu and others added 3 commits August 13, 2026 19:52
Second Cursor Bugbot finding: the round-4 gate keyed on host presence, but
the default in-process AgentSessionRuntime installs itself as every
session's host, so the no-host arm was effectively dead in real usage and
a spawn revoked after in-process runtime creation left an unreferenced
orphan dir again.

The discriminator is not whether a host exists but whether it persists.
The cleanup catch already branches on exactly that: only the release-hook
path records durable deletion (the daemon implements it; core writes no
registry, and AgentSessionRuntime's deleteRlmSubagentRuntime is
dispose-only). Gate the rm on releaseRlmSubagentRuntime presence instead.
The round-4 decision stands for a release hook that was present but
failed: retry state may still reference the dir, so it is kept.

Tests: the in-process variant now mirrors the dispose-only self-host shape
(no release hook) and asserts the dir is removed; the daemon-like release
hook variant keeps asserting survival.
Comment thread packages/coding-agent/src/modes/daemon/daemon-mode.ts Outdated
Comment thread packages/coding-agent/src/core/agent-session.ts Outdated
Comment thread packages/coding-agent/src/core/agent-session.ts Outdated
Comment thread packages/coding-agent/src/core/agent-session.ts
@sethkarten

Copy link
Copy Markdown
Contributor

Published append-only checkpoint 43ca8dd39be2b57f42c4a48d537e7adf99ab8470 after exact lease verification.

It adds exact passive-resident deletion authority and retains typed precommit release failures behind a private exact-incarnation retry lease. Exact typecheck, changed-file Biome, focused daemon/lifecycle tests, diff checks, and two initial exact-tip reviews passed before publication.

A later review then identified an additional public attach-snapshot visibility path for quarantined resident children. A local append-only correction exists and is being re-reviewed; it is not yet published. We also reproduced an independent deletion-latency gap: deleting a child stuck in a tool call can wait for physical teardown for several minutes rather than acknowledging durable logical deletion promptly.

Accordingly this PR is not ready. No merge performed.

@sethkarten

Copy link
Copy Markdown
Contributor

Core lifecycle checkpoint update (local, not yet pushed): bounded deletion now acknowledges after the durable tombstone, keeps cleanup-pending state private, retries the full close pipeline, and passes strict typecheck plus focused lifecycle/privacy coverage. Fresh review found a directly related unscoped cron-cancel privacy path; the minimal guard/regression is being finalized. Unrelated pre-existing/environment-only failures are explicitly deferred. The destructive checkpoint will be fast-forward published only after two fresh exact-tip reviews pass.

Comment thread packages/coding-agent/src/modes/daemon/daemon-mode.ts
Comment thread packages/coding-agent/src/modes/daemon/daemon-mode.ts
Comment thread packages/coding-agent/src/core/agent-session-runtime.ts
Comment thread packages/coding-agent/src/modes/daemon/daemon-mode.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 915faf9. Configure here.

Comment thread packages/coding-agent/src/modes/daemon/daemon-mode.ts
return { deletionDurability };
}
if (deletionDurability === "absent") authority?.assertCurrent();
if (state) await this.closeSession(state, "killed", false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High daemon/daemon-mode.ts:2574

deleteRlmSubagentRuntime leaves a supplied session running when no resident state exists: it tombstones the registry entry but only closes the session inside the if (state) branch. This passive/stale-runtime path no longer disposes the supplied session, so its resources and background work leak; restore the session?.disposeAsync() fallback.

-\t\t\t\t\t\tif (state) await this.closeSession(state, "killed", false);\n+\t\t\t\t\t\tif (state) {\n+\t\t\t\t\t\t\tawait this.closeSession(state, "killed", false);\n+\t\t\t\t\t\t} else {\n+\t\t\t\t\t\t\tawait session?.disposeAsync();\n+\t\t\t\t\t\t}
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @packages/coding-agent/src/modes/daemon/daemon-mode.ts around line 2574:

`deleteRlmSubagentRuntime` leaves a supplied `session` running when no resident `state` exists: it tombstones the registry entry but only closes the session inside the `if (state)` branch. This passive/stale-runtime path no longer disposes the supplied session, so its resources and background work leak; restore the `session?.disposeAsync()` fallback.

Evidence trail:
packages/coding-agent/src/modes/daemon/daemon-mode.ts:2515-2582 @ 4e7bdf04e0f3f07d608b9b8ec00edd9b33b62d31; packages/coding-agent/src/core/agent-session.ts:9742-9757 @ 4e7bdf04e0f3f07d608b9b8ec00edd9b33b62d31; packages/coding-agent/src/core/agent-session.ts:9622-9634 @ 4e7bdf04e0f3f07d608b9b8ec00edd9b33b62d31; git diff MERGE_BASE REVIEWED_COMMIT -- packages/coding-agent/src/modes/daemon/daemon-mode.ts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants