Three Agent Harnesses, One Loop
Claude Code's agent loop is 1,729 lines of TypeScript. Codex's is 983 lines of Rust. Pi's is 794 lines of TypeScript. Three teams. Three languages. No shared code, no shared lineage, and in Pi's case an explicit design goal of being the small one. The loop lands in the same place anyway. That convergence is the least interesting thing about these three systems, and almost every comparison I have…
Three separate teams developed three distinct agent harnesses, each written in a different programming language. Despite their differences, all three systems follow the same core loop structure, consisting of five steps: assembling context, calling the model, executing tool calls if present, appending results to the conversation, and deciding whether to loop again or stop. The similarities between the harnesses led to a focus on the unique aspects of each system, rather than their convergence.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.