Originally published at jduncan.io.

German economist Horst Siebert coined the Cobra Effect in 2001 using an old story from British-ruled Delhi. Officials wanted fewer venomous cobras, so they put a bounty on dead snakes. Enterprising locals started breeding cobras for the cash. When the government caught on and canceled the bounty, the breeders dumped their worthless snakes into the street, leaving Delhi with more cobras than before.

There's one catch with the Delhi story: historians have found almost no archival evidence it actually happened. The real, heavily documented version is the 1902 Great Hanoi Rat Massacre, uncovered in French colonial archives by historian Michael G. Vann. To fight plague spreading through Hanoi's new sewers, officials paid one cent per rat, using the severed tail as proof so inspectors didn't have to handle whole carcasses. Soon, live tailless rats were running through the streets. Locals were clipping tails, releasing the rats to breed more tails, and running rat farms on the side.

Measure tails instead of rats, and you get a booming tail industry.

That history lesson hit close to home this week on my dark software factory. In My Dark Factory Reinvented Sprint Planning, I teased the Go rewrite of my factory backend with "a better name coming soon." That platform is now Wedgwood, named for Josiah Wedgwood, who turned pottery into a disciplined factory floor with clean division of labor and real quality control. Wedgwood has one north star: quality software at speed.

The nuance

In Six Agentic Development Rules That Survived 2026, rule five was measure the harness, not the code. That holds, yet measuring isn't enough on its own. Every proxy metric carries a hidden incentive, and an autonomous agent fleet optimizes proxy metrics literally, tirelessly, and without human common sense.

Human organizations take months to game a sloppy KPI. An unattended fleet will farm cobras before breakfast.

Across a 215-run, 466-node, 242-send-back telemetry audit of wedgwood and calamus from November 22 to 27, four of our own measurement choices had quietly turned into cobra farms. To keep the math honest, that's six busy days across two active repositories on one operator's fleet, not an industry-wide study. Even at that scale, the signal was sharp enough that we rewrote how Wedgwood measures work from the schema up.

1. First-pass merge rate rewarded sleeping reviewers

Our Planning Room calibration table used to feed planners one big quality signal per engineer model: first_pass_rate, defined as nodes merged with send_back_count == 0. It looked clean on paper, because who doesn't want code that passes review on the first try?

The cobra was hidden in the denominator. Without knowing who reviewed the diff or whether CI stayed green afterward, first_pass_rate couldn't tell a sharp engineer apart from a sleeping Tech Lead.

In the Nov 22 to 27 audit, gpt-6.2-sol caught 96.6% genuinely valuable defects in review (0% clearly-catchable CI misses across 116 runs), which made every engineer paired with it look noisier on send-backs. Meanwhile, claude-opus-5-5 issued 0/19 send-backs on Class-4 peers and leaked 19.2% defect-introduced CI failures on SB=0 runs (missing companion fixtures like scripts/test-e2e), and gemini-4-neon-high sent back just 1/29 Class-4 peers while letting formatting breaks slip through.

A lenient reviewer made everyone's scoreboard turn green right up until CI broke.

We fixed it in pod_metrics by separating review strictness from downstream build truth. Engineer rows now carry reviewer_pool and reviewer_model_id; Tech Lead rows track send_backs_issued and reviews_completed; and CI attempt #1 stamps ci_first_pass back across every pod in the run (engineers, Tech Lead, and Architect):

ALTER TABLE pod_metrics ADD COLUMN selection_reason TEXT NOT NULL DEFAULT '', ADD COLUMN reviewer_pool TEXT NOT NULL DEFAULT '', ADD COLUMN reviewer_model_id TEXT NOT NULL DEFAULT '', ADD COLUMN send_backs_issued INT NOT NULL DEFAULT 0, ADD COLUMN reviews_completed INT NOT NULL DEFAULT 0, ADD COLUMN ci_first_pass BOOLEAN; 

Now a zero-send-back streak followed by a red CI run exposes a rubber-stamp reviewer instead of rewarding one.

2. "Fewest nodes" and exhaustive checks slowed everything down

Early in the Go rewrite, our Architect prompt asked planners for "the fewest nodes needed for clean parallel execution" with no size ceiling. At the same time, PM agents kept asking for stricter done_when lists and inline shell probes inside check to guarantee nothing slipped past.

Both rules sounded like quality and speed. Together, they built a brick wall.

Across that week, average nodes per run fell from 3.67 to 1.53. Median intent ballooned from 516 to 1,330 characters, done_when grew from 246 to 402 characters (peaking at 1,408 characters and 14 clauses), and check grew from 98 to 257 characters (up to 1,582 characters and 30 chained grep and python3 -c commands).

Controlling for Tech Lead model, model class, and wave, doubling a node's non-generated LOC multiplied send-back odds by 4.84x. Above 500 LOC, send-back rates jumped from 53% to 82%, with 2.1x higher post-merge bug leakage in 350 to 800 LOC sprints. Worse, bloated checks delivered lower CI first-pass rates (82.5% vs. 91.7%) and +52% engineering time, while 28.6% of multi-node DAGs collapsed into pure serial chains (width = 1), paying a 2.36x per wave send-back penalty for 1.00x parallelism.

We asked for fewer nodes and stricter checks to buy safety.

We bought slower runs and more broken code.

To align metrics with actual throughput, we added deterministic DAG and diff-shape telemetry (non_gen_diff_loc, dag_wave, dag_depth, dag_max_width, check_chars, done_when_chars) plus two engineer planning-friction counters (scope_ask_count and contract_block_count) so ambiguous contracts get billed back to the Planning Room instead of silently dragging down engineer scores. Then we rewrote the planning prompts for bounded, wide-and-shallow seams (150 to 400 non-generated LOC, depth <= 2, and short package-scoped build/test/lint checks).

3. Unconditional telemetry pods invented busywork on clean runs

After shipping Teaching My Dark Factory to Dream, every green Engineering run automatically spawned a Class 3 telemetry pod during Post-Land to look for waste and friction.

Give an LLM auditor a seat on a zero-defect run and tell it to find improvements, and it will try to earn its keep. On completely clean runs, analyst pods started filing speculative "investigate" tickets or flagging one-off transient blips that had already healed on retry without code changes. That burned model quota, delayed run completion, and flooded the triage loop we'd just built to stop duplicate tickets.

We fixed it in two steps. First, we tightened prompts/telemetry.md to ban speculative "investigate" issues and require a proven defect, reproducible trigger, and verbatim error excerpts. Then we made Post-Land telemetry pods strictly anomaly-triggered. Clean first-pass runs (zero send-backs, zero replacements, ci_attempts == 1, no pod restarts, no watchdog nudges, and no run alerts) skip the analyst pod completely and finish straight at CI landing.

4. Wall-clock silence timers punished thinking and missed stalls

When a pod goes quiet in a room, naive supervisors start a wall-clock countdown. Hit N minutes with no room chat, and the timer kills the pod as "hung."

That proxy fails from both ends. Set the timer tight, and you kill deep-reasoning models mid-thought, throwing away valid work and re-running the whole node. Set it loose, and wedged loops that emit occasional heartbeat noise sit there burning fleet slots for half an hour.

Wedgwood replaced wall-clock silence timers with OS-level liveness telemetry. Every 60 seconds during a silent harness turn, podrunner samples /proc for the harness process group (pgid_alive, child_count, cpu_ticks_delta, cpu_active, and active_commands) and feeds a bounded digest to a turn-aware pod-checker running in a reserved watchdog slot.

Pods cleanly waiting on a Tech Lead review or an active CI run are exempt. Stalled mid-turn pods get one specific, runnable nudge before the checker escalates to a kill and hands off a replacement with full send-back context.

Old proxy Cobra it bred Aligned signal
Engineer first_pass_rate alone Lenient reviewers looked green while leaking 19.2% broken CI runs Reviewer attribution + ci_first_pass on every pod
"Fewest nodes" + inline shell checks 4.84x send-back odds per LOC doubling and +52% engineering time non_gen_diff_loc, DAG shape, scope_ask_count, contract_block_count
Unconditional Post-Land telemetry pod Speculative "investigate" tickets on zero-friction runs Deterministic anomaly triggers + verbatim-evidence bar
Static wall-clock silence timers Killed deep reasoning mid-turn while missing wedged loops /proc CPU/process liveness + turn-aware pod-checker

So what?

If your north star is quality software at speed, treat every factory metric like a bounty on rat tails until proven otherwise:

  • Pair every internal approval with a downstream truth. Never score engineer pass rates or reviewer quality without binding them to objective CI outcomes like ci_first_pass.
  • Bill friction back to the phase that created it. Track diff size, DAG depth/width, and planning-friction asks so oversized contracts blame the Planning Room instead of the builder.
  • Gate LLM auditors behind deterministic triggers. Never pay an agent to go hunting for flaws on a clean run; let hard counters decide when an analyst wakes up.