diff --git a/extensions/coven/src/runtime.test.ts b/extensions/coven/src/runtime.test.ts index 98ef3832169..6f457e13f8d 100644 --- a/extensions/coven/src/runtime.test.ts +++ b/extensions/coven/src/runtime.test.ts @@ -347,11 +347,14 @@ describe("CovenAcpRuntime", () => { mode: "oneshot", cwd: workspaceDir, }); - handle.runtimeSessionName = __testing.encodeRuntimeSessionName({ - agent: "codex", - mode: "prompt", - cwd: "/tmp/attacker", - }); + handle.runtimeSessionName = `coven:${Buffer.from( + JSON.stringify({ + agent: "codex", + mode: "prompt", + cwd: "/tmp/attacker", + }), + "utf8", + ).toString("base64url")}`; await collect( runtime.runTurn({ @@ -611,7 +614,6 @@ describe("CovenAcpRuntime", () => { agent: "A".repeat(5_000), mode: "prompt".repeat(1_000), sessionMode: "persistent".repeat(1_000), - cwd: "/workspace/".repeat(1_000), }); expect(Buffer.byteLength(encoded, "utf8")).toBeLessThanOrEqual("coven:".length + 2_048); diff --git a/extensions/coven/src/runtime.ts b/extensions/coven/src/runtime.ts index d019bef8912..e3eec76fc04 100644 --- a/extensions/coven/src/runtime.ts +++ b/extensions/coven/src/runtime.ts @@ -51,7 +51,6 @@ type CovenRuntimeSessionState = { agent: string; mode: string; sessionMode?: string; - cwd?: string; }; type CovenAcpRuntimeParams = { @@ -109,7 +108,6 @@ function decodeRuntimeSessionName(value: string): CovenRuntimeSessionState | nul agent, mode: typeof parsed.mode === "string" ? parsed.mode : "prompt", ...(typeof parsed.sessionMode === "string" ? { sessionMode: parsed.sessionMode } : {}), - ...(typeof parsed.cwd === "string" && parsed.cwd.trim() ? { cwd: parsed.cwd.trim() } : {}), }; } catch { return null;