DeepCode

HKUDS · open source · model-agnostic

Open
agentic
coding.

A coding agent that lives where you work — a terminal-native TUI, a desktop app, and a headless CLI over one shared runtime. Your sessions, skills, and memory stay on your machine.

$ pip install deepcode-hku github.com/HKUDS/DeepCode →
DeepCode · open agentic coding
deepseek/deepseek-v4-pro · ~/proj/app
 
fix the failing auth test, then run the suite
 
Read tests/test_auth.py
1: import pytest
Plan 1/3
✓ reproduce the failure
▸ patch the token-expiry check
◦ run the full suite
Edit src/auth/session.py
session.py
Run pytest -q
214 passed in 8.3s
 
The expiry check compared naive and aware datetimes; normalized both to UTC.
· 41s · 38.2k in · 512 out
Surfaces
one runtime · four ways in

Every surface reads the same session.

Start a conversation in the terminal over lunch, open it in the desktop app in the afternoon. Sessions, skills, permissions, and history are one shared record — not four copies.

›_Terminal TUI

Streaming tool cards, a live status line, plan checklists, and a settled-turn footer with real token costs. Works over SSH. python -m cli.tui

Desktop

A Tauri app over the same runtime: threads, approvals, skills, automations, and settings — with the identical session IDs the CLI uses.

Headless

One-shot execution that streams structured events for scripts and CI. deepcode exec --json

MCP & automations

Expose DeepCode as an MCP server, schedule goal-driven runs, and let a goal loop work an objective against a real test command.

Runtime
engineering you can measure

The context the model sees is a discipline,
not an accident.

DeepCode treats the request as something derived from the session record — append-only, reconstructable, and priced by what the provider actually reports. These numbers are from the changelog, not the brochure.

7,420 → 28
prompt tokens recomputed per turn boundary

The environment block is a durable slot in history, so a new turn extends the previous request instead of invalidating its prefix cache.

1 live writer
per session · enforced by an OS lock

Two windows on one session alternate safely; a mid-turn collision gets a sentence naming who is running it — not a crashed process.

measured, not guessed
context pressure anchored on provider usage

The built-in estimator prices Chinese prose at more than twice its real cost; the gate now trusts the number the provider reports.

tools survive resume
model-visible means logged

Every request must be rebuildable from the session file alone — a resumed agent can answer “what did you just run?”, and a test keeps it that way.

Compaction keeps the recent tail verbatim — assistant messages and tool results included — and replays correctly after resume. Each claim above ships with its regression test.

Skills · Memory · Goals
what it keeps between conversations

Local state that compounds.

Skills

Progressive-disclosure playbooks in .agents/skills/ — the open Agent-Skills format, so a skill written for Claude Code or Codex works here too.

Memory & instructions

Reads AGENTS.md from repo root to workspace and keeps durable notes under .deepcode/memory/, indexed and injected each session.

Goals

Hand it an objective and a test command; the loop works, verifies against your tests, and reports — interruptible and resumable at any point.

Evolve in development

An opt-in loop that distills your own sessions into project skills — every learned skill carries provenance, passes a guardrail check, and reverts with one click.

Quickstart
three commands to a first session
# install
pip install deepcode-hku
 
# set up providers once (OpenAI · Anthropic · OpenRouter · DeepSeek · Ollama …)
deepcode init
 
# converse in any project directory
deepcode