Update README Claude Code Hooks section - #25
Conversation
…ooks Replace the simplified single-hook example with the full hooks configuration from the plugin.json file, including SessionStart, SessionEnd, Stop, and UserPromptSubmit hooks. Update documentation to explain each hook's purpose.
📝 WalkthroughWalkthroughRestructures README.md Claude Code Hooks docs: replaces a single user-prompt-submit hook with four event-based hooks (SessionStart, SessionEnd, Stop, UserPromptSubmit), adds a Hook Mode Behavior table, and updates the "How It Works" content to reflect per-event agentmail commands. Changes
Sequence Diagram(s)sequenceDiagram
actor Claude
participant Hooks as Hooks Config
participant AgentMail as agentmail
Claude->>Hooks: SessionStart event
Hooks->>AgentMail: run "onboarding" command
Claude->>Hooks: UserPromptSubmit event
Hooks->>AgentMail: run "status work" command
Claude->>Hooks: Stop event
Hooks->>AgentMail: run "receive hook" command
Claude->>Hooks: SessionEnd event
Hooks->>AgentMail: run "offline" command
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2026-01-14T17:53:44.830ZApplied to files:
📚 Learning: 2026-01-14T17:53:44.830ZApplied to files:
🔇 Additional comments (2)
✏️ Tip: You can disable this entire section by setting Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 450-493: The hook entries for SessionStart, SessionEnd, Stop, and
UserPromptSubmit include an unnecessary "matcher" field set to an empty string;
remove the "matcher" property from each of these event objects so the entries
match the documented matcher-less format (i.e., keep the event arrays and their
inner "hooks" arrays with the "type" and "command" entries, but delete the
"matcher" key from the objects for SessionStart, SessionEnd, Stop, and
UserPromptSubmit).
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
README.md
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-01-14T17:53:44.830Z
Learnt from: CR
Repo: UserAd/AgentMail PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-14T17:53:44.830Z
Learning: Must be running inside a tmux session to use agentmail
Applied to files:
README.md
📚 Learning: 2026-01-14T17:53:44.830Z
Learnt from: CR
Repo: UserAd/AgentMail PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-14T17:53:44.830Z
Learning: Use agentmail send <recipient> "<message>" where recipient is a valid tmux window name
Applied to files:
README.md
🔇 Additional comments (3)
README.md (3)
500-505: LGTM! Hook descriptions accurately match the commands.The table clearly explains the purpose of each hook, and each description correctly corresponds to its respective command in the JSON configuration.
507-514: LGTM! Hook mode behavior is consistent with command documentation.The table accurately reflects the exit codes and behavior documented in the
receivecommand section (lines 158-160).
520-528: LGTM! Clear clarification of when mail notifications appear.The addition of "(on Stop hook)" helps users understand the timing of mail notifications, which aligns with the Stop hook's
agentmail receive --hookcommand.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Remove empty "matcher" properties from SessionStart, SessionEnd, Stop, and UserPromptSubmit hook entries to match the documented matcher-less format.
…ooks
Replace the simplified single-hook example with the full hooks configuration from the plugin.json file, including SessionStart, SessionEnd, Stop, and UserPromptSubmit hooks. Update documentation to explain each hook's purpose.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.