arrow_backback to academy
auto_awesometraining · past eventcompleted

Hooks, Memory & Sub-Agents

Power features: automated actions, persistent knowledge, parallel workers.

schedule 4 hourscalendar_month may 2026business techcareer.net
Most teams install an agentic tool and use it like a fancy chatbot. Here are the three power features that unlock the real value: HOOKS — Automated actions triggered by events Think of hooks as "if this then that" for your coding agent. Six hook events: SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, Stop, PreCompact. Recipes you can copy today: • Auto-format after every file write (PostToolUse → prettier --write) • Block dangerous bash commands (PreToolUse → grep for rm -rf → deny) • Warn when reading .env files (PostToolUse → echo security reminder) MEMORY — How the agent remembers across sessions Four memory types: user (your preferences), feedback (corrections), project (tasks/decisions), reference (links to Slack/Linear/Grafana). The agent auto-saves when it learns something relevant. You can also explicitly say: "Remember that I prefer React over Vue" and it persists across sessions. This means your agent gets better the more you use it — without retraining. SUB-AGENTS — Parallel specialist workers When Claude reads 50 files to research something, those files flood your context window. A sub-agent does the work in its own window and returns a clean 1-page summary. Built-in agents: Explore (fast codebase search), Plan (architecture), vercel:ai-architect (AI app design), vercel:perf-optimizer (Core Web Vitals). Custom agents: Create a .md file with a name, model, tools, and system prompt. Example: a "security-auditor" agent with only Read and Bash tools that checks for SQL injection, XSS, and secrets in source code. These three features compound. Hooks automate quality. Memory accumulates intelligence. Sub-agents parallelize work. Together they turn a single developer into a team.

topics covered

hooksmemory typessub-agentscustom agents