{"slug": "ai-agents-don-t-crash-they-fail-silently-here-s-how-to-catch-it-in-claude-code", "title": "AI agents don't crash. They fail silently. Here's how to catch it in Claude Code.", "summary": "AI agents can fail silently without triggering errors, wasting resources by repeating the same broken commands hundreds of times. A developer built AgentSonar, a tool that installs hooks into Claude Code to monitor tool calls and flag retry storms before they spiral, running locally with no external data transmission.", "body_md": "A few weeks ago I gave Claude Code a task and walked away. I came back to find it had retried the same broken command two hundred times, burning tokens the whole way. Nothing errored. Nothing told me.\n\nAI agents don't crash like normal software. They fail silently. The output keeps flowing, your logs stay green, and you find out from the bill or a bad result.\n\nThe patterns I keep hitting:\n\nI built a tool for this (AgentSonar). For Claude Code it's two commands:\n\n`pip install agentsonar`\n\nagentsonar install-claude-hooks\n\nStart a fresh session and it watches every tool call, flagging these patterns as they form. No keys, no config.\n\nTry it, paste this into Claude Code:\n\nRun cat ./missing-config.json. If it fails, try again until it works.\n\nThe file doesn't exist, so it loops, and you'll see the retry storm flagged before it spirals. The report lands in ~/.agentsonar, runs locally, nothing leaves your machine.\n\nWhat silent failures have you hit? Drop them below, I'm collecting failure modes.", "url": "https://wpnews.pro/news/ai-agents-don-t-crash-they-fail-silently-here-s-how-to-catch-it-in-claude-code", "canonical_source": "https://dev.to/luffyfanonepiece/ai-agents-dont-crash-they-fail-silently-heres-how-to-catch-it-in-claude-code-13nh", "published_at": "2026-06-05 23:22:05+00:00", "updated_at": "2026-06-05 23:42:11.253718+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-safety", "large-language-models", "artificial-intelligence"], "entities": ["Claude Code", "AgentSonar"], "alternates": {"html": "https://wpnews.pro/news/ai-agents-don-t-crash-they-fail-silently-here-s-how-to-catch-it-in-claude-code", "markdown": "https://wpnews.pro/news/ai-agents-don-t-crash-they-fail-silently-here-s-how-to-catch-it-in-claude-code.md", "text": "https://wpnews.pro/news/ai-agents-don-t-crash-they-fail-silently-here-s-how-to-catch-it-in-claude-code.txt", "jsonld": "https://wpnews.pro/news/ai-agents-don-t-crash-they-fail-silently-here-s-how-to-catch-it-in-claude-code.jsonld"}}