Skip to content

Commit 3e2c6ea

Browse files
committed
Replay plan approvals across hook tool IDs
1 parent 61debbb commit 3e2c6ea

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

server/historyLifecycle.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ describe("stdout immediacy", () => {
302302
const payload = {
303303
...hookEvent,
304304
hook_event_name: "PermissionRequest",
305+
tool_use_id: "tool-replay-permission",
305306
tool_input: { plan: "Replay plan" },
306307
};
307308
child.stdin.write(`${JSON.stringify(payload)}\n`);

server/runtime/decisionCache.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
44
import { join } from "node:path";
55
import type { HookEvent, ServerDecision } from "../types.ts";
66

7-
const CACHE_TTL_MS = 10 * 60 * 1000;
7+
const CACHE_TTL_MS = 2 * 60 * 1000;
88
const CACHE_DIR = join(tmpdir(), "open-plan-annotator-decisions");
99

1010
interface CachedDecision {
@@ -19,7 +19,6 @@ function cachePathForHookEvent(hookEvent: HookEvent): string {
1919
transcriptPath: hookEvent.transcript_path,
2020
cwd: hookEvent.cwd,
2121
toolName: hookEvent.tool_name,
22-
toolUseId: hookEvent.tool_use_id,
2322
});
2423
const digest = createHash("sha256").update(key).digest("hex");
2524
return join(CACHE_DIR, `${digest}.json`);

0 commit comments

Comments
 (0)