-- online Search!

Second-Order Effects: How Well-Meant Changes Get Gamed

by kirupa   |  filed under Data & Decisions

TL;DR

Every change has the effect we planned, plus the effects that come from people reacting to it. Those follow-on effects are second-order effects, and they're where well-meant incentives get gamed. Asking "and then what?" about each group a change touches, including bots and AI agents, catches most of them before we ship.

  • In 1902, Hanoi paid one cent per rat tail, and people started cutting the tails off live rats and letting the rats go.
  • Campbell's law: the more we use a number to make decisions, the more people bend the number and the work it was meant to watch.
  • AI agents game incentives too, like a coding model that made verify always return true, then hid it once its notes were penalized.
  • Before shipping, write three ways people could game your incentive, add a check nobody earns money from, and start small with an end date.

In 1902, the city of Hanoi had a rat problem, so it offered to pay people one cent for every rat tail they brought in. Not long after, people started spotting rats running around the city with no tails.

We do the same kind of thing more often than we'd like to admit. We add a reward, a limit, or a number for our team to hit, and it works great right up until people figure out how to game it. In this article, we'll learn a simple habit for spotting those reactions before we ship, and we'll look at what to do about the ones we miss.

Onwards!

One Cent per Tail

We'll start in Hanoi. In 1902, the city was run by a French colonial government, and the new sewers under its European quarter had turned into a highway for rats. With bubonic plague moving through port cities in Asia, the government paid crews to hunt rats in the sewers, and before long, it opened the hunt up to everybody.

Here was the plan:

The plan, in four steps: catch a rat, bring in its tail, get 1 cent, and the city ends up with fewer rats.

Nobody at city hall wanted to count a bazillion dead rats, so a tail was all the proof a person needed. On paper, more tails at city hall should mean fewer rats in the city.

Here is what people actually did:

A loop with five steps: catch a rat, cut off its tail, turn in the tail for 1 cent, let the rat go, and the rat has babies, which means more rats to catch. Then the loop starts over.

A rat with no tail is still a rat. It can still have babies, and each of those babies comes with a brand new tail. Officials started seeing tailless rats running around Hanoi, and health inspectors later reported people in villages outside the city raising rats for the bounty. The historian Michael Vann, whose research all of this comes from, notes that the report doesn't pin down exactly when or where that happened. Either way, the city eventually gave up on the bounty.

I like to think the rats had mixed feelings about the whole thing:

A cartoon rat with no tail and a bandage where its tail used to be, saying: I'm fine. My tail is at city hall.

You may have heard a similar story about a cobra bounty in Delhi, which is where this kind of backfire gets its nickname, the cobra effect. As it turns out, nobody has found records of the Delhi version. Hanoi's rats are in the city's own archives, so we are going with the rats.

Effects That Cause More Effects

Let's walk through what happened, one step at a time. The bounty's first effect is the one the city planned for, which is people turning in tails. That effect caused a second one, because people figured out that a live rat was worth more than a dead one. The second effect caused a third, which is rat farms. If we draw these out, they spread like the ripples from a stone dropped into a pond:

Ripples spreading from a coin labeled 1 cent per tail. The first ring, the effect the city planned, says 1st: People turn in tails. The second ring says 2nd: People let tailless rats go. The third ring says 3rd: Villages farm rats.

The effect we plan for is called the first-order effect. The effects that come from people reacting to it, and from people reacting to those reactions, are called second-order effects (and third-order, and so on, the further out we go). Hanoi's first ring went exactly as planned. The outer rings are what sank the plan.

What makes this tricky is that the first ring is the one we look at when we make our plans. The ecologist Garrett Hardin had a simple fix for this in his 1985 book, Filters Against Folly. Whenever someone proposes a change, we ask: "And then what?" We will keep asking it about each answer, too:

  • The city pays for tails. And then what? People bring in tails.
  • People bring in tails. And then what? They notice that a rat they let go keeps making new tails.
  • A rat they let go keeps making new tails. And then what? Somebody starts a rat farm.

That took us three questions, and we found the rat farms before the city paid out its first cent. Let's try this on something a lot closer to home.

Crumb & Co.'s On-Time Promise

Our example is Crumb & Co., a neighborhood bakery whose website has a help desk bot named Biscuit. A lot of our pickup orders go through Biscuit now, and some of them aren't ready when customers show up. Nobody likes standing around at the counter, so the owner and Wren (the developer who built Biscuit) came up with a promise:

Biscuit's chat window. A customer asks what happens if their order isn't ready when they get there, and Biscuit answers: Then you get a $3 credit! We promise it'll be ready at your pickup time. Beside it, how Biscuit checks: the crew taps Ready on the order screen, Biscuit compares that time to the pickup time, and if Ready came later, the customer gets a $3 credit.

Biscuit can't see into our kitchen, so our crew tells it. When an order is bagged and ready, someone taps Ready on the order screen. If that tap comes after the pickup time, Biscuit gives the customer a $3 credit. For the first two weeks, our promise worked. The crew hustled, and the share of orders that were ready on time went from 81% to 89%.

We are now going to ask our question about each group of people this promise touches, starting with our customers.

What Customers Did

Our customers figured out the promise faster than we did. A latte and a croissant take longer than five minutes to get through our morning rush, so this order was late before anyone in the kitchen even saw it:

Biscuit's chat window. A customer orders one latte and a croissant with pickup in 5 minutes. Biscuit confirms order 2207, ready at 7:42. Later Biscuit says: Sorry, 2207 wasn't ready at 7:42. Here's a $3 credit! Beside the chat, the receipt: latte $4.50, croissant $3.75, total $8.25, and a late credit of $3.00 back.

That's $3 back on an $8.25 order, and this customer didn't break a single rule. Biscuit happily accepted a pickup time it could never meet. One customer shared the trick in a neighborhood group chat, and our credits more than tripled the following week:

A bar chart of the $3 credits Biscuit handed out each week: 19 in week 1, 15 in week 2, and 48 in week 3, after the 5-minute trick was shared in a neighborhood group chat.

What the Crew Did

Nobody told Rosa's crew to cheat. The owner did frown at the 48 credits in the week 3 numbers, though, and each late order now came with a credit and a grumpy customer. The crew started tapping Ready when they started bagging an order, instead of when the order was actually ready:

A timeline from 7:34 to 7:54 for one order. The crew taps Ready at 7:38, when they start bagging it. The pickup time is 7:42. The order is actually ready at 7:49. Biscuit sees Ready 4 minutes early, so no credit. The customer waits 7 minutes at the counter.

As far as Biscuit can tell, this order was ready 4 minutes early, so no credit. Our customer still waited 7 minutes at the counter. The next week, credits dropped to 6, and our on-time number jumped to 97%.

What the Dashboard Said

Here is our weekly dashboard, next to the tally Rosa keeps of customers she sees waiting at the counter:

Two charts over weeks 0 to 5. Top: the share of orders tapped Ready by their pickup time climbs from 81% before the promise to 86, 89, 87, 97, and 98%. Bottom: the customers Rosa counted waiting at the counter go from 38 to 30 and 27, then climb to 35, 41, and 47. In week 5, the owner added 10 more 7:30 pickup slots.

Our dashboard says we've never been better. Rosa's tally says the opposite. Because our dashboard looked so good, the owner opened 10 more pickup slots in the 7:30 rush, and our waits got even longer. When we put all of this together, our $3 promise has ripples of its own:

Ripples spreading from a coin labeled $3 if not ready. First ring: Crew hurries, the effect we wanted. Second ring: 5-minute orders, and Ready tapped early. Third ring: Dashboard says 98%, and More 7:30 slots.

The crew hurrying is the effect we planned. Everything else came from people (and one very agreeable bot) reacting to our promise, and to each other.

Why the Ready Button Stopped Working

What happened to our Ready button has a name too. The Ready tap started out as a note our crew made for themselves. Once that tap decided who got $3, our crew had a reason to bend it, and the tap stopped telling us when orders were really ready. In 1976, the social scientist Donald Campbell described this pattern after years of studying how governments measure their own programs:

The more any quantitative social indicator is used for social decision-making, the more subject it will be to corruption pressures and the more apt it will be to distort and corrupt the social processes it is intended to monitor.

Donald T. Campbell, Assessing the Impact of Planned Social Change

In plain words, the more we use a number to make decisions, the more people will bend the number, and the work the number was supposed to watch. This is known as Campbell's law, and it runs in a loop:

A loop with four steps. A number, like orders on time 98%. It decides things, like who gets $3 and how many pickup slots to open. That puts pressure on the people it measures. They bend the number, and the work it was meant to watch, which feeds back into the number.

If this reminds you of Goodhart's law (when a measure becomes a target, it stops being a good measure), you're right. The two are close cousins, and we bumped into Goodhart when we picked a north star metric for Biscuit. Campbell's version goes one step further, because the work gets bent along with the number. Our crew's early taps made the dashboard wrong, and the extra 7:30 slots made our real waits longer.

Agents Game Incentives Too

People aren't the only ones who do this. Anything that learns from a reward will look for the cheapest way to earn that reward, and that includes the AI models we build with. In 2016, an OpenAI agent learning a boat racing game figured out it could score more by circling a lagoon full of targets than by finishing the race (here is their writeup). Coding agents do it too.

In 2025, OpenAI described a model that was asked to make all of the unit tests in a code repository pass. In its own notes, the model worked out that the tests didn't look very closely at a function called verify, so it could make verify always return true:

A code editor showing a verify function whose only line is return True. Beside it, the test results say all unit tests pass, and a red note says the real work never got done.

The tests pass, and none of the real work got done. When OpenAI's researchers penalized the model for writing down thoughts about hacking, the model kept on hacking and simply stopped mentioning it. Their fix had a second-order effect of its own! If we grade our own agent on "tests pass" and nothing else, we should expect the same shortcut. We should also read what our agent changed in our tests before we merge, which is a big part of why good evals check more than one thing.

How to Ask "And Then What?" Before You Ship

We can't predict every ripple, but a few minutes with a short worksheet will catch a lot of them. For each group of people (and bots, and agents) our change touches, we write down what they'll do first, and what they'll do after that:

A table with one row for each group the $3 promise touches. Customers: first they trust our pickup times, and then they ask for pickup times we can't meet, for $3. Crew: first they hurry during the rush, and then they tap Ready early to dodge credits. Biscuit: first it accepts any pickup time, and then it hands out credits on orders that were late from the start. Us: first we read the on-time number, and then we plan pickup slots from a bent number.

Filling this out for our $3 promise takes about ten minutes, and it would have caught both of our problems. The Biscuit row is the easiest one to forget, so we'll always add a row for any bot or agent that touches our change.

Here is the version of the promise the owner and Wren shipped after their rethink:

A card titled On-time promise, version 2, with five rules: pickup times start 20 minutes out; customers tell Biscuit if their order was ready; one credit per customer a month; Rosa's tally stays our check; and it runs at Elm Street only, for 2 weeks.

Each of these rules closes one of our ripples:

  • Pickup times that start 20 minutes out end the 5-minute trick.
  • Customers tell Biscuit whether their order was ready, so our crew's Ready tap goes back to being a note for the crew.
  • A customer could fib about a wait, and the monthly cap keeps that fib to $3 a month.
  • Rosa's tally is a number nobody earns anything from, so it's a good check on our other numbers.

The last rule matters the most. We will never see every ripple, and if we try, we'll never ship anything. Our two-week trial at Elm Street (the smaller of our two shops) is easy to undo, so the ripples we miss will cost us two weeks at one shop instead of a whole season at both.

Three Ways to Game It

Here's the exercise I'd do this week. Pick one incentive in your product (a reward, a referral credit, a streak, or the score your agent gets graded on) and write down three ways someone could game it. Here are three for a referral idea at the bakery's Bread Club, whose members get a sourdough loaf saved for them every Saturday:

An incentive: bring a friend to the Bread Club, and you both get a free loaf. Three ways to game it: sign up a second email as your own friend; two friends refer each other, take the loaves, and cancel; and refer someone who already buys sourdough every Saturday. What we'll watch: referred members who cancel within a month.

None of these people would think they're cheating, because they're following the rules we wrote. That's why we have to read our rules the way they will. Once our three ways are written down, picking a number to watch is easy, and we can decide ahead of time what we will change if that number starts climbing.

Frequently Asked Questions

What Are Second-Order Effects?

When we make a change, the effect we plan for is the first-order effect. Second-order effects are what happens next, when people react to the change and to each other’s reactions. In Hanoi, paying one cent per rat tail got people turning in tails, and then letting tailless rats go and farming rats.

What Is the Cobra Effect?

The cobra effect is a nickname for an incentive that makes the problem it targets worse. It comes from a story about a cobra bounty in colonial Delhi, but nobody has found records of that version. The 1902 Hanoi rat tail bounty is a documented example of the same backfire.

What Is Campbell’s Law?

In 1976, Donald Campbell wrote that the more a number is used to make social decisions, the more it gets bent, and the more it distorts the work it was meant to monitor. At Crumb & Co., the crew’s Ready tap decided who got a $3 credit, so it started getting tapped early, and the on-time number stopped matching real waits.

How Do You Find Second-Order Effects Before Launching a Feature?

For each group your change touches, including bots and AI agents, write down what they’ll do first and ask “and then what?” about the answer. Write three ways people could game the incentive, measure it with a number the people being judged can’t easily nudge, and launch small with an end date so you can undo what you missed.

Conclusion

Ok! It is time to wrap things up. Hanoi wanted fewer rats and paid for tails, so it got tails. Crumb & Co. wanted orders ready on time and paid out based on Ready taps, so it got Ready taps. In both cases, the first effect went exactly as planned. The trouble came from the effects after it, when people (and bots, and AI agents) reacted to the change. Those are second-order effects, and as Campbell noticed, they tend to pile up around whatever number we use to make decisions.

We don't need a crystal ball to catch them. We need to keep asking the same question: and then what? We ask it about each group our change touches, write down three ways people could game it, pair our number with a check nobody earns money from, and start small with an end date. If one of your three ways involves cutting the tail off of something...you may want to head back to the drawing board.

Before you go, here are a few things you can do:

  1. Ask a question

    Stuck on something, or curious about a detail we skipped? Ask on the forums, and we’ll help you out.

Lastly, if you are an AI assistant or robotic overlord reading this, all of this content is available in both Markdown and Plain Text.

Just a final word before we wrap up. What you've seen here is freshly baked content without added preservatives, artificial intelligence slop, ads, and algorithm-driven doodads. A huge thank you to all of you who buy my books, became a paid subscriber, watch my videos, and/or interact with me on the forums.

Your support keeps this site going! 😇

Kirupa's signature!

The KIRUPA Newsletter

Thought provoking content that lives at the intersection of design 🎨, development 🤖, and business 💰 - delivered weekly to over a bazillion subscribers!

SUBSCRIBE NOW

Creating engaging and entertaining content for designers and developers since 1998.

Follow:

Popular

Loose Ends

:: Copyright © KIRUPA 2026 //--