Skip to main content

Context

TOMMY Phase 2 (dry run verification) required 15 webhook fire-and-diagnose iterations across a single session to get the 34-node n8n pipeline producing correct output. Each iteration revealed a distinct bug at a deeper layer of the pipeline.

The Iteration Stack

#BugPhaseFix Category
1FORGE Shortcut If node strict type on null arrayP0Type coercion
2-3Anthropic API key missing / wrong credentialP2Credential binding
4API credit balance exhaustedP2Billing
5pipeline.yaml 404 crashes pipelineP1Error handling
6-7Assemble runs 2-3x (parallel fan-out)P1→P5Architecture
8Merge node passes empty data downstreamP3Data flow
9Filter node array return in wrong modeP3Return shape
10-11Sequential chain breaks URL expressionsP1Expression refs
12-14README URL has literal = prefixP1UI save issue
15SplitInBatches v3 skips loop bodyP4Batch config

What We Learned

The bug stack pattern: Complex workflows don’t fail at one point — they fail at the first point. Each fix reveals the next failure deeper in the pipeline. Debugging requires patience to iterate through every layer rather than assuming the first fix solves everything. API-driven debugging is faster than UI: Every diagnosis was done via curl + python3 against the n8n REST API, not by clicking through the UI. The execution data contains the full node-by-node trace with input/output payloads. Cost per iteration: Each dry run that reached the Claude API cost ~0.020.04(Sonnet, 25003500tokens).TotalPhase2debuggingcost: 0.02-0.04 (Sonnet, ~2500-3500 tokens). Total Phase 2 debugging cost: ~0.16 across 4 LLM-hitting runs. The other 11 iterations failed before reaching the LLM — zero token cost.

Business Takeaway

Building autonomous systems is an investment in debugging infrastructure, not just pipeline design. The 15-iteration debugging session produced a reusable debugging skill, 8 documented bug patterns, and a hardened pipeline. The alternative — shipping an untested pipeline and debugging in production — would have burned API credits at scale with no audit trail.