The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(hooks): count subagentStop among the events nothing fires\n\n`is_wired()` is only load-bearing if the written inventory agrees with it.\nBoth AGENTS.md and the hooks guide still said four events are defined but\nunfired and named only `sessionStart`, `sessionEnd`, `preCompact` and\n`afterAgentThought`, so anyone auditing the list would have gone on\nbelieving `subagentStop` fires.\n\nSay five, name it, and say why it is the near miss: the handler is\ncomplete, only the call in `subagent_runner` is missing. The events table\ncarried the same claim implicitly, so mark that row too.\n
Nguyen Thanh Dat021adad1190d
diff --git a/AGENTS.md b/AGENTS.mdindex 2f53f92da3..faf956d79e 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -121,9 +121,9 @@ The `[autonomy]` block (`src/openhuman/config/schema/autonomy.rs`) drives `SecurFour things to know before touching that domain:-- **It mounts on the existing seams, not new call sites.** `hooks::bridge` registers itself as an embedder `ToolHook` + `PostTurnHook`. Only the moments with no seam at all (`beforeSubmitPrompt`, `subagentStart`/`Stop`) get their own call site, in `hooks::ops`.+- **It mounts on the existing seams, not new call sites.** `hooks::bridge` registers itself as an embedder `ToolHook` + `PostTurnHook`. Only the moments with no seam at all (`beforeSubmitPrompt`, `subagentStart`/`Stop`) get their own entry point, in `hooks::ops` — and of those, `subagent_stopped` is still waiting for a caller (see `is_wired()` below).- **Shell/file/MCP events are derived from tool calls.** OpenHuman has no separate shell-execution call site — `beforeShellExecution` is the `shell` tool going through the tool seam, reshaped into a Cursor-shaped payload. Both the generic and the specialised event fire, generic first. `SHELL_TOOLS`/`READ_TOOLS`/`WRITE_TOOLS` in `bridge.rs` are the mapping; extend those rather than adding a call site.-- **`HookEvent::is_wired()` is load-bearing honesty.** Four events (`sessionStart`, `sessionEnd`, `preCompact`, `afterAgentThought`) are fully defined but have no call site yet. The loader warns when one is configured and `hooks.list` reports `wired: false`. Flip the flag when the call site lands — never optimistically.+- **`HookEvent::is_wired()` is load-bearing honesty.** Five events (`sessionStart`, `sessionEnd`, `preCompact`, `afterAgentThought`, `subagentStop`) are fully defined but have no call site yet — `hooks::ops::subagent_stopped` is written and complete, but `subagent_runner` fires only the start side, so nothing reaches the stop one. The loader warns when one is configured and `hooks.list` reports `wired: false`. Flip the flag when the call site lands — never optimistically.- **Strictest verdict wins, and layers concatenate.** Four `hooks.json` layers merge by appending, and `HookOutput::merge` folds deny over ask over allow, so a project file can never loosen an operator's rule. Do not "fix" the layering into an override model.Gating events run sequentially in the turn's path; observational ones are spawned and never block it (`HookEvent::is_gating` is the single place that split lives). With nothing configured the bridge is not installed, so an unconfigured host pays nothing per tool call.diff --git a/gitbooks/developing/hooks.md b/gitbooks/developing/hooks.mdindex 8c772d51ce..dacccd3dbd 100644--- a/gitbooks/developing/hooks.md+++ b/gitbooks/developing/hooks.md@@ -125,15 +125,18 @@ event, and Claude Code's `UserPromptSubmit` aliases onto `beforeSubmitPrompt`.| `beforeMCPExecution` / `afterMCPExecution` | around an MCP tool | `permission` || `beforeSubmitPrompt` | on a chat message, before the model | `continue`, `permission`, `additional_context` || `subagentStart` | before a delegation | `permission` |-| `subagentStop` | after one | `followup_message` |+| `subagentStop` | after one — not fired yet, see below | `followup_message` || `stop` | after a turn | `followup_message` || `afterAgentResponse` | on the assistant's message | — |-`sessionStart`, `sessionEnd`, `preCompact` and `afterAgentThought` are defined —-they parse, match, execute, and can be exercised with `hooks test` — but the core-does not fire them yet. Configuring one produces a load warning saying so, and-`hooks list` reports `"wired": false` for it. That is deliberate: a hook that-silently never runs is the worst thing this system can do to you.+`sessionStart`, `sessionEnd`, `preCompact`, `afterAgentThought` and `subagentStop`+are defined — they parse, match, execute, and can be exercised with `hooks test` —+but the core does not fire them yet. (`subagentStop` is the near miss: the handler+`hooks::ops::subagent_stopped` is complete, but `subagent_runner` fires only+`subagentStart` and returns without ever calling the stop side.) Configuring one+produces a load warning saying so, and `hooks list` reports `"wired": false` for+it. That is deliberate: a hook that silently never runs is the worst thing this+system can do to you.### Derived events