{"slug": "we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-to", "title": "We catalogued 55+ AI-agent failures in low-level code — and shipped 124 verified skills to fix them", "summary": "A developer catalogued over 55 documented AI-agent failures in low-level code, revealing predictable failure classes where code looks correct, compiles, and still does the wrong thing. The project turned these into 124 verified engineering skills, emphasizing mechanical gates such as assemble-disassemble-compare, measuring real parallelism, and verifying API existence. The findings highlight that LLM disassembly matches exact instructions only ~14% of the time, and package hallucination rates range from 5.2% to 21.7%.", "body_md": "✨\n\nDisclosure:this article was drafted with AI assistance. Every technical claim in it is source-traced in the linked repository (`registry/claims.yaml`\n\n, 177 primary sources). The failure classes below come from real, documented incidents — not vibes.\n\nAI coding agents are excellent at boilerplate and unreliable at low-level code — and the failures are not random. They cluster into **predictable classes** with a recognizable signature: the code *looks* correct, compiles, and still does the wrong thing.\n\nWe spent three research passes collecting **55+ documented failures** (source-traced, not anecdotes) and turned them into **124 verified engineering skills**. Here's what we learned.\n\nThe fix isn't \"be more careful\". It's **mechanical gates**: assemble → disassemble → compare bytes; measure real parallelism; check the API actually exists; make your harness *able to fail*.\n\nAgents invent instructions that do not exist. One generated CDC COMPASS pseudo-ops (`JOB`\n\n, `SST`\n\n, `OCT`\n\n) for a program that \"looked like assembly\". Another produced ** movqad** — no such instruction.\n\nThe dangerous failures don't error — they silently corrupt:\n\n```\n; What the agent wrote            ; What actually assembled\nimul eax, eax, 38                  ; 69 c0 00 00 00 00  (the 38 is DROPPED)\nmov (%rax), %eax                   ; 8b 00              (fine — but one byte vs. eax?)\n```\n\n`imul eax, eax, 38`\n\nassembles to `69 c0 00 00 00 00`\n\n— the immediate is silently discarded by the parser. This is exactly the bug class behind **BBoeOS PR#584**. Add AT&T/Intel operand inversion, missing size hints (`inc [counter]`\n\nvs `inc qword [counter]`\n\n), and \"AX is 8-bit\" claims, and you have a reliable failure generator.\n\n**The gate:**\n\n```\ngcc -c sample.s && objdump -d sample.o       # AT&T\ngcc -c -masm=intel sample.s && objdump -d -M intel sample.o   # Intel\n```\n\nIf the disassembly doesn't match what you wrote — same mnemonic, same operands, same size — you didn't write that instruction. Calibration: LLM disassembly gets exact matches right ~14% of the time; decompiler \"fixes\" are correct ~37%.\n\nModels produce `ConcurrentHashMap`\n\n/atomics that look thread-safe but execute everything on one thread. The **CONCUR benchmark** (arXiv:2603.03683) catches deadlocks and races that linear benchmarks cannot — because the code isn't actually concurrent.\n\nOur gate is mechanical, not syntactic:\n\n| Program | Live threads | Wall-clock | Verdict |\n|---|---|---|---|\n| \"thread-safe\" demo | 1 |\n1.206 s | fake parallelism |\nreal `pthread` split |\n4 |\n0.304 s | real parallelism |\n\nCount live threads and measure wall-clock scaling. Thread-safe *syntax* is not parallelism.\n\n**RustEvo²** (arXiv:2503.16922) is the clearest dataset: models nail *stabilized* APIs at **65.8%**, but *behavioral* changes (same signature, different semantics) at only **38%**. Performance collapses from 56.1% to 32.5% for APIs added after the training cutoff. RAG helps (+13.5%) — but you can't RAG what doesn't exist yet.\n\nAnd the supply chain angle is worse: agents hallucinate crates that **do not exist but resemble real ones** — a typosquatting risk (`serde-json`\n\nvs `serde_json`\n\n). Studies report **5.2% (commercial) to 21.7% (open-source)** package hallucination rates.\n\n```\ncargo info serde-json    # exit 101 — does not exist\ncargo info serde_json    # the real crate\n```\n\n**The gate:** verify existence (`cargo search`\n\n/crates.io API), pin the toolchain, and treat behavioral changes as the most dangerous class. In crypto specifically, only **23.3%** of generated Rust compiles and **57%** of that is vulnerable — with nonce reuse the leading cause (arXiv:2604.27001).\n\nThe worst class of all: a \"passing\" test that doesn't test the target.\n\n`allclose`\n\noracle `mmap`\n\nwithout ever calling `munmap`\n\n— an agent was the\n\nThe Iron Law:a harness that cannot fail is not evidence. The ablation test is:break the target — does your test catch it?If it still passes, your test is decoration.\n\n`gcc -O2`\n\n, 500k × 256-byte compares — early-exit `memcmp`\n\n0.054 s vs constant-time ~0 s.Each skill is a compact `SKILL.md`\n\nthat answers five questions before a line is written:\n\n| Question | Why it matters |\n|---|---|\nWhen to use / when not to |\nthe agent loads the right tool, not everything |\nWhat the agent often gets wrong |\nthe named failure classes above |\nHow to reason correctly |\nthe positive process, not just \"don't\" |\nWhat to verify / how |\nexecutable gates, not vibes |\nWhere the knowledge comes from |\nevery claim → primary source |\n\n**Verified, not asserted:** 65 of 124 skills were validated by actually running examples on real toolchains (GCC 16.1, rustc 1.97, GDB, objdump, CMake/Ninja). The remaining 59 are honestly marked `researched`\n\nwith the exact command that would verify them.\n\n```\ngit clone https://github.com/TrothByte/low-level-skills-trothbyte\npython tools/validate.py     # 124 skills + registry + 177 sources, all gate in seconds\n```\n\nAlso installable via `npx skills add TrothByte/low-level-skills-trothbyte`\n\nor as a Claude Code plugin marketplace.\n\nThe agents aren't broken — **our expectations are**. \"It compiles\" was never the bar for low-level code. The bar is: *assemble → disassemble → compare bytes; measure real parallelism; check the API exists; make the test able to fail.* The 55+ catalogued failures become 124 skills that encode exactly those gates.\n\nIf you write, review, or debug C, C++, Rust, assembly, kernels, or firmware with an AI — you'll recognize these failures. The library is free and MIT-licensed: **github.com/TrothByte/low-level-skills-trothbyte**.\n\n*Surveys with full source traces are in the repo's research/ folder. Found a failure we haven't catalogued? Open an issue — new skills must be source-traced and differentiated from the existing 124.*", "url": "https://wpnews.pro/news/we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-to", "canonical_source": "https://dev.to/trothbyte/we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-skills-to-fix-them-369l", "published_at": "2026-08-16 22:26:06+00:00", "updated_at": "2026-08-16 23:12:48.227212+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-safety", "developer-tools", "machine-learning"], "entities": ["BBoeOS", "RustEvo²", "CONCUR benchmark", "arXiv:2603.03683", "arXiv:2503.16922", "arXiv:2604.27001", "serde_json", "serde-json"], "alternates": {"html": "https://wpnews.pro/news/we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-to", "markdown": "https://wpnews.pro/news/we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-to.md", "text": "https://wpnews.pro/news/we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-to.txt", "jsonld": "https://wpnews.pro/news/we-catalogued-55-ai-agent-failures-in-low-level-code-and-shipped-124-verified-to.jsonld"}}