cwcode is a Go terminal coding agent built for DeepSeek and local LLMs
cwcode is a terminal-based coding agent written in Go that supports DeepSeek V4 Pro, Qwen3.6-27B, Kimi, Azure, and any OpenAI-compatible endpoint, featuring vector memory, hash-anchored edits, and checkpoint/rewind — with no SaaS dependency.
Score breakdown
cwcode's hash-anchored edit scheme and sticky prefix-cache design directly cut token costs and output volume compared to naive agent loops, making sustained multi-hour autonomous coding runs on local or low-cost LLM endpoints practical without any cloud service dependency.
- 01cwcode is a terminal coding agent written in Go (~12k lines), built around DeepSeek V4 Pro, Qwen3.6-27B, Kimi, Azure, and any OpenAI-compatible endpoint
- 02Costs approximately $0.40/hour to run, described as 5% of Claude's token cost on DeepSeek V4 Pro
- 03Hash-anchored edits (ported from a February 2026 post by Can Akay) reduced output tokens per session by 30–40% on V4 Pro
cwcode `v1.11` is a terminal coding agent built in Go (~12k lines) that wraps any OpenAI-compatible chat API as a tool-using agent via a Bubbletea TUI. It ships with profiles for DeepSeek V4 Pro, DeepSeek Flash, Azure OpenAI, Kimi for Coding, and a local vLLM/llama.cpp profile targeting Qwen3.6-27B. Switching profiles mid-session requires a single slash command. The tool registry is approximately 600 lines, and adding a new tool requires implementing a two-method Go interface. There is no SaaS component: config is JSON, sessions are JSON, checkpoints are content-addressed blobs, and the memory store is a SQLite file — all under `~/.cwcode/`.
This technique, ported from a February 2026 post by Can Akay, reduced output tokens per session by 30–40% on V4 Pro.
Several design choices distinguish cwcode from other coding agents. Hash-anchored edits annotate every file line with a 3-character content hash; the `edit_lines` tool rejects an entire batch if any hash has drifted, eliminating the need for the model to reproduce content character-perfectly. This technique, ported from a February 2026 post by Can Akay, reduced output tokens per session by 30–40% on V4 Pro. A sticky prefix cache keeps the system prompt byte-stable across turns and serializes tool definitions in deterministic order, achieving DeepSeek prompt-cache hit ratios that routinely exceed 85% after the third turn — a path described as ~120× cheaper than a cache miss. A `Shift+Tab` toggle switches between a read-only planning mode and full execution mode, with a `/goal` command enabling an autonomous loop capped at 20 consecutive cycles. A "storm-breaker" mechanism synthesizes a plain-language error message when the same tool fails identically three times in a row, appending it to history for follow-up context. The agent costs approximately $0.40 per hour to run, described as 5% of Claude's token cost on DeepSeek V4 Pro.
Key facts
- 01cwcode is a terminal coding agent written in Go (~12k lines), built around DeepSeek V4 Pro, Qwen3.6-27B, Kimi, Azure, and any OpenAI-compatible endpoint
- 02Costs approximately $0.40/hour to run, described as 5% of Claude's token cost on DeepSeek V4 Pro
- 03Hash-anchored edits (ported from a February 2026 post by Can Akay) reduced output tokens per session by 30–40% on V4 Pro
- 04Prefix-cache hit ratio routinely exceeds 85% after the third turn; DeepSeek's cache hit path is ~120× cheaper than the miss path
- 05No SaaS dependency: no account, no telemetry, no remote control plane; all data stored locally under `~/.cwcode/`
- 06Autonomous `/goal` loop runs back-to-back turns until tasks are complete or a safety cap of 20 consecutive cycles is reached
- 07Current release is v1.11, available as pre-built binaries for macOS arm64/amd64 and Windows amd64
Topics
Summary and scoring are generated automatically from the original article. We always link back to the publisher and never republish images or paywalled content. Last processed Jun 17, 2026 · 10:39 UTC. How this works →