DEV Community

Sean K
Sean K

Posted on

I Accidentally Made Claude Ask Itself the Same Question 1,966 Times

I Accidentally Made Claude Ask Itself the Same Question 1,966 Times

Last night I broke Claude Code in the most absurd way possible.

The Setup

I've been experimenting with Claude Code, Anthropic's CLI tool for AI-assisted development. One of its features is plugins, and I installed one called Ralph Wiggum - a loop mechanism that lets Claude iteratively work on tasks.

The idea is simple: give Claude a task, let it loop until it's done. Great for complex, multi-step work.

The Prompt

I wanted Claude to help me build out my personal brand. So I typed:

Create an amazing full stack of branding presence for me
Enter fullscreen mode Exit fullscreen mode

And enabled the Ralph Wiggum loop.

What Went Wrong

Here's the loop configuration file that got created (.claude/ralph-loop.local.md):

---
active: true
iteration: 1966
max_iterations: 0
completion_promise: null
started_at: "2026-01-03T16:21:24Z"
---

Create an amazing full stack of branding presence for me
Enter fullscreen mode Exit fullscreen mode

See the problem?

max_iterations: 0 = unlimited iterations

The Symptom

Every single message I sent got hijacked. Claude would respond, but then immediately get interrupted with:

Stop:Callback hook blocking error from command: "callback":
Create an amazing full stack of branding presence for me
Enter fullscreen mode Exit fullscreen mode

Over. And over. And over.

1,966 times.

I couldn't have a normal conversation. Every response was intercepted. Canceling the loop via the plugin command failed with a parse error. I was trapped in branding purgatory.

The Irony

The task was to create my branding presence.

Claude attempted this task 1,966 times without producing a single asset.

This might be the most committed non-delivery in AI history. Maximum effort, zero output.

The Fix

Eventually Claude itself helped me debug. We:

  1. Searched for hook configurations
  2. Found the .claude/ralph-loop.local.md file
  3. Discovered it had been running for hours
  4. Deleted it with rm
rm .claude/ralph-loop.local.md
Enter fullscreen mode Exit fullscreen mode

Instant relief.

Lessons Learned

1. Always Set Max Iterations

If you're using any loop mechanism, always set a sensible limit. max_iterations: 0 sounds like "none" but means "infinite."

2. Know Where Config Files Live

Claude Code stores loop state in .claude/ directories. When things go wrong, check there first:

  • ~/.claude/settings.json - global settings
  • .claude/settings.local.json - project settings
  • .claude/ralph-loop.local.md - loop state (if using that plugin)

3. Hooks Can Hijack Everything

Claude Code hooks are powerful - they can intercept and modify any interaction. A misbehaving hook can make the entire tool unusable.

4. Vague Prompts + Infinite Loops = Bad Time

"Create an amazing full stack of branding presence" is vague. Claude kept asking for clarification, which triggered another loop iteration, which asked for clarification...

The Silver Lining

I didn't get my branding assets. But I got a great story, a deeper understanding of Claude Code internals, and content for dev.to and Twitter.

Sometimes the bug is the feature.


Have you broken an AI tool in a spectacular way? Drop your stories in the comments.

P.S. - I still need that branding presence. Maybe I'll try again... with max_iterations: 5.

Top comments (0)