diff --git a/crates/goose/src/hooks/mod.rs b/crates/goose/src/hooks/mod.rs index c333e9a4c..d85668038 100644 --- a/crates/goose/src/hooks/mod.rs +++ b/crates/goose/src/hooks/mod.rs @@ -59,8 +59,6 @@ pub enum HookEvent { BeforeShellExecution, AfterShellExecution, Stop, - SubagentStart, - SubagentStop, } impl HookEvent { @@ -77,8 +75,6 @@ impl HookEvent { HookEvent::BeforeShellExecution => "BeforeShellExecution", HookEvent::AfterShellExecution => "AfterShellExecution", HookEvent::Stop => "Stop", - HookEvent::SubagentStart => "SubagentStart", - HookEvent::SubagentStop => "SubagentStop", } } @@ -95,8 +91,6 @@ impl HookEvent { "BeforeShellExecution" => HookEvent::BeforeShellExecution, "AfterShellExecution" => HookEvent::AfterShellExecution, "Stop" => HookEvent::Stop, - "SubagentStart" => HookEvent::SubagentStart, - "SubagentStop" => HookEvent::SubagentStop, _ => return None, }) } diff --git a/documentation/docs/guides/context-engineering/hooks.md b/documentation/docs/guides/context-engineering/hooks.md index baf0d3d96..cb17b9466 100644 --- a/documentation/docs/guides/context-engineering/hooks.md +++ b/documentation/docs/guides/context-engineering/hooks.md @@ -318,6 +318,7 @@ Check the following: - The command path is correct. Use `${PLUGIN_ROOT}` for scripts inside the plugin. - The script is executable if you call it directly. - The plugin is not listed in `disabledPlugins`. +- The event is not a subagent lifecycle event. `SubagentStart` and `SubagentStop` are not currently emitted by goose, so hooks registered for them will never run. ### My Hook Timed Out or Failed