Making Claude API JSON Output Reliable: A Four-Layer Defense That Outlived Prefill
Prefill now returns a 400 on Claude 4.6 and later, and Sonnet 4.5 retired on November 30, 2026. How I swapped Layer 1 for output_config.format and kept the validation, repair and retreat layers, plus the 1,081-sample truncation benchmark behind the repair code and a troubleshooting table.
Why JSON.parse Fails on Claude API Streaming tool_use Arguments — and How to Fix It
When you stream a Claude API response with tool_use, calling JSON.parse on each input_json_delta throws SyntaxError. Here is the correct way to assemble partial_json fragments, plus disconnect handling.
Automating CI/CD Pipelines with Claude Code's --print and --output-format json
A practical guide to using Claude Code's --print flag and --output-format json in CI/CD pipelines. Covers automated code review in GitHub Actions, PR comment generation, and test failure analysis — with working code throughout.
Claude API JSON Output Fails: 5 Root Causes and Fixes
Fix Claude API JSON parsing errors with these 5 common root causes: markdown code block wrapping, truncated output, injected commentary, Unicode escaping, and streaming parse failures. Includes copy-paste ready Python utility code.