Blog

Notes from building agentty.

Release notes, performance deep dives, and design notes — written the same way the code is: measured, specific, no fluff.

·14 min

Why your diff looks grey: a compile-time fix for terminal color

A user sent a photo of a diff where the green + band had turned grey. Four wrong diagnoses later, the answer was 200 lines of colour science that runs entirely at compile time: CIEDE2000 in constexpr, an admissible bound that makes the search provably exact, and a hue constraint that takes grey collapse from 40.5% to 0.0%.

c++color
→
·11 min

If a weak model can't implement your feature, your design is bad

We read 'the small model couldn't do it' as a fact about the model. It is usually a fact about the code. A weak model is an analyzability probe — it fails exactly where correct usage requires knowledge that isn't in the code, and Page-Jones, Berners-Lee and Parnas all told us why that knowledge is the expensive kind.

designllm
→
·5 min

Kimi K2 and DeepSeek in agentty — sign in with Kimi, key in DeepSeek, code from your terminal

As of 0.4.0, Kimi and DeepSeek are first-class providers in agentty. Sign in with your Kimi plan over OAuth (no API key) and run Kimi K2, or drop in a DEEPSEEK_API_KEY and run DeepSeek V4 / reasoner — both with full streaming, native tool-calling, and live-streamed chain-of-thought, from a single static binary. Here's the exact setup.

providerskimi-k2
→
·4 min

agentty 0.3.0 — Smart Mode: a self-supervised orchestrator that learns your repo

0.3.0 introduces Smart Mode — a role-based execution router that pins your flagship, mid, and cheap models to Strategic / Implementation / Utility roles, delegates mechanical work to subagents, scales reasoning effort per turn, and gets measurably better at your repo across sessions. Off = a byte-for-byte no-op. Plus a one-decision RAG picker, thread forking, and fixes for a cross-process OAuth refresh loop and widened-workspace path resolution.

releasesmart-mode
→
·5 min

Why a terminal UI can out-render a browser: packed cells, SIMD diffing, and zero allocations

A terminal frame is a grid of a few thousand cells, not a DOM tree — and that difference in data structure is why a well-built TUI renderer can diff, encode, and flush a frame with zero heap allocations and SIMD-width cell comparisons. Here's the actual rendering pipeline: 64-bit packed cells, open-addressing style interning, AVX/NEON row-skip, and why there's no GC pause waiting to happen.

terminalperformance
→
·4 min

agentty 0.2.12 — Zed-native ACP parity, a smarter retrieval pipeline, and a hardened composer

0.2.12 closes the remaining ACP gaps with Zed's native agent (slash commands, model picker, sign-in, line-numbered reads), upgrades retrieval to rag-cpp's measured-best pipeline with a visible retrieval funnel and ~13% fewer tokens per query, and fixes six composer editing bugs including a queued-message data-loss bug.

releaseacp
→
·4 min

agentty 0.2.11 — a cost-aware agent: cheaper compaction, cheaper subagents, real OAuth for MCP

The 0.2.10/0.2.11 line makes agentty economical by default — auto-compaction and read-only subagents now route to the cheapest capable model instead of the flagship you're chatting with, Claude's 1M-context variants are exposed correctly, MCP gets full interactive OAuth 2.1 + PKCE, and the model picker sorts by actual strength instead of a hardcoded family list.

releaseproviders
→
·4 min

agentty 0.2.9 — a frontier local retrieval engine, in one static binary

The 0.2.x line took search_docs from a good local RAG to a frontier-grade one — hybrid BM25 + dense embeddings, HNSW ANN, GraphRAG expansion, a learning loop that closes the relevance feedback other agents leave open, and an eval harness that makes every stage provable. All pure C++/STL, offline-capable, zero new dependencies.

releaseretrieval
→
·14 min

Implementing the Agent Client Protocol in C++: a codec is a fold, not a ritual

I wrote the first C++ implementation of the Agent Client Protocol — the thing that lets Zed drive Claude Code and Gemini. Most JSON-RPC libraries hand you stringly-typed blobs and a prayer. acp-cpp treats the protocol as what it actually is: a closed algebra of inductive types, where serialization is a fold over the type's shape and the compiler proves you handled every case. Here's the whole design, from the unit type up to the deferred-reply trick that keeps a single-reader transport from deadlocking mid-turn.

c++acp
→
·12 min

The C++ design of a terminal coding agent: a state machine that can't lie to you

An LLM agent loop looks like the worst possible fit for C++ — async, streaming, full of stringly-typed events. It is actually one of the best. Here's how agentty turns the whole app into a closed sum of events, a single std::visit reducer, and a permission matrix the compiler proves correct over all 48 cells.

c++architecture
→
·5 min

I rewrote the Claude terminal agent in C++ and it cold-starts 50× faster

claude-code spends ~150 ms and 222 MB of Node just to print its version. agentty is one 9.6 MB binary that does it in ~3 ms. Here's exactly where the time goes, why a coding agent is a surprisingly good fit for C++26, and the numbers you can reproduce yourself.

performancec++
→
·2 min

agentty 0.2.0 — run your terminal agent inside Zed

0.2.0 teaches agentty to speak the Agent Client Protocol, so the same engine that drives the TUI now drives a first-class agent panel inside Zed — streaming text, inline diffs, native permission prompts, and session reload.

releaseacp
→