From 945cd0b2efb289736f77af7778048118e012fd76 Mon Sep 17 00:00:00 2001 From: wenshao Date: Thu, 30 Jul 2026 22:32:54 +0800 Subject: [PATCH] fix(serve): restore build by routing side-task rollback through the workspace session service The side-task creation route still constructed a session service directly on two rollback paths after the surrounding module moved to the workspace runtime helper, leaving the identifier unbound and breaking the CLI build on main. Route both rollbacks through the workspace runtime helper so they honour the per-workspace runtime base dir like every other session-service use in this module. Co-Authored-By: Claude Opus 5 (1M context) --- packages/cli/src/serve/routes/session.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/serve/routes/session.ts b/packages/cli/src/serve/routes/session.ts index 17c676bee45..4093077773a 100644 --- a/packages/cli/src/serve/routes/session.ts +++ b/packages/cli/src/serve/routes/session.ts @@ -2324,7 +2324,7 @@ export function registerSessionRoutes( .killSession(result.sessionId, { requireZeroAttaches: true }) .catch(() => false); if (killed) { - await new SessionService(runtime.workspaceCwd) + await createWorkspaceRuntimeSessionService(runtime) .removeSession(result.sessionId) .catch(() => {}); } @@ -2341,9 +2341,9 @@ export function registerSessionRoutes( .killSession(result.sessionId, { requireZeroAttaches: true }) .then((killed) => { if (!killed) return undefined; - return new SessionService(runtime.workspaceCwd!).removeSession( - result.sessionId, - ); + return createWorkspaceRuntimeSessionService( + runtime, + ).removeSession(result.sessionId); }) .catch(() => {}); } else {