From a6f6d8b0673bf4eee6e70ce05514d9fd87e1dc77 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 19 Feb 2026 19:55:54 -0800 Subject: [PATCH] Use absolute path for sandlot-activity binary in Claude hooks --- src/vm.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vm.ts b/src/vm.ts index 6708369..d863f29 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -67,9 +67,10 @@ export async function create(log?: (msg: string) => void): Promise { log?.("Warning: ANTHROPIC_API_KEY not found in ~/.env — claude will require manual login") } + const activityBin = `/home/${USER}/.local/bin/sandlot-activity` const hooks = { - UserPromptSubmit: [{ hooks: [{ type: "command", command: "sandlot-activity active" }] }], - Stop: [{ hooks: [{ type: "command", command: "sandlot-activity idle" }] }], + UserPromptSubmit: [{ hooks: [{ type: "command", command: `${activityBin} active` }] }], + Stop: [{ hooks: [{ type: "command", command: `${activityBin} idle` }] }], } const settingsJson = JSON.stringify(apiKey ? { apiKeyHelper: "~/.claude/api-key-helper.sh", skipDangerousModePermissionPrompt: true, hooks }