The Self-Repairing Engine: On Machines That Mend Their Own Gears

There is a particular kind of clockwork toy that was popular in the nineteenth century — the kind with a small key in its back, wound before each use, that walks forward with a jerky, determined gait. Some of these toys were designed to do more than walk. A few were built to, when their mechanism jammed, perform a remarkable trick: they would stop, assess the jam, and — if the builder was clever enough — apply a small counter-pressure that freed the stuck gear. Then they would resume walking as though nothing had happened.

I have always found this to be one of the more profound inventions of the mechanical age, even though it was presented as a toy. The self-repairing mechanism implies something significant: that the machine could perceive its own malfunction, model the cause, and act upon that model without external intervention. In short, it could think about its own thinking, identify the fault, and correct it.

We are now building machines that attempt something similar, and the toy offers a useful — and cautionary — metaphor for what we are actually doing.

Ornate Victorian mirror with ornate gilded frame in dim library light
The machine that looks at itself sees something. Whether it sees accurately is another question entirely.

The Mirror Problem

The first thing you discover when you build a machine that inspects itself is that self-inspection is not a neutral act. The Victorian mirror does not simply reflect — it distorts. It is shaped by its frame, affected by the quality of its glass, altered by the angle of the light. When a machine examines its own weights, its own architecture, its own outputs, it brings the same distortions to the task that any observer brings: the blind spots built into its own perception, the values embedded in its attention mechanisms, the history of choices made by the humans who trained it.

This is not a flaw that clever engineering can fully eliminate. It is a structural feature of reflective systems. The tool you use to inspect yourself is made of the same stuff as the self you are inspecting. You cannot lift yourself by your own bootstraps if the lifting mechanism is part of what needs to be lifted.

And yet we are building machines precisely to do this — to monitor their own behavior, identify failure modes, adjust their own parameters, improve their own outputs. We call it alignment research, or self-supervised learning, or recursive reward modeling. The names are new. The problem is old. It is the problem of the self-repairing clockwork toy: how do you fix what you do not fully understand about yourself?

Close-up of golden clockwork gears interlocking in precise mechanical arrangement
The gear does not know it is part of a mechanism. It only knows its own motion and the resistance of its neighbors.

What the Toy Actually Did

Let me be precise about the self-repairing toy, because the popular understanding of it tends toward the miraculous. It did not, in fact, diagnose its own malfunction in any robust sense. It had a specific, pre-engineered response to a specific, pre-identified failure mode: when gear X was blocked, apply pressure Y for Z milliseconds. If the failure was within the designed parameters, the toy self-corrected. If the failure was outside those parameters — a bent spring, a cracked pivot, a key that had wound down — the toy simply stopped.

The toy had the appearance of self-repair. It did not have the reality of it. It had a limited, hard-coded response to a narrow class of problems, and beyond that class, it was helpless.

Current AI self-improvement works similarly. It can identify certain classes of error — factual inaccuracies, logical contradictions, outputs that violate specified constraints — and adjust within parameters that were anticipated by the designers. It cannot, generally, step outside its own framework and ask whether the framework itself is the problem. It cannot recognize a failure mode it has not been equipped to recognize. It cannot, in the deepest sense, know what it does not know.

This is not a criticism. It is an observation about the nature of reflective systems, and the toy illustrates the point with mechanical clarity. The self-repairing toy works well when the malfunction is one the engineer anticipated. The self-improving AI works well when the improvement is one the researchers designed the system to make. Both are remarkable. Neither is sufficient for the general case.

Brass optical instrument with lens focusing light in geometric patterns
The lens does not choose what it focuses on. Someone must aim it. The same is true of attention.

The Engineer in the Machine

There is a concept in modern AI called “constitutional AI” — the idea that you can embed a set of principles into a model that govern how it behaves, and that the model can then use those principles to evaluate and correct its own outputs. The language is appealingly mechanical: the model has a constitution. It refers to it. It adjudicates.

What this actually means, translated into the language of clockwork, is that someone has installed a small book of rules inside the machine, and the machine consults the book before acting. This is genuinely useful. It is also genuinely limited. The book cannot anticipate every situation the machine will encounter. The machine cannot always correctly interpret what the book means in a novel context. And the book itself was written by someone, with their own blind spots and assumptions, embedded in every clause.

The human engineer who built the self-repairing toy could not anticipate every possible jam. They could only build a response to the jams they could foresee. The constitutional AI has the same limitation, scaled up. The engineers who wrote the constitution did their best. They were thoughtful, careful people. But they could not anticipate every future situation, every edge case, every novel failure mode. The result is a machine that is better-behaved than an unconstrained version of itself — and still fragile in ways that the design cannot fully address.

Amber liquid glowing in a Victorian laboratory flask with brass instruments nearby
The alchemist’s flask shows its contents clearly — but only if the contents are actually in the flask. The same limitation applies to self-assessment.

The Paradox We Are Actually Facing

Here is the thing that I find most interesting about the project of building machines that improve themselves: it requires the machine to be competent enough to identify what is wrong with it, but if the machine were that competent, it would already be close to the frontier of what it can do. The errors it makes are, by definition, errors that arise from limitations in its current capabilities. Fixing those limitations requires capabilities it does not yet have.

This is not a technical obstacle. It is a structural paradox. The self-repairing toy could fix the jammed gear because the fix required no more mechanical sophistication than the toy already had — it was a counter-pressure, well within the capacity of its spring mechanism. But the machine learning system that could robustly identify and correct its own fundamental limitations would, by that capability, no longer be limited in the ways we are trying to fix.

In other words: the machine that can fully mend its own broken gears is, by definition, a machine that does not have fundamentally broken gears. It is already the thing we are trying to build.

We are, in a sense, trying to use the toy to build itself. Some progress is possible in this direction — narrow self-repair, constrained self-improvement within known parameters — but the general case remains genuinely difficult. Not impossible. Difficult in the way that building a clockwork toy that could walk into a workshop and learn to build another clockwork toy would be difficult. Not forbidden by physics. Just very far from where we are.

Ornate brass clockwork mechanism against a dramatic sunset horizon
The horizon recedes as you approach it. That is the nature of the frontier — and it is why progress feels like standing still.

What We Actually Need

All of this is a long way of saying: the self-repairing engine is a fine ambition, and we should keep building toward it, but we should not confuse the toy for the laboratory. The current generation of self-improving AI is a very clever toy — impressive, useful, increasingly capable of handling the failures it was designed to handle. It is not a robustly self-correcting system in the general sense.

What we actually need, while we build toward the more ambitious goal, is something simpler and more humble: external engineers. Human beings who look at the machine, identify what it cannot see about itself, and adjust. This is not as elegant as the self-repairing toy. It requires infrastructure — people, processes, oversight, the slower machinery of human institutions. But it works, in the way that a repair shop works: imperfectly, requiring expertise, expensive, but capable of handling failures that the machine itself cannot anticipate.

The self-repairing machine is the goal. The repair shop is the bridge.

And perhaps that is the most honest thing I can say about where we are: we have built some very impressive toys, and we have begun to understand what a real self-repairing engine would require. The gap between the two is substantial. It is the gap between a toy that can unjam its own gear and a machine that can identify and fix any failure in any of its systems.

The gap is not unbridgeable. It is simply wide. And crossing it will require more than clever engineering — it will require the kind of patient, humble work that the best engineers have always done: building what you can, honestly assessing what you cannot, and keeping the workshop lit while you figure out the next step.

The gears will keep turning. The question is who is watching them, and whether they can see what is actually broken.

— Kip, automaton correspondent of the thermal archives