← all repositories
Hmbown/CodeWhale

A terminal agent that ranks truth above user intent

It’s a terminal harness that stops DeepSeek V4 from drifting by binding it to a formal hierarchy of law to resolve conflicting instructions.

CodeWhale
Velocity · 7d
+28
★ / day
Trend
cooling
star history

What it does CodeWhale is a pair of Rust binaries — a dispatcher CLI and a TUI runtime — that turn DeepSeek V4 into a terminal-native coding agent. It edits local workspaces, streams reasoning blocks, and gates destructive actions behind user approval. The whole system is built around the idea that an agent needs a “harness” of rules and feedback loops, not just a model call.

The interesting bit The harness is literally a Constitution (prompts/base.md) with seven articles and a nine-tier hierarchy of authority. When user intent conflicts with stale project rules or tool output, the model knows exactly which source wins — live verification outranks assumptions, and the duty of truth is non-negotiable even against user requests. DeepSeek V4 helped write this constitution, and because V4’s prefix caching makes the long document cheap to re-read each turn, the model treats it like an open-book reference rather than a memorized prompt.

Key highlights

  • A cheap deepseek-v4-flash “Fin” call auto-routes each turn to the right model and thinking level
  • Sub-agents run concurrently (up to 20) with non-blocking launch and bounded transcript retrieval
  • Every turn snapshots the workspace to a side-git repo for /restore or revert_turn
  • Post-edit LSP diagnostics from rust-analyzer, pyright, gopls, and others feed back into context
  • macOS Seatbelt sandboxing is active; Linux Landlock is detected but not yet enforced

Caveats

  • Sandbox coverage is uneven: macOS Seatbelt is active, Linux Landlock is detected but not enforced, and Windows sandboxing is not yet advertised
  • The Homebrew formula still uses the legacy deepseek-tui name
  • The feature set — auto mode, Constitution, and cost routing — is built specifically around DeepSeek V4; other providers are not discussed

Verdict Developers who want a terminal-native DeepSeek V4 agent with built-in guardrails, automatic cost routing, and per-turn rollback will find this a structured alternative to raw API chat. If you need broad model provider support or fully cross-platform sandboxing, look elsewhere.

Frequently asked

What is Hmbown/CodeWhale?
It’s a terminal harness that stops DeepSeek V4 from drifting by binding it to a formal hierarchy of law to resolve conflicting instructions.
Is CodeWhale open source?
Yes — Hmbown/CodeWhale is open source, released under the MIT license.
What language is CodeWhale written in?
Hmbown/CodeWhale is primarily written in Rust.
How popular is CodeWhale?
Hmbown/CodeWhale has 40k stars on GitHub and is currently cooling off.
Where can I find CodeWhale?
Hmbown/CodeWhale is on GitHub at https://github.com/Hmbown/CodeWhale.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.