The Ghost in The Machine

The 1968 programming principle that quietly explains why AI agents keep failing.

Software Engineering · AI Agents · Neurosymbolic Systems · Computer Science
The Ghost in the Machine: How a 1968 Letter Is Quietly Shaping the AI Boom
A half-century-old argument about a programming keyword turns out to be the missing manual for building artificial intelligence you can actually trust.
2026

By the time Maya, a senior infrastructure engineer at a major AI lab, opens her laptop on a Monday morning, the agent she shipped on Friday has already failed in eleven different ways. One run got stuck calling the same search tool over and over, a digital hamster on a wheel. Another confidently invented a customer ID, passed it downstream, and triggered three follow-on tools that all dutifully built on the lie. A third simply timed out after burning through fourteen dollars of API credits on a task that should have cost pennies.

"It's the same story I heard in 1998 about distributed objects," she said, asking that her real name not be used because her team had not yet published its post-mortem. "We have these powerful pieces, and we have no idea how to put them together without making a mess. Every time I debug a production agent, I think about Dijkstra."

She is not alone. Across the AI industry, engineers building large language model agents, theorem-proving systems, and what researchers now call compound AI systems are arriving, somewhat sheepishly, at the same conclusion. The tools have changed. The architectural problem has not. The question of how you take small, fallible pieces and assemble them into a system you can trust is the same question Edsger W. Dijkstra was asking in March 1968, when the Communications of the ACM published a 1,300-word letter that would reshape software engineering for the next half century.

The letter was titled "Go To Statement Considered Harmful." Almost nobody who quotes it has read it. Almost everyone working on AI today is, whether they know it or not, trying to relearn what it said.

I. A letter, a theorem, and a discipline

Dijkstra's 1968 letter is shorter than most blog posts. Its argument, stripped of its courtly Dutch phrasing, is that the unrestricted GOTO statement makes programs impossible to reason about. A GOTO, for the uninitiated, is exactly what it sounds like: an instruction that tells a program to jump from one place in its code to another. In the 1960s, programs were thick with these jumps. The result was what programmers came to call spaghetti code, a tangle of crisscrossing leaps where tracing a single thread of logic could take hours.

Dijkstra's argument was not really about a keyword. It was about how human minds work. "Our intellectual powers are rather geared to master static relations," he wrote, "and our powers to visualize processes evolving in time are relatively poorly developed." The sentence sounds polite. It is actually a hand grenade. He was saying that programmers cannot, in practice, hold long chains of jumps in their heads. If you cannot, by looking at the text of a program, predict what the running process will do, you have already lost.

Two years earlier, the Italian computer scientists Corrado Böhm and Giuseppe Jacopini had published a paper showing that any program built with arbitrary jumps could be rewritten using only three control structures: doing things in sequence, choosing between alternatives, and repeating actions. This became known as the structured program theorem, and it gave Dijkstra's argument a mathematical foundation. You did not need GOTO. You could, in principle, build any computation out of small, well-behaved pieces that fit cleanly inside one another, like Russian dolls.

By 1972, when Dijkstra, Tony Hoare, and Ole-Johan Dahl published the book Structured Programming, the argument had hardened into a worldview. In his contribution to the volume, Dijkstra wrote what may be the single most important sentence in software engineering: "The art of programming is the art of organizing complexity, of mastering multitude and avoiding its bastard chaos as effectively as possible." He proposed three mental tools for taming that complexity: enumeration, induction, and abstraction. The third was the lever. "The purpose of abstracting is not to be vague," he wrote in his 1972 Turing Award lecture, "but to create a new semantic level in which one can be absolutely precise."

Abstraction, in this sense, is the act of drawing a box around a piece of complexity and giving it a name. Once you have that box, you can use it without thinking about what is inside it. A car driver does not think about combustion. A pilot does not think about avionics firmware. A programmer who has a well-built sorting function does not think about how sorting works. The box is the lever.

Out of these ideas grew the vocabulary that working programmers now treat as background radiation: modules, encapsulation, hierarchical decomposition, information hiding. In a 1974 paper, Dijkstra coined the phrase that arguably became more influential than anything else he wrote: separation of concerns. It is, he insisted, "the only available technique for effective ordering of one's thoughts."

For half a century, software engineering has more or less been the project of discovering that he was right. The line from Dijkstra to the modern stack runs through a series of escalating abstractions, each of which is essentially a bigger box drawn around the same idea. In the 1970s, programmers learned to compose subroutines. In the 1980s, object-oriented programming extended the metaphor to encapsulated state. In the 1990s and 2000s, functional programming returned to the mainstream on the strength of a single insight: small, pure functions could be chained together to produce arbitrarily large systems whose behavior you could still reason about. By the 2010s, the same logic had escaped the bounds of a single computer and reorganized the cloud. Microservices, the dominant software architecture of the past decade, are nothing more than Dijkstra's separation of concerns applied at the network layer.

A staff engineer at a large financial-technology company, asked to define what makes a good microservice, gave a definition that could have been lifted from Notes on Structured Programming: "One thing. One interface. No surprises. If you can't explain what it does without using the word 'and,' you've already lost."

The arc looks, in retrospect, almost inevitable. Each generation had to relearn that complexity has to be carved at the joints, that interfaces matter more than implementations, and that the only systems you can trust at scale are the ones you can take apart in your head. Then came large language models, and the field forgot.

II. The compounding catastrophe

A language model is, from a software-engineering perspective, a strange new kind of component. It is a function, in some sense. It takes input and produces output. But unlike every component Dijkstra and his successors reasoned about, it is probabilistic, non-deterministic, and occasionally confidently wrong. When you chain such components together, the math gets unfriendly fast.

A widely cited benchmark from the agent platform MindStudio captures the problem in one line: chain five agents at 95 percent reliability each, and your end-to-end success rate collapses to 77 percent. Chain ten steps, and you are below 60 percent. Chain twenty, and your system is a coin flip. The problem is multiplication. If a step succeeds 95 percent of the time, two steps succeed 90 percent of the time, three succeed 86 percent, and the curve gets steeper. The very chaining that makes agents powerful makes them fragile.

01 Reliability decay in a five step agent chain
Each step looks reliable on its own. The system as a whole does not. Five competent agents become one unreliable workflow because probabilities multiply.
Each step at 95 percent. End-to-end at 77. Step 1 95 percent Step 2 95 percent Step 3 95 percent Step 4 95 percent Step 5 95 percent 0.95 0.90 0.86 0.81 0.77 Running probability that every step has succeeded 95 percent each Looks reliable in isolation 77 percent total Roughly one run in four fails Add five more steps. The chain drops below 60 percent. Twenty steps is a coin flip.
Step-level reliability (95%)
Compounded probability
End-to-end failure rate

This is the part of the story where Dijkstra's ghost gets loud. In a February 2024 essay that has since become required reading inside most frontier AI labs, a team led by the chief technology officer of Databricks, alongside collaborators from UC Berkeley, argued that the field was undergoing a fundamental shift. They called it the move from models to compound AI systems. Their thesis was blunt: the future of AI was not bigger models. It was systems composed of models, retrievers, tools, and verifiers, all working together. They were right. By 2026, the question of whether to compose AI components has been settled. The interesting question is how.

This is where the industry's frameworks have multiplied like coral. LangChain, released in late 2022, gave developers a library of building blocks: prompts, chains, retrievers, memory objects, tools. Its sister project LangGraph reframed agent orchestration as an explicit graph, with named states and clear transitions between them. CrewAI took a different tack, modeling multi-agent systems as a project team with assigned roles. Microsoft's AutoGen treated agent interactions as structured conversations. Stanford's DSPy, perhaps the most Dijkstra-influenced of all, abstracted prompts entirely, asking developers to write declarative descriptions of what they wanted and letting a compiler figure out the prompts.

A research engineer at Anthropic, speaking about her team's December 2024 essay Building Effective Agents, made the connection to structured programming explicit. "The most successful implementations weren't using complex frameworks or specialized libraries," she said. "They were building with simple, composable patterns." The essay laid out five such patterns: chaining prompts together, routing requests to the right specialist, running things in parallel, having a planner coordinate workers, and having an evaluator critique outputs. Collectively, the list reads like a reissue of the structured-programming primitives in modern dress. The essay's three principles are even closer to Dijkstra in spirit: keep designs simple, make every step transparent, and pay close attention to interfaces.

Interfaces, in fact, are where the field has begun to converge in earnest. Anthropic's Model Context Protocol, released in November 2024 and donated to the Linux Foundation in December 2025, is essentially an attempt to write the USB-C specification for AI tools: a single standard for how language models talk to the outside world. Its design notes lean heavily on composability, describing systems in which clients can also act as servers, building hierarchies of cooperating agents and tools. That sentence would not be out of place in Notes on Structured Programming.

Structured programming and AI composability

Half a century after Dijkstra warned that complex programs collapse under their own weight, the same architectural problem has reemerged in AI engineering, with components that are vastly more powerful and considerably less predictable than anything he could have imagined.

III. Where probability meets logic

The composability problem gets even more interesting when you try to glue language models to systems that demand certainty. This is the territory of neurosymbolic AI, sometimes called the third wave of artificial intelligence, in which neural networks are coupled to symbolic reasoners, theorem provers, and structured knowledge.

The exemplar is Google DeepMind's AlphaProof, announced alongside AlphaGeometry 2 in July 2024. At that year's International Mathematical Olympiad, the two systems together solved four out of six problems and earned twenty-eight of a possible forty-two points, equivalent to the top end of the silver-medal category. The gold-medal threshold begins at twenty-nine. AlphaGeometry 2 solved one of the hardest problems within nineteen seconds.

The architecture is what makes the achievement interesting. One component, a neural network, produces creative, intuitive guesses about what to try next. The other, a symbolic engine running in a formal proof system called Lean, rigorously checks whether those guesses are correct. Neither would be impressive alone. The neural side hallucinates. The symbolic side has no imagination. Together, they reached a level of mathematical reasoning that pure language models, no matter how large, had failed to touch.

"You can think of it as System 1 and System 2 wired together with a very strict interface," a senior researcher at DeepMind said at a recent academic workshop, borrowing the famous distinction the psychologist Daniel Kahneman drew between fast intuition and slow reasoning. "The neural side is allowed to be creative and wrong. The symbolic side is not allowed to be wrong at all. The trick is the protocol between them." The protocol, of course, is exactly what Dijkstra would have focused on.

The same principle is showing up across neurosymbolic research. A system developed at MIT separates perception, language parsing, and reasoning into distinct modules with clean interfaces: a neural network builds an object-based representation of a scene, another parses sentences into symbolic programs, and a deterministic executor runs those programs against the scene. The result, the authors reported, was that the system could handle combinations of objects and concepts it had never seen during training. The composability was the point.

The same disease is showing up everywhere, too. In structured programming, the villain was the GOTO that jumped you out of one routine and into another, leaving you with no way to know what state you were in. In modern agent systems, the villain is the language-model call that confidently returns a wrong answer that gets passed to the next call, which then reasons elegantly about the wrong answer, and so on. By step five, you are miles from where you should be, and nothing has visibly failed. Every step succeeded. The system, as a whole, lied.

02 The probabilistic GOTO problem
Dijkstra critiqued spaghetti code in 1968 because nobody could track program state across arbitrary jumps. Modern agent chains exhibit the same disease with a new substrate: a confident wrong output cascades through every downstream step.
1968: spaghetti code Arbitrary jumps hide program state 2026: cascading agent errors Confident wrong outputs flow downstream Block A Block B Block C Block D Block E Block F Control can leap anywhere No one can predict the state Agent 1: retrieve record Agent 2: invents an ID Agent 3: trusts the ID Agent 4: builds on the lie Agent 5: returns final answer The state of the program is scattered across the jumps The state of the truth is scattered across the chain Same disease, different substrate
1968: code blocks with arbitrary jumps
2026: agents in a chain
Cascading failure

A 2025 research paper studying agent reliability called this error propagation and identified it as the primary bottleneck in language model agent systems. The authors noted that once cascades of error begin, they are difficult to reverse. The remedies they recommended have a familiar shape: smaller modules, clearer interfaces, explicit state-tracking, the ability to check what happened at each step. Separation of concerns, in other words. Applied to systems whose components happen to hallucinate.

Not everyone is convinced this is the right move. A vocal minority of researchers, including some at major frontier labs, have argued that scaling pure neural networks will eventually subsume the need for explicit symbolic structure. A research scientist at one such lab put the skeptical case this way: "Every time someone has tried to hand-engineer structure into a neural system, the bitter lesson has come for them. Composability is great when you know what to compose. We mostly don't."

It is a fair point, and one Dijkstra himself might have appreciated. He was hostile to ad hoc engineering, but he was also clear that imposing the wrong structure was worse than imposing none. Still, the deepest version of the counterargument was made, indirectly, by a software architect at a major cloud provider. "The Unix philosophy was: write programs that do one thing well, and write programs to work together. That's structured programming exported to the operating system. What we're discovering, painfully, is that the same philosophy is the only sane way to build with language models. The model is the shell. The agents are the sub-shells. The tools are the binaries. If you can't draw that picture, you've built something nobody can debug."

03 The composable cure
A neurosymbolic system applies separation of concerns. The neural module is allowed to be creative and wrong. The symbolic verifier is never wrong. The strict protocol between them is where the engineering lives.
Separation of concerns, applied to AI Each module owns one job. The interface owns the trust. Problem input Math statement Neural module Generates candidates Symbolic verifier Checks each step parse propose accepted or rejected What each side is allowed to be Creative May guess. May be wrong. Rigorous Never wrong. Never invents. The protocol between them is the engineering
Neural module (creative)
Symbolic verifier (rigorous)
Strict interface
IV. What Dijkstra would have made of it

It is tempting, and slightly unfair, to imagine Dijkstra arriving in 2026 with a fountain pen, an Olivetti, and a list of grievances. He would, almost certainly, have hated prompts as an engineering medium. He had no patience for natural language as a vehicle for precise specification, and once dismissed it as "hopelessly inadequate when we have to deal unambiguously with situations of great intricacy." He would probably have been even less impressed by the metrics-and-vibes culture of AI evaluation, given that he once observed, in characteristic deadpan, that "program testing can be used to show the presence of bugs, but never to show their absence."

But the deeper move in Dijkstra's work, the insistence that the only way to build something reliable is to build it out of pieces you can understand, pieces with clean interfaces, pieces you can reason about in isolation and then in combination, is exactly what the AI field is now stumbling toward. There is a striking convergence happening among three communities that, until recently, barely spoke to each other: systems programmers who learned composability from C and Unix, functional programmers who learned it from Haskell, and AI researchers who are now relearning it from production failures. All three are arriving at the same set of principles. Small components. Well-defined interfaces. Explicit state. Hierarchical decomposition. Separation of concerns.

Or, as a senior engineer at a multi-agent platform startup put it during a recent panel: "Everything old is new again, except now the components hallucinate."

A professor of computer science at Stanford, asked recently what reading she would assign to graduate students entering the AI field, gave an answer that surprised her interviewer. "Dijkstra's Notes on Structured Programming," she said. "Read it twice. Once for what it says, once for what it means. Then go read Building Effective Agents from Anthropic. You'll notice it's the same essay, fifty years apart."

The first essay told a generation of programmers that complexity was the enemy, that composability was the cure, and that humility about the human mind was the only defensible engineering stance. The second one tells today's AI engineers, more or less, the same thing. The intervening decades produced enormous changes in what computers can do. They produced almost no changes in what makes a system trustworthy.

That, in the end, is the strange durability of Dijkstra's 1968 letter. It was not really about GOTO. It was about the architecture of attention, the limits of the human skull, and the discipline required to keep large things from collapsing under their own weight. Half a century later, with a new generation of components that are vastly more powerful and considerably less predictable than anything Dijkstra could have imagined, those limits and that discipline have not changed. The composable revolution is here. It just turns out to have started in 1968.

Key references: Dijkstra, E. W., "Go To Statement Considered Harmful," Communications of the ACM 11(3), March 1968. Dijkstra, E. W., Dahl, O.-J., and Hoare, C. A. R., Structured Programming, Academic Press, 1972. Dijkstra, E. W., "Notes on Structured Programming" (EWD249), 1972. Dijkstra, E. W., "On the Role of Scientific Thought" (EWD447), 1974. Böhm, C. and Jacopini, G., "Flow Diagrams, Turing Machines and Languages with Only Two Formation Rules," Communications of the ACM 9(5), 1966. Zaharia, M. et al., "The Shift from Models to Compound AI Systems," Berkeley Artificial Intelligence Research Blog, February 2024. Anthropic, "Building Effective Agents," December 2024. DeepMind, "AI Achieves Silver-Medal Standard Solving International Mathematical Olympiad Problems," July 2024. MindStudio, "Multi-Agent Reliability Math," 2025. Mao, J. et al., "The Neuro-Symbolic Concept Learner," ICLR 2019. Model Context Protocol Specification, Anthropic / Linux Foundation Agentic AI Foundation, 2024 to 2025.