Advanced Loops in Claude Code (Our Setup)
Video summary
Companion notes
Loop engineering is the new default mode for Claude Code — your agents should be running while you sleep, not waiting for prompts.
## Performance Loop: The Starter Pick The easiest first loop targets code efficiency on a measurable dashboard. The creator ran a performance loop on Super Dash (their YouTube control dashboard) overnight, prompting Claude to "pick something, improve performance" every 10–20 minutes. A concrete result: folding YouTube comments into a promise.all shaved 10 milliseconds off load times. Run it on a separate branch, verify functionality in the morning.
## Research + Import + Verification Loops For AirdropAlert, the team ran a 10-minute import loop for ~30+ hours that scraped competitor sites, selected crypto airdrop projects, and added them with a 20 rating. The suggested structure is three loops: import, research, and a verification loop to catch outdated entries — a human task the creator used to do manually.
## Adversarial Attacker vs Defender Loop On a tea passion-project site (live-coded quickly, "looks like garbage"), two agents battle: an attacker browses every 3 hours and writes a to-do list of broken links and bad content, while a defender fixes items every 20 minutes and deploys. Give the attacker a checklist and tell it "not to make stuff up" to curb hallucination.
## Pitfalls and Fixes The defender tends to over-fix (e.g., one link instead of structural cleanup) — prompt it to "be more aggressive" and make "structural changes." On research loops, Claude struggles to separate official press releases from Reddit opinions, so constrain sources to official product-maker pages only.
## Use the /loop Command Don't handcraft loop scaffolding. Type /loop in Claude Code, specify interval, prompt, and setup, and let it build the loop. The creator's framing: "thinking in loops" requires rewiring a linear brain — it's not taught in school but it's now required to keep agents "constantly working while you sleep."
Watch on YouTube
Prefer the native player? Open it on YouTube: https://www.youtube.com/watch?v=Tw54psmZ4-k
