<aside> 🦥
Automate workflows with hooks – Claude Code Docs
</aside>
<aside> 🦥
An automation is an agent that runs without you asking. It fires on a schedule or when something happens. This is what turns a one-time tool into an always-on system: run a research task once = a report; schedule it weekly = ongoing intelligence.
</aside>
<aside> 🦥
<aside> 🦥
In coding agents like Claude Code, hooks run your own code at key moments in the agent's lifecycle:
Hooks make behavior deterministic where you need it, no praying the prompt works.
</aside>
<aside> 🦥
The 2026 move is cloud-hosted scheduled agents (Claude Code routines, Trigger.dev, Dust triggers, etc.). A trigger fires → a fresh agent spins up in the cloud → does the job → shuts down. Your laptop doesn't even need to be on.
The full loop: event happens (or schedule hits) → agent runs with context → agent writes back the result.
</aside>
<aside> 🦥
A cron job runs the exact same script every time. An automated agent can reason, adapt, and handle messy real-world input on each run, then decide what to do next. Same trigger, way smarter middle. 🦥
</aside>