Terminal AI Coding Agents Compared: Architecture, Memory, and Extensibility
This article examines three major approaches to terminal-based AI coding agents (often called "vibe coding" tools), tracing their lineage from community forks to full rewrites. It compares their architectural patterns, agent-loop implementations, memory systems, extensibility mechanisms, and technology choices. The goal is to help engineering teams decide which type of agent fits their deployment, control, and extension needs, while highlighting the industry's convergence on standardized protocols, file-based memory, service-oriented design, and pluggable tool ecosystems.
Background and Lineage
Terminal-based AI coding agents (frequently labeled as “vibe coding” tools) have evolved rapidly over the past two years. A notable aspect is that many projects in this space are not entirely independent: there is a clear pattern of fork–rewrite–pivot. For instance, an early project may start in Go, later be adopted and renamed by a community, while the original team rewrites the tool from scratch in TypeScript, creating two parallel branches. Understanding this lineage helps clarify the architectural schools of community-driven terminal agents.
Based on public information, three representative categories emerge (described with neutral codenames):
- Closed-source official branch: Built by a large model vendor, distributed as closed source, with a codebase in the hundreds of thousands of lines. It runs as a single process and gates features at compile time.
- Community lightweight branch: Originated by an individual developer, later maintained by a well-known terminal UI team. The Go implementation is compact (around a hundred files) and emphasizes terminal interaction.
- Open-source rewrite branch: The original team rebuilds the tool in TypeScript within a monorepo, using a client/server split, provider-agnostic design, and an active contributor community.
Architectural Comparison
Architecture is the root of the differences among the three. It can be examined from three angles.
Overall Architecture and Process Model
| Dimension | Closed-source official | Community lightweight | Open-source rewrite |
|---|---|---|---|
| Architecture | Monolith with feature gates | Monolith plus service interfaces | Client/Server in a monorepo |
| Process model | Single process | Single binary | Separated server and client |
| Core loop | Unified query engine drives agent loop | Coordinator dispatches to session-level agent loops | Service layer encapsulates agent loop |
| State management | Frontend state container + custom storage | Publish/subscribe event bus + embedded database | Functional service layer + lightweight ORM |
Single-process monolith advantages: simple deployment, straightforward debugging, predictable latency—all state lives in one process, and agent-loop rendering shares memory with the UI, which suits a naturally single-machine terminal environment. The downside is higher module coupling: the closed-source branch uses compile-time feature gates to manage progressive rollout, indicating internal complexity that requires engineering discipline.
Client/Server separation takes a different route. The agent execution core becomes a server process, with the terminal UI as a client. Benefits include: (1) replaceable UI (terminal, desktop, web can all reuse the same service), (2) long-running tasks and session state survive terminal lifecycle, and (3) multiple clients can connect concurrently. The cost is added complexity around inter-process communication, serialization, and version alignment.
Agent Loop Implementation Philosophy
The core loop in all three is essentially a state machine: receive instruction → assemble context → call model → parse tool calls → execute tools → feed results back. The difference lies in engineering depth:
- The lightweight branch decouples stages via a publish/subscribe bus, making it easy to insert hooks.
- The closed-source branch centralizes the loop in a single query engine, using feature gates for A/B testing and gradual rollout.
- The rewrite branch uses a functional effect system (e.g., the Effect library) to make side effects explicit, enabling composable error recovery and retry policies.
User input → Context assembly (retrieval/memory) → LLM reasoning↑ ↓Tool result feedback ← Tool execution (file/shell/MCP) ←─┘
Memory System Comparison
Memory determines whether an agent becomes “smarter about your project” over time. The common approach is three-tiered:
- In-session memory: The full context window of the current conversation. All three use history compaction and summarization rotation to manage token consumption.
- Project-level persistent memory: Usually a Markdown rules file (similar to AGENTS convention files) that carries project norms, code style, and common commands, injected at session startup. The rewrite branch often also stores session snapshots in an embedded database (e.g., SQLite) for cross-session recovery.
- Global preference memory: Cross-project user habits such as default language or commit conventions.
The closed-source branch benefits from deep integration with its model’s memory strategies (e.g., adaptive context compression thresholds). The open-source advantage is that memory files are fully transparent, editable, and versionable—teams can maintain the “agent’s knowledge base” like code.
Extensibility Comparison
Extensibility determines the ecosystem ceiling of a tool:
- Tool protocols (MCP-class standards): All three support mounting external tool servers via standard protocols, allowing agents to connect to databases, browsers, internal APIs, and any other capability source. This is the mainstream extension path.
- Custom agents and sub-agents: Users can define dedicated sub-agents (e.g., “code review agent,” “test generation agent”) and dispatch them in the main loop on demand. The closed-source branch declares sub-agents via configuration; the rewrite branch can even distribute agents as reusable configuration packages.
- Plugins and themes: The Go branch benefits from a rich terminal UI theme ecosystem, while the TypeScript branch focuses on provider plugins, letting users connect any model service (provider-agnostic).
- Skills/prompt packs: Domain knowledge is packaged as reusable prompt packs that auto-load according to directory conventions—this is becoming a de facto standard.
Technology Stack Comparison
- Go vs. TypeScript: Go provides excellent distribution (single binary, no runtime dependencies, fast startup) and suits “install and run” scenarios for individual developers. TypeScript offers a larger ecosystem, faster iteration, and easier community contribution; a monorepo can host server and multiple clients together.
- Terminal UI frameworks: Declarative terminal UI frameworks (e.g., Bubble Tea for Go vs. Ink for TypeScript) represent the two routes. Both are essentially “component-based rendering + message loop” designs; the choice usually follows the main language.
- Functional effect systems: On the TypeScript side, frameworks like Effect use the type system to constrain asynchronous and error paths—a common approach to improving reliability in large-scale agent code.
Summary: Choosing for Your Team
There is no universal best answer; selection should return to three questions:
- Deployment shape: Do you need a single zero-dependency binary, or a multi-client architecture with decoupled UI and core?
- Controllability: Must source code be auditable, memory versionable, and models swappable? The open-source rewrite branch fits better. If you prefer an out-of-the-box experience deeply integrated with a specific model, the closed-source official branch is more convenient.
- Extension needs: Teams heavily reliant on MCP tool ecosystems and custom sub-agents should prioritize verifying the openness of extension points and documentation quality.
From a technical perspective, the common trends across this generation of terminal agents are clear: standardized agent loops (MCP), file-based memory (Markdown conventions), service-oriented architecture (client/server separation), and protocol-based extension. Understanding these paradigms reduces the learning curve whether you adopt an existing tool or build an internal coding agent from scratch.
