## Lesson — When a tool invokes itself via a hook, pass a specific flag

**Tags:** cli, telemetry, architecture

When a tool invokes itself via a hook, pass a specific flag or environment variable to distinguish the automated run from a manual one. This allows the handler to adjust logging, telemetry, or ledger recording for the background context.
