The $28 Million Mistake That Inspired Estonia’s AI ‘Fuckup Finder’

Estonia lost €24 million in gambling tax revenue because a single word in a new law was wrong. The Riigikogu passed changes…

By AI Maestro July 9, 2026 4 min read
The $28 Million Mistake That Inspired Estonia’s AI ‘Fuckup Finder’

Estonia lost €24 million in gambling tax revenue because a single word in a new law was wrong.

The Riigikogu passed changes to the Gambling Tax Act in December. The text mentioned “skill games” but omitted games of chance. Estonia’s online gambling market is worth around €300 million. The error left casinos outside the tax net for a full year.

A legal adviser for a gambling operator spotted the mistake. The situation worsened when Luukas Ilves, former undersecretary for digital transformation, ran the legislation through Claude and Gemini. Both AI systems flagged the inconsistency immediately.

Ilves built a prototype tool called Apsakaleidja, or “Fuckup Finder”, within hours. It pulls draft bills from the Riigikogu website to flag broken references, contradictory wording, arithmetic errors, and impossible dates. The tool categorises problems as high, medium, or low risk. Of the 112 bills currently listed, 102 are rated high risk. Ilves demonstrated the tool on national television.

“The situation demonstrated that AI can be an incredibly useful assistant,” Kristen Michal, Estonia’s prime minister, told WIRED. He added that the platform showed how agentic tools can empower civil society.

Estonia is now using AI to draft legislation and find loopholes. In January, Michal suggested the country might use tools like the Apsakaleidja to fix errors before they happen. He launched the Eesti.ai program to train Estonians in AI use. The goal is to double productivity by 2035. Advisers include Bolt founder Markus Villig and Ilves.

In April, parliament received a bill allowing state and local government to use digital solutions, including AI, to automate administrative processes. The bill is currently being debated. In June, Michal told an Eesti.ai meeting that, if things go to plan, “Estonia will become the first country in the world to create official digital identities for AI agents.”

“This is a new environment for the public sector,” Michal told WIRED. “It demands agility and the ability to adapt as technology changes.” Estonia is better placed than many countries to adapt. It leads on integrating digital identity thanks to a digital-first state. Ninety-nine percent of public services are already online. Those investments allow the country to move faster and more confidently into the AI era.

Catherine Flick, who researches technology ethics at the University of Staffordshire, says the gambling tax error raises a basic question. “Why are humans not doing this review process as part of the legislation drafting procedure?” she asks. “At some point someone has to sit down and read through the whole thing, with the understanding of the context and all that sort of stuff, in order to make sure that this is a decent law.”

Representatives in the Riigikogu are debating the final element: the human in the loop. Kirke Maar, team lead of Eesti.ai, explains the bill is deliberately drawn widely.

Estonia divides choices into two buckets. “The natural dividing line is between rule-bound decisions and discretionary ones,” Maar says. “Where the law determines the outcome from verifiable facts—you meet the criteria, you get the result—automation is appropriate.” If the state has the data needed to establish that someone qualifies for a benefit, the person should not necessarily have to fill in a form. Tax declarations, which are already prefilled, could move from citizens checking and confirming a form to an agent preparing and filing more complex declarations end to end. The citizen would confirm or intervene where needed.

When things are more complicated, and “a decision requires genuinely weighing competing interests or judgment about a person’s specific circumstances, a human belongs in the loop from the start,” Maar says.

At any point during an AI decisionmaking process, a person can invoke their right to be heard. The automated procedure would end and a human official would take over. Automated decisions are ruled out where a citizen disputes a decision. Every automated administrative decision must leave an audit trail of what data was used, which rule was applied, when the decision was made, and how the citizen could challenge or correct it.

“The purpose of Estonia’s digital state has never been to remove the human from government,” Maar says. “It has been to make services more accessible, faster and less burdensome.”

Liina Vahtras, managing director of e-residency, says accountability is central to the AI process. “The key risk is AI systems acting at scale without accountability—where actions cannot be traced back to a responsible party, permissions are unclear, or misuse goes undetected,” she says. “This is what we’re working to prevent.”

“As AI agents begin to interact with public services, banks, registers, and other digital systems on behalf of people and companies, it must be clear who the agent belongs to, under whose authorization it acts, what it is allowed to do, and who remains responsible for its actions,” Vahtras says. “The idea behind the agent code is to make the chain of responsibility visible.”

Michal is careful to draw a line between AI as an assistant and AI as an authority. “AI does not replace democratic institutions, the constitution, or the will of voters,” he says. “If AI identifies a mistake in legislation, it is no different from a human spotting one. The responsibility to correct it remains with parliament, the courts, or the public administration.”

What it means

The government is building a system where AI agents can act on behalf of citizens, but a human must always be able to step in. This ensures that while tasks are automated, the final responsibility for decisions stays with people.

Scroll to Top