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

Dao Code is a terminal-native AI coding assistant designed to provide a high-capability coding agent experience while minimizing token costs and maximizing availability. It specifically targets the DeepSeek V4 model to leverage its price-performance ratio and prefix-caching capabilities, offering an alternative to tools like Claude Code that may have higher costs or accessibility barriers in certain regions.

How it works

The agent operates in a loop: it streams reasoning and answers via the DeepSeek V4 API, requests tool calls (such as reading/writing files or executing shell commands), and passes these through an approval gate for safety. To keep costs low, it uses "byte-stable" system prefixes and cache-reusing forks for reflection and memory tasks, ensuring high cache hit rates. It also features a self-verifying memory system that distills preferences and project conventions across sessions and verifies them against live code upon startup.

Who it’s for

It is built for developers who want a powerful, terminal-based AI coding agent that can autonomously handle long tasks, fix bugs in real-world open-source repositories, and operate with significantly lower costs than top-tier closed-model alternatives.

Highlights

  • Cost Optimization: Leverages DeepSeek's prefix cache to achieve high hit rates (up to 95.8% in tests), making it significantly cheaper than Claude Opus or Sonnet.
  • Long-Task Robustness: Includes session logs for crash recovery, shadow-git checkpoints for easy reverts, and a "Definition-of-Done" verification system to prevent goal drift.
  • Self-Correcting Reflection: Employs a "Challenger" and "Refocuser" layer to question premises and curb scope creep during long autonomous runs.
  • Extensible System: Supports MCP (Model Context Protocol), custom subagents, slash commands, and a flexible permission system (allow/ask/deny) for tool execution.
  • Terminal Experience: Features a rich TUI with syntax highlighting, thinking blocks, and "steering" capabilities to queue inputs while the agent is running.