Feature: add 'silent' option for async hooks to suppress status messages

Resolved 💬 3 comments Opened Mar 10, 2026 by ehartye Closed Mar 14, 2026

Feature Request

Add a "silent": true option to async hook definitions that suppresses the status line messages (e.g., "SessionStart:resume hook success: Success") when the hook completes.

Use Case

The agent-stalker plugin is an observability tool that passively tracks Claude Code agent activity (sessions, tool use, task lifecycle, inter-agent messaging). It registers 11 async hooks across all major event types (SessionStart, SessionEnd, PreToolUse, PostToolUse, PostToolUseFailure, SubagentStart, SubagentStop, Stop, TeammateIdle, TaskCompleted, UserPromptSubmit).

These hooks are purely passive telemetry — they ingest events into a SQLite database for later viewing in a dashboard. They produce no output that needs to be surfaced to the user or model. However, every async hook completion generates a status line message, which creates significant visual noise during agent work, especially when tool calls are firing rapidly.

Current Behavior

Every async hook completion shows a status message like:

SessionStart:resume hook success: Success
PreToolUse hook success: Success
PostToolUse hook success: Success

This is useful for hooks that need to communicate results, but counterproductive for background telemetry that should be invisible.

Proposed Solution

Add a "silent": true flag to the hook definition schema:

{
  "type": "command",
  "command": "bun \"${CLAUDE_PLUGIN_ROOT}/hooks/tracker.ts\"",
  "async": true,
  "silent": true,
  "timeout": 10
}

When silent is true, suppress the status line message on successful completion. Errors should probably still surface.

Why Not Sync?

Making the hooks synchronous would eliminate the status messages but would block Claude's execution on every tool call while the tracker reads stdin, parses JSON, opens SQLite, and writes — adding ~50-200ms of latency per hook fire. Async is the correct choice for passive telemetry; the missing piece is the ability to be quiet about it.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗