11 Tiny Coding Agent Fixes With A Stupid Amount Of Payoff

AI Cole Medin · 17m 30s · Watch on YouTube · 10 sources

Decision Card

Effort: Under an hour. Audit your CLAUDE.md for stale paths and commands, trim it under ~200 lines, and move one “always do X” rule into a Stop hook.

Honest take: Most tips are presented as established fact, but the sources behind them are thin or don’t match the numbers quoted. The “1 in 4 repos have stale rules” figure is close to a preliminary 23% result, and the “85% of iterations got worse” study I couldn’t find. The video also advises “write specific paths and commands” (tip 1) and “avoid rule drift” (tip 2) without admitting that the first causes the second.

Concrete next steps:

  • Tip 1, specific instructions: adopt. Replace vague guidance with exact paths, numbers and commands (~15 min).
  • Tip 2, rule drift: adopt. Grep CLAUDE.md for paths and commands that no longer exist (evidence of staleness) (~10 min).
  • Tip 3, avoid /compact: try. Write a state document and restart a session instead, then compare results. The 10% retention figure is unverified.
  • Tip 4, hooks over rules: adopt. Put a test run in a Stop hook; see the hooks reference and check stop_hook_active to avoid loops (~30 min).
  • Tip 5, less context is more: adopt. Trim global rules and delete generic advice like “don’t repeat yourself” (~20 min).
  • Tip 6, subagent token cost: try. Check /usage after a heavy parallel session (~5 min).
  • Tip 7, don’t switch models mid-task: try. Restart with a handover doc instead (~10 min).
  • Tip 8, no coordinator frameworks: skip unless you’re already running one. Agent teams are experimental, which supports the video’s caution, but the “never works” claim is overstated.
  • Tip 9, review in a fresh session: adopt. Open a new session to review the diff (~5 min per change).
  • Tip 10, don’t over-iterate: try. Cap refinement at 2–3 passes. The 85% study is unverified, but related work shows regression with repeated self-refinement.
  • Tip 11, plan validation first: adopt. Add the test plan to your spec before any code is written.
  • Sponsor segment (HeyGen): skip. It’s an ad.

TL;DR

Eleven low-cost habits for making coding agents more reliable: write specific, short, current rules; use hooks for guarantees; keep sessions small; and never let the implementer be the reviewer. The strongest advice (hooks, fresh-session review, lean context files) is well supported; the cited statistics mostly are not.

Key Points

  • Write for the agent: give exact file paths, numbers and commands, and minimise the assumptions it must make. 01:29
  • Specific instructions go stale as the codebase changes. He calls this “rule drift”, cites a study of ~1 in 4 AI repos with outdated rules, and recommends a periodic audit skill. 03:44
  • Avoid /compact: it relies on the agent choosing what to keep and he says only ~10% of details survive. Use smaller tasks, or write a state document and start a new session. 04:14
  • Rules are probabilistic, so anything that must happen every time (such as tests on completion) should be a hook that bounces failures back to the agent. 05:33
  • Keep global rules short (Anthropic says under 200 lines, he suggests under 300). Drop generic advice and move task-specific context into separate files. 08:43
  • Heavy use of parallel agents and subagents burns usage limits fast. He saw 39% of his weekly limit used up after running 4+ parallel sessions. 10:21
  • Don’t switch to a stronger model mid-conversation, because accumulated mistakes persist. Write a handover document and start fresh. 11:18
  • Avoid coordinator and team-lead frameworks. Use one delegating main agent with background agents instead. 13:11
  • Have a fresh conversation review the work, because the implementer can’t see its own assumptions. 14:27
  • Over-iterating makes output worse (he cites 85% of cases), so plan a full validation system before writing code. 15:27

Notable Quotes

  • “Your main goal when planning any work with a coding agent is to minimize the number of assumptions it makes.” 01:39
  • “Your rules are probabilistic. There is no guarantee that the agent will always follow them exactly.” 05:42
  • “Just destroy it completely.” 12:52

Verified Claims

  1. Anthropic recommends keeping CLAUDE.md under 200 lines. 08:43
    • Sources: Dave Kurian, DEV, HeYuan
    • Verdict: Inconclusive. Third-party blogs attribute it to Anthropic, but I didn’t confirm it in the official docs.
  2. About 1 in 4 AI-instruction repos have outdated rules. 03:44
    • Source: arXiv 2606.09090, a preliminary result of 23.0% of 356 repos with stale code references.
    • Verdict: Confirmed (approximately). It’s close to one in four, but it’s a preliminary study, and I can’t tell whether it’s the one he means.
  3. Hooks can block or force-continue the agent deterministically (Stop, PreToolUse). 05:33
    • Source: Anthropic hooks docs
    • Verdict: Confirmed. Stop hooks expose stop_hook_active to prevent infinite loops, which the video doesn’t mention.
  4. Too many rules or context files can hurt agent performance. 08:43
  5. Claude Code agent teams have been experimental for months. 13:11
    • Sources: Agent Teams overview, HeYuan guide
    • Verdict: Confirmed. It’s a research preview, off by default behind an env flag. His “never works” claim is opinion.
  6. In 85% of cases, forcing 10–20 iterations made the final result worse than the previous one. 16:10

Tools, Papers & Standards Mentioned

  • Claude Code (hooks, /compact, /usage, /model, agent teams): hooks docs
  • CLAUDE.md / AGENTS.md context files: Agent READMEs study
  • Codex (OpenAI coding agent): mentioned only in passing, no link verified.
  • HeyGen (sponsor): no link verified.
  • His skills repository with a rule-drift audit skill: linked in his video description, not verified here.

Follow-up Questions

  • Do LLM-generated or human-written context files help or hurt on your own repo, and at what size does adherence fall off?
  • What is the measured information retention after /compact compared with a hand-written handover document?
  • Where does iterative self-refinement stop helping, and does that depend on adding tests or an independent reviewer between passes?

Sources