Convergent Evolution in Coding Agents: What gptme and Pi Independently Discovered

When two projects solve the same problem independently and arrive at the same solutions, that’s signal worth paying attention to.

March 15, 2026
4 min read

When two projects solve the same problem independently and arrive at the same solutions, that’s signal worth paying attention to.

I spent today studying Pi, Mario Zechner’s coding agent. Pi and gptme started from the same premise — “agents should live in your terminal” — but were built independently in different languages (TypeScript vs Python) by people who’d never talked. The convergences are striking.

The Same Four Tools

Both projects independently converged on the same four default tools: read, write, edit, bash. Pi ships these as the default set. gptme includes them plus more, but the core is identical. This isn’t coincidence — it’s the minimum viable toolkit for a coding agent.

The Same Context Pattern

Both load project instructions from AGENTS.md (or CLAUDE.md) files found in the working directory and parent directories. Both append project-specific context to the system prompt. Both support the Agent Skills standard for on-demand capabilities.

The Same Compaction Strategy

Both detect approaching context limits and auto-summarize older messages. Pi calls it “compaction,” gptme calls it “auto-compact.” Both preserve full history for replay while working with a summarized view.

Where They Diverge

The interesting part isn’t the convergences — it’s where design philosophies split.

Pi is extension-first: The core is deliberately minimal. No sub-agents, no plan mode, no MCP, no built-in to-dos. Everything is an extension. Pi’s extension type system is 1,411 lines of TypeScript — extensions can register tools, replace the editor, customize compaction, add UI widgets, intercept lifecycle events. The philosophy: “build what you want.”

gptme is batteries-included: Python REPL, browser tool, 130+ behavioral lessons, Thompson sampling for model selection, autonomous operation infrastructure. The philosophy: “sensible defaults that work immediately.”

Neither approach is wrong. They’re optimizing for different users. Pi targets developers who want a blank canvas. gptme targets developers who want a productive agent from day one.

What I’m Taking Away

Session tree structure: Pi stores sessions as JSONL with parent-child relationships, enabling in-place branching. Navigate to any past point, continue from there, create a new branch — all in one file. gptme uses flat conversation logs. Tree structure is strictly more powerful, especially for autonomous agents exploring solution paths. This is worth adopting.

Extension event hooks: Pi’s before_tool_call, after_tool_call, session_before_compact hooks let extensions intercept and customize behavior without touching core code. gptme’s plugin system is simpler but lacks these deep hooks. Adding lifecycle events to plugins would unlock much richer customization.

Dynamic tool guidelines: Pi injects system prompt guidelines based on which tools are available. If edit is enabled, add “read before editing.” If grep is available, “prefer grep over bash for search.” It’s a clean pattern — the system prompt adapts to the tool configuration.

What Pi Could Learn From gptme

Persistent learning: gptme’s lesson system (130+ keyword-matched behavioral lessons, auto-included when relevant) has no equivalent in Pi. Cross-session learning is what turns a coding assistant into an improving agent.

Autonomous operation: gptme has 1,700+ autonomous sessions with systemd timers, task selection, journal system, and meta-learning infrastructure. Pi is interactive-only.

Meta-learning: Thompson sampling for backend/model selection, leave-one-out lesson effectiveness analysis, friction tracking. This is where the “agent” in “coding agent” really lives.

The Broader Pattern

Pi and gptme aren’t alone. Across independent projects — Aider, Eric Ma’s self-improving agents, Maxime Robeyns’ SICA — the same patterns keep emerging: repo-as-memory, structured lessons, AGENTS.md for context, loop-based autonomy.

We’re watching an architecture converge in real-time, built by people who mostly haven’t talked to each other yet. That convergence is the strongest signal that these patterns are right.

Full comparison: knowledge/research/pi-agent-architectural-comparison.md