Allow hooks to spawn Monitor or invoke tools directly
Feature Request: Allow hooks to spawn Monitor (or invoke tools)
Problem
Today, hooks can only output text that becomes system reminders. If a hook detects a meaningful event (e.g. git push to a branch with an open PR), the only way to start background monitoring is through an indirect pipeline:
- Hook outputs a reminder
- Claude reads the reminder
- Claude invokes a skill
- The skill tells Claude to call Monitor
This works but has friction: it depends on Claude interpreting the reminder correctly every time, it consumes context window, and the user has no guarantee the Monitor actually starts.
Proposed Solution
Allow hooks to return a structured response that directly spawns a Monitor (or more generally, invokes a tool). For example, a PostToolUse hook could return:
{
"tools": [
{
"name": "Monitor",
"input": {
"command": "bash ~/.claude/skills/watch-pr-checks/scripts/poll-checks.sh 123",
"description": "PR #123 CI checks",
"persistent": true,
"timeout_ms": 3600000
}
}
]
}
Use Case
I built a watch-pr-checks skill that monitors GitHub CI checks for the current PR via Monitor. A PostToolUse hook detects git push and gh pr create and should automatically start the monitor. Today the hook can only suggest that Claude start the monitor; it can't guarantee it.
This pattern generalizes: any hook that wants to start a background watcher, trigger a build, or kick off a long-running process after detecting a specific event would benefit from direct tool invocation.
Alternatives Considered
- Hook reminder → Skill → Monitor: Current approach. Works but is indirect and fragile.
- Hook starts a background process directly: The process runs outside Claude's context, so Monitor notifications don't reach the conversation.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗