tigicion/dao-code

Open-source TypeScript terminal coding agent for DeepSeek-V4 — builds on DeepSeek's strong price-performance and ultra-cheap cache pricing, engineering byte-stable prefixes and cache-reusing forks so cross-session memory and a continuous self-correction layer add almost no token cost; 1M context, Skills/MCP/Hooks, Claude Code config compatible.

What it solves

Coding agents like Claude Code are expensive and often require accounts or network access that are hard to use in mainland China. Dao Code is an open-source terminal coding agent built around DeepSeek V4, which is cheap, pay-as-you-go, and directly reachable. It aggressively reuses DeepSeek's prefix cache to keep token costs near zero, and adds trustworthy memory plus self-correction so you get a Claude-Code-like experience at a fraction of the price.

How it works

Dao Code runs an agent loop in your terminal: it streams reasoning and answers, calls tools (read/write files, run commands) behind an approval gate, and loops until the task is done. The key engineering is byte-stable system prefixes and cache-reusing forks — the system prompt, tool table, and memory are kept identical so DeepSeek's cache hits at roughly 1/120 the cost of a miss. Memory is distilled at session end and re-verified against your live code at startup to prune stale facts. A reflection layer (challenger, refocuser, reply-challenger) runs on those cache-reusing forks to catch drift and stuck loops without extra spend. For long tasks it auto-compacts context, snapshots the working tree in a shadow git repo, and can verify completion with a Definition-of-Done check.

Who it's for

Developers who want an autonomous coding assistant in the terminal — especially those in mainland China or on a budget — who want a Claude Code alternative that is open source, MIT-licensed, and works with DeepSeek's low pricing. It suits anyone doing everyday code reading, editing, command running, and bug fixing with tight cost controls.

Highlights

  • Aggressive prefix-cache engineering: 95.8% cache hit on real OSS bug-fix tasks, cutting input costs by ~120x on hits
  • Measured on SWE-bench-style tasks and Terminal-Bench 2.1: 13/14 and 70/89 (78.7%) solved/passed
  • ~30x cheaper than Claude Opus 4.8 and ~18x cheaper than Sonnet 4.6 on the same token trace (official rates)
  • Cross-session memory that verifies against live code, pruning stale facts and flagging changes
  • Reflection layer with challenger and refocuser to prevent drift and stuck loops, all on cache-reusing forks
  • Long-task robustness: crash recovery, shadow git checkpoints, todo persistence, stuck detection, autonomous /goal mode
  • Fully open source (MIT), with a rich terminal TUI: Taiji splash, steering input, diffs, slash commands, subagents, MCP, hooks, and more

Related

  • Project
  • Project
  • Project
  • Project
  • Project