fix(coding-agent): align computer session ownership

This commit is contained in:
usr-bin-roygbiv
2026-07-24 00:16:39 +00:00
parent 57f8acdd18
commit 4fe03e25cb
2 changed files with 9 additions and 1 deletions
@@ -3516,7 +3516,7 @@ export class AgentSession {
this.#disposeOwnedAsyncJobs(),
this.#eval.disposeKernels(),
this.#releaseOwnedBrowserTabs(this.sessionManager.getSessionId()),
this.#releaseOwnedComputerSessions(this.#evalKernelOwnerId),
this.#releaseOwnedComputerSessions(this.#eval.getKernelOwnerId()),
shutdownTinyTitleClient(),
this.#disconnectOwnedMcp(),
advisorRecorderClosed,
@@ -4135,6 +4135,9 @@ export class AgentSession {
getEvalSessionId(): string | null {
return this.#eval.getSessionId();
}
getEvalKernelOwnerId(): string {
return this.#eval.getKernelOwnerId();
}
/** Current session display name, if set */
get sessionName(): string | undefined {
@@ -145,6 +145,11 @@ export class EvalRunner {
return this.#pendingMessages.length > 0;
}
/** Returns the stable owner shared by eval and session-owned tools. */
getKernelOwnerId(): string {
return this.#kernelOwnerId;
}
/** Returns the eval session shared with the Python backend. */
getSessionId(): string | null {
if (this.#parentSessionId !== undefined) return this.#parentSessionId;