diff --git a/src/commands/new.ts b/src/commands/new.ts index 59f1d2c..ff60a2f 100644 --- a/src/commands/new.ts +++ b/src/commands/new.ts @@ -137,5 +137,7 @@ export async function action( await vm.claude(worktreeAbs, { prompt, print: opts.print }) } + await vm.clearActivity(worktreeAbs, branch) + if (opts.save !== false) await saveChanges(worktreeAbs, branch) } diff --git a/src/commands/open.ts b/src/commands/open.ts index fa8cb5f..81bf8e3 100644 --- a/src/commands/open.ts +++ b/src/commands/open.ts @@ -33,5 +33,7 @@ export async function action( await vm.claude(session.worktree, { prompt, print: opts.print, continue: true }) } + await vm.clearActivity(session.worktree, branch) + if (opts.save !== false) await saveChanges(session.worktree, branch) } diff --git a/src/vm.ts b/src/vm.ts index 36eaf69..8d3201c 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -155,6 +155,7 @@ async function configureEnvironment(home: string, apiKey: string): Promise const hooks = { UserPromptSubmit: [{ hooks: [{ type: "command", command: `${activityBin} active` }] }], Stop: [{ hooks: [{ type: "command", command: `${activityBin} idle` }] }], + PostToolUseFailure: [{ hooks: [{ type: "command", command: `${activityBin} idle` }] }], } const settingsJson = JSON.stringify({ apiKeyHelper: "~/.claude/api-key-helper.sh", skipDangerousModePermissionPrompt: true, hooks }) const claudeJson = JSON.stringify({ hasCompletedOnboarding: true, effortCalloutDismissed: true, projects: { "/": { hasTrustDialogAccepted: true } } })