7 min readPost 6
Thirty agents: hooks, plugins, or rule files plus MCP
AI coding agents expose wildly different extension points: shell hooks, in-process TypeScript or Python plugins, or only rule files and MCP. Here is how we scaled Obituary from two agents to 30 in a day without duplicating safety logic, why the delete guard has the strictest eligibility bar, and how our capability table reports every host limit honestly.

On this page
To give scratch files a countdown and stop accidental rm -rf calls before they execute, Obituary has to sit inside an AI coding agent's tool-calling loop. When we only supported Claude Code and Codex, two custom entrypoints were manageable. Developers, however, spread across dozens of IDE agents, terminal harnesses, and regional coding assistants—each with its own event schema, config layout, and extension model.
Duplicating deletion-safety code thirty times would have turned our safety guarantees into thirty diverging forks. On the afternoon of 9 November we refactored the integration layer into a single adapter registry, wired 29 agents by evening, and completed 30 agents the next morning:
17 connect via native command hooks, 9 via thin in-process plugins, and 4 via rule files plus MCP. The capability matrix in our documentation is generated straight from code via obit init --show --format markdown, so docs never drift from reality.
Three integration tiers: host entrypoints set the ceiling
What Obituary can automate inside a given agent depends strictly on what extension points that host provides:
| Tier | Agents | Host entrypoint | What Obituary installs |
|---|---|---|---|
| Native hook | 17 | Spawns a command before/after tool calls with event JSON on stdin | obit hook <agent> |
| Thin plugin | 9 | In-process TypeScript or Python plugin, no CLI hook | Minimal shim translating host events into versioned JSON for obit hook <agent> |
| Rules + MCP | 4 | No interceptable lifecycle hook; reads rule files and MCP | Usage rules in the host's rule file plus Obituary's MCP server |
Native hooks (17 agents)
Claude Code, Codex, GitHub Copilot, Cursor, Gemini CLI, and Factory Droid all spawn obit hook <agent> per tool event. Because every event pays a process launch, this path stays minimal.
Thin plugins (9 agents)
OpenCode, Pi, OpenClaw, and Hermes extend via in-process TypeScript or Python plugins. Rather than reimplementing safety rules in another runtime, each plugin only normalizes host events into our v1 JSON protocol and invokes the exact same obit hook <agent> binary.
Rule files plus MCP (4 agents)
Roo Code, Windsurf, WorkBuddy, and QoderWork currently integrate only through rule files and MCP. Obituary writes guidance into their rule files and registers its MCP tools, leaving the agent to call obit mark and obit bury voluntarily.
Those four agents get neither automatic post-write registration nor delete-guard interception—and the capability table says so plainly.

Thirty hosts, one Handle function
Safety decisions never get copied per agent. Inside the adapter registry, every host adapter performs exactly three jobs:
- Decode the host's raw payload into a unified internal event.
- Encode the unified response back into the host's protocol.
- Return a neutral, non-disruptive response if input decoding fails.
All business logic lives in a single Handle function. The CLI generates obit hook <agent> subcommands directly from the registry, enforces a 4 MiB stdin cap, and strips UTF-8 BOMs before decoding.
Structure first, zero behavior drift
The registry skeleton landed first as a pure structural refactor. Before and after the change, Claude Code and Codex produced the exact same 2,522 test results, with the body of Handle identical byte for byte.
Pre-refactor inspection also fixed a scaling hazard: the old entrypoint opened configuration before inspecting the event type, meaning every added host would have triggered disk config reads on every ordinary shell command. Decoding into a unified event first keeps PreToolUse off the ledger, off git, and off the network.
Four protocol rules for thin plugins
All nine plugin-based hosts obey version 1 of our plugin contract:
- File paths may come only from official host tool arguments or explicit success receipts, never scraped from free-form assistant prose.
- Shell commands must carry trustworthy evidence of which shell executes them.
- Session IDs are namespaced by agent name to prevent cross-host collisions.
- Responses permit only denial and context text—there are no "allow" or "rewritten command" fields, enforcing our deny-never-rewrite rule at the protocol boundary.
Reporting every limit honestly: why the delete guard is strictest
Two hosts firing the "same" lifecycle event rarely supply the same metadata. Obituary grades each host across post-write tracking, session notices, delete guard, MCP, and Skill as supported, limited, or unsupported, always accompanied by a concrete reason.
The delete guard enforces the strictest gate: if a host cannot tell us whether a command runs in Bash or PowerShell, Obituary refuses to install it.
The same rm -rf parses differently across shells; guessing wrong either misses real deletions or suggests a broken equivalent:
- Claude Code splits Bash and PowerShell into separate tools, so tool name alone identifies the shell cleanly.
- Codex 0.167 on native Windows reported every shell call as Bash regardless of the actual shell. We added per-agent
[agent_shells]configuration inferred duringobit init --guard-rmand editable by the user; declared shells are parsed and guarded, undeclared ones pass through. CodeBuddy and MiniMax Code use the same mechanism, while remote executions are never intercepted. - Gemini CLI (
run_shell_command) and Factory Droid (Execute) do not expose shell identity at all, so the capability table marks them unsupported and the installer installs no pre-execution hook.

When a host cannot carry text back: at-least-once delivery
Adding more hosts exposed a second mismatch: Antigravity, Hermes, and Kilo Code write callbacks—plus Cursor's async session start—can notify Obituary that a file changed, yet provide no channel to return text back to the agent during that callback.
Our first reaction was skipping those callbacks completely, which quietly dropped file observations too.
We changed the handler to process registration, observation, and snapshots normally while leaving pending proposals unmarked as notified. The next context-capable event in that same session delivers the queued notice and marks it sent. Delivery is at-least-once: we would rather repeat a reminder than drop a file observation.
Never guess opaque config paths
Where a host's public documentation leaves global config paths ambiguous (such as Trae's global MCP file or Roo's settings directory), obit init never gambles on writing to a guessed path. It prints exact manual instructions and reports "manual step required"—neither throwing a false failure nor pretending installation finished.
That evening we also surveyed over twenty Chinese coding agents and integrated CodeBuddy, WorkBuddy, Qoder (including its China edition), Lingma, MiniMax Code, DeepSeek Harness, and ZCode the next morning. Discontinued or tiny tools were skipped; their users can still wire up Obituary's MCP server manually. Every integrated agent ships with real protocol fixture tests exercised across the full registry on every CLI acceptance pass.