From 0ef94cdbc1b49af82f48ca4c7eec3eb0d73ae091 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Mon, 27 Apr 2026 21:13:14 +0300 Subject: fix: improve claude subagent hook lifecycle fixes #58 --- INTEGRATIONS.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'INTEGRATIONS.md') diff --git a/INTEGRATIONS.md b/INTEGRATIONS.md index b25c0ab8..2489f619 100644 --- a/INTEGRATIONS.md +++ b/INTEGRATIONS.md @@ -91,14 +91,17 @@ current hook mapping: - `UserPromptSubmit` → `working` - `PreToolUse` → `working` - `PermissionRequest` → `blocked` +- `PostToolUse` → `working` +- `PostToolUseFailure` → `working` +- `SubagentStop` → `working` - `Stop` → `idle` - `SessionEnd` → `release` notes: -- claude's current hook surface improves state reporting, but it is not a perfect permission lifecycle. -- when a permission prompt is canceled, claude does not currently give herdr a clean hook event that always resolves the pane out of `blocked` immediately. -- that is acceptable in herdr's model: process detection still owns liveness, and heuristics remain the fallback for unresolved edges. +- claude code hooks also run inside subagents. herdr treats subagent `working` and `blocked` reports as real pane state. +- subagent stop/release events are converted to `working` by the bundled hook script so a completed subagent does not make the parent claude pane look idle. +- `PostToolUse` and `PostToolUseFailure` move the pane back to `working` after a permissioned tool call resolves. uninstall: -- cgit v1.2.3