Context Course documentation
Quiz 1: Hook Fundamentals
0. Welcome to the Context Course
1. Skills: Portable Knowledge for Code Agents
2. MCP: The Model Context Protocol
3. Plugins: Bundling Tools for Distribution
4. Subagents: Orchestrating Multi-Agent Workflows
5. Hooks: Observing and Guarding the Agent Lifecycle
Unit 5: HooksHook Events and the Agent LifecycleQuiz 1: Hook FundamentalsHands-On: Agent Activity Dashboard with GradioQuiz 2: Hooks in Practice
6. Bonus: Nano Harness — Build Your Own Agent
Quiz 1: Hook Fundamentals
Test your understanding of hooks, the events they cover, and how they differ across Claude Code, Codex, OpenCode, and Pi.
Question 1: What is a hook?
Question 2: How do hook surfaces differ across platforms?
Question 3: Which lifecycle events matter most?
Question 4: How do hooks block or modify actions?
Question 5: When should you use hooks instead of skills?
Summary
If you got 4-5 correct, you understand the core hook model well enough to start wiring real guardrails and observability. If not, review the event lifecycle and the platform comparison before continuing.
Key Takeaways
- Hooks are deterministic runtime handlers, not prompts or plugins
- Claude Code, Codex, OpenCode, and Pi expose similar lifecycle moments with different configuration surfaces
- Hooks are the right tool when behavior must happen every time rather than relying on the model to remember
Next Steps
Next, wire hooks into a real dashboard so you can see agent activity live.
Update on GitHub