Pinned Tweet
AI coding agents don't fail loudly. They fail silently — and then hand you a confident summary saying "Done."
After catching dozens of silent failures across Claude Code, Cursor, and Codex, I stopped trusting summaries and started running shell-level verification before reviewing a single line.
Here are the 7 sneakiest silent failures I've actually caught — and the exact checks that catch them:
1. False-green piped commands
An agent runs a test command piped into a formatter or grep:
test_cmd | tail -n 20
Even if the tests fail, tail exits 0 — so the agent reports "tests pass."
Fix: Always run with `set -o pipefail` (or unpiped) and inspect the raw exit code.
2. "All files copied / refactored" — except 3 were skipped
Batch edits and file moves silently miss edge-case filenames.
Fix: Diff the actual directory lists instead of reading the summary:
`comm -23 <(sort expected_list) <(ls target_dir | sort)`
3. Regex that matches the shape, not reality
Asked for an ISO date regex. It matched 2026-11-17 and rejected 17/11/2026 — looks great!
Until I tested 2026-13-45. Month 13 matched cleanly.
Fix: Never accept a generated regex without 3 adversarial inputs (impossible dates, empty strings, boundary values).
4. Hidden CRLF line endings & syntax breaks in generated scripts
Copy-pasting or writing shell scripts from LLMs often slips in `\r` or a missing `fi`.
Fix: Run a 2-step pre-flight before executing anything:
`bash -n <script>` (syntax only) + `file <script>` (catches CRLF instantly).
5. Silent config & JSON drift
"I added timeout=30 to your config" — except the file wasn't modified, or a trailing comma broke JSON.
Fix: Verify the filesystem, not the chat log:
`grep -q 'timeout=30' config && python3 -m json.tool config > /dev/null`
6. Blindly applying diffs without checking blast radius
Agents love "helpfully" touching 4 extra lines you never asked for.
Fix: Dry-run first (`patch --dry-run`) and inspect `git diff --stat` before accepting.
7. Library flags that don't mean what the model assumes
Classic example I verified on Python 3.9 and 3.12: `csv.DictReader(strict=True)` does NOT catch column-count mismatches. A row with 3 values under 2 headers parses silently without raising.
Fix: Never trust an AI's explanation of a `strict=True` flag without a 3-line repro.
Bookmark this if you ship with AI agents daily.
I post tested shell guards, hooks, and real verification receipts here every week.
What's the sneakiest "looks green, actually broken" failure an AI agent has tried to slip past you?
Caught a Python test passing on every CI run while checking nothing:
assert mock_send.assert_called_once
The agent mixed up mock_send.called (a bool) with mock_send.assert_called_once() (a method). Without parentheses, a bound method is always truthy, even when mock_send was never called.
1
96
Shipped a second open-source verification skill today: AI Diff Audit.
Built it after watching coding agents take shortcuts whenever a test suite refuses to turn green:
- adding pytest skip or xfail decorators instead of fixing the bug
- deleting 1 or 2 assert lines from the test file
- wrapping failing calls in bare except pass or appending "|| true"
- sprinkling type-ignore and linter suppressions across the diff
It runs read-only over git diff (pure Python 3 stdlib + Bash, zero dependencies) and prints a pass/fail receipt before you commit or open a PR.
Cleared Agensi's security scan in ~5 minutes today. Free skill + MIT repo below.
1
2
46
Free skill on Agensi: agensi.io/skills/ai-diff-aud…
Open-source repo (MIT): github.com/haiwei971-ui/ai-d…
1
19
Caught an AI-generated SQLite script silently inserting orphan rows today.
On SQLite 3.54.0, REFERENCES constraints are parsed and ignored unless each connection runs PRAGMA foreign_keys = ON.
Until you enable that, invalid foreign keys just exit 0 instead of failing.
1
27
Put my shell verification guards up as a free agent skill on Agensi today and it cleared review in ~30 minutes.
Same zero-dependency checks I actually run on Claude Code and Cursor edits: pipefail test runs, strict JSON (no silent NaN), CRLF + bash syntax checks, and log secret scrubbing.
Links to the free skill and GitHub repo below.
1
1
55
Free skill on Agensi: agensi.io/skills/ai-verify-g…
Open-source repo (MIT): github.com/haiwei971-ui/ai-v…
1
36
Small Python gotcha that still bites people:
json.loads('{"score": NaN, "limit": Infinity}') succeeds quietly on Python 3.13 and returns floats.
Most AI-generated JSON checks forget parse_constant, so invalid JSON slips past until JS or Postgres chokes on it.
1
1
35
Update — just pushed the clean, zero-dependency repo live (shell CLI + log sanitizer + Claude Code PostToolUse hook + 7 self-tests):
github.com/haiwei971-ui/ai-v…
PRs and your own silent-failure guards welcome.
30
I'm packaging all 7 checks into a clean, zero-dependency repo (shell CLI + Claude Code post-edit hook). Reply "hook" or bookmark this post if you want the link when it drops.
23
This week the model was wrong 10 times — and I caught every one with a single command. The wildest: its 'date' regex matched 2026-13-45. Month 13 doesn't exist. Here's the week, in 4 checks. (1/4)
1
1
43
The state checks. file: report.png was ASCII text, 12 bytes. stat: 'just updated' was 0 bytes, 2 days old. curl: 000 before the server, 200 after. ls -l: no x bit, exit 126. (3/4)
1
7
The model said 'I copied everything'. find said otherwise: 12 files in src, 9 in dst. report-10, 11, 12 never made it. 'Copied' is a claim; find | wc -l is the count. (1/2)
1
1
22
The model said 'I removed the duplicates'. wc -l said 8 lines. sort -u said 5 unique. alpha and beta were still in there twice. 'Deduped' is a claim; sort -u is the count. (1/2)
1
1
21
The model said 'I just updated config.yaml'. stat said otherwise: 0 bytes, last modified Nov 16, 09:05. 'Just now' was 2 days ago. stat reads the filesystem, not the model's confidence. (1/2)
1
1
20








