Claude Code Ships Agentic Loops: How Anthropic's CLI Became the Most Dangerous Tool in Your Terminal
Anthropic

Claude Code Ships Agentic Loops: How Anthropic's CLI Became the Most Dangerous Tool in Your Terminal

mrmolsen · June 9, 2026 ·8 min read

Claude Code’s latest update crosses a threshold. Where it previously operated as a single-turn code assistant — read, think, write, done — it can now spawn sub-agents, manage entire file trees, run test suites, and loop on failures until the task is complete. We spent two weeks building with it.

What “Agentic Loops” Actually Means

The term gets thrown around loosely, but in Claude Code’s case it’s specific: when you give it a task, it can now:

  1. Break the task into sub-tasks
  2. Spin up parallel sub-agents per sub-task
  3. Run shell commands, read and write files, execute tests
  4. Evaluate output and retry on failure — without asking you

The loop terminates when the task passes its own validation, hits a hard stop (budget, turn limit), or encounters something it can’t resolve autonomously.

The Tools It Has Access To

Claude Code’s agent mode exposes a defined tool set:

  • Read / Write / Edit — file system operations
  • Bash — arbitrary shell execution
  • Glob / Grep — codebase search
  • Agent — spawn a sub-agent with its own context

The last one is what makes the loops possible. A top-level agent can delegate search to an Explore sub-agent, delegate implementation to a coding sub-agent, and delegate testing to a validation sub-agent — all in parallel.

What We Built With It

We used agentic mode to build the deploy pipeline for this site. The task: “Set up rsync-based deploy from dist/ to the DigitalOcean droplet, with an SSH config alias and a deploy script.”

It:

  • Read the existing ~/.ssh/config
  • Found the droplet entry and extracted the host alias
  • Wrote scripts/deploy.sh with the correct rsync flags
  • Ran a dry-run to validate the path
  • Caught a permission issue on the remote web root and fixed it

Total back-and-forth with us: one clarifying question about the remote path. Everything else it handled.

Where It Falls Down

It’s not magic. A few failure modes we hit:

Long chains get expensive fast. A 20-step agentic loop at Sonnet pricing adds up. Budget flags are your friend.

It will happily break things. Agentic mode has no hesitation. It deleted a config file we needed during one session — it thought it was a duplicate. The --dangerouslySkipPermissions flag should be used carefully.

No persistent memory across sessions. The CLAUDE.md file is the workaround — any context you need the agent to carry forward lives there.

The Takeaway

Claude Code in agentic mode is not a copilot. It’s closer to a junior developer you can leave running overnight. The ceiling is high. The floor requires guardrails.

If you’re building anything non-trivial, CLAUDE.md discipline and clear task scoping will be the difference between a productive session and an expensive mess.