Anatomy of the Fastest-Growing Open Source AI Coding Agent
Deep Dive
github.com/anomalyco/opencode
First commit: March 21, 2025 — MIT License — TypeScript + Bun
— Jay V, CEO of Anomaly
Claude Code locked to Anthropic. Cursor locked to its IDE. No open-source terminal agent that could work with any model, any provider.
Jan 6, 2026: 247K downloads in a single day. By Jan 29: 386K/day. The hockey stick went vertical.
Key insight: the server is the brain. Clients are thin — TUI, desktop, and web all talk to the same API.
| Package | Role |
|---|---|
| opencode | Core CLI + server + agent |
| app | Shared web UI (SolidJS) |
| desktop | Native app (Tauri v2) |
| web | Landing page (Astro 5) |
| ui | Component library |
| sdk | Auto-generated API client |
| plugin | Public extension API |
| Package | Role |
|---|---|
| console/* | User accounts + billing |
| function | Webhooks + GitHub App |
| identity | Auth (OAuth2) |
| slack | Slack bot integration |
| enterprise | Enterprise features |
| extensions | VS Code / IDE plugins |
| containers | Docker configs |
Build orchestration: Turbo — Infrastructure: SST — Runtime: Bun 1.3+
// Simplified agent loop while (response.hasToolCalls) { for (const call of response.toolCalls) { // Check permissions const ok = await permission.ask(call) if (!ok) throw PermissionDenied // Execute tool const result = await tool.run(call) history.push(result) } // Stream next LLM response response = await provider.stream(history) }
Switch agents with Tab. Each has its own permission ruleset, model, and temperature.
Curated provider with hand-tested deployments per model. Volume discounts flow back to users.
Powered by Vercel AI SDK — unified interface for all providers with streaming, tool use, and caching.
Use a cheap model for planning, then switch to an expensive model for execution.
| Category | Tools |
|---|---|
| File Ops | read, write, edit, patch, glob, grep, ls |
| Execution | bash, pty, task (sub-agents) |
| Search | websearch, codesearch, sourcegraph |
| Analysis | lsp, diagnostics |
| Custom | User-defined .ts/.js in project |
| External | MCP servers (stdio + SSE) |
Tool.define("edit", { parameters: z.object({ path: z.string(), old_string: z.string(), new_string: z.string() }), execute(args, ctx) { /* ... */ } })
Desktop wraps the same UI via Tauri v2 with 12 native plugins (clipboard, notifications, auto-update, etc.)
// TUI entry point (simplified) const App = () => ( <RouteProvider> <SDKProvider> <ThemeProvider> <KeybindProvider> <DialogProvider> <SessionView /> </DialogProvider> </KeybindProvider> </ThemeProvider> </SDKProvider> </RouteProvider> )
912 releases in 10 months = ~3 releases/day
Peak: 176 releases in June alone
Most active: Tuesday (1,748 commits)
Peak hour: 12:00 PM (lunchtime shipping)
They maintain a dedicated style guide for AI agents working on the codebase:
Core team ships fast with high trust. Community PRs get reviews.
Denouncement is reserved for repeated low-quality AI spam, not disagreements.
// Permission ruleset { "read": { "*": "allow", "*.env": "ask" }, "write": { "*": "ask" }, "bash": { "*": "allow", "rm -rf": "deny" }, "external_directory": "ask", "doom_loop": "ask" }
Three modes: per-action, session-wide, auto-approve (CI/CD)
Cloudflare adopted OpenCode for internal use precisely because of this architecture.
type MessageV2 = | Human // user input + attachments | Assistant // multi-part response { content: Part[] // Text, ToolCall, Error, Meta thoughts?: string moderation?: Status } | System // system prompts
Stored as JSON at ~/.opencode/message/{sid}/{mid}.json
| OpenCode | Claude Code | |
|---|---|---|
| Models | 75+ models, 20+ providers | Claude only |
| Lock-in | None — MIT licensed | Anthropic ecosystem |
| UI Surfaces | TUI + Desktop + Web + IDE | CLI only |
| Architecture | Client-server (remote-able) | Monolithic CLI |
| Privacy | Zero telemetry, local storage | Anthropic cloud |
| Strength | Thoroughness, provider flexibility | Polish, orchestration quality |
Both tools now deliver comparable results on complex development workflows. The market is expanding beyond a single dominant solution.
The formula: High trust for the core team + strict gates for the community + AI agents as first-class contributors.
OpenCode shipped the future of coding agents — in the open, at breakneck speed.
agent37.club