dirge — The Batteries-Included Rust Coding Agent
⚡" />
GPL-3.0 · Rust · on crates.io
dirge — The Batteries-Included<br>Rust Coding Agent
Everything on by default — MCP, LSP, ACP , a Janet plugin system ,<br>tree-sitter code intelligence , and self-improving memory . Yet it's<br>native Rust: ~8 MB RAM idle, ~36 MB binary , no runtime.<br>And an agent loop built to keep even small, cheap models on the rails.
▸ Get started<br>→ View on GitHub
8MB RAM idle
36MB Binary size
25+ Built-in tools
8 Providers
dirge — ~/src/voxel
CONTEXT<br>ctx [██░░░░░░░░] 1%
11.5k / 1.0M · cmp:0
ACTIVITY<br>edit voxel.cljs
read voxel.cljs
skill paren-check
bash cd …/voxel
AGENT LOG STREAM<br>add FPS-style mouse-look + wheel height to voxel.cljs
Here's the plan:
1. add :mouseX/:mouseY delta fields to input
2. mousemove + wheel listeners (pointer lock)
3. consume deltas in update-camera, reset per frame
BASH · clojure -M:dev -e "(require 'voxel)"
✓ compiled — 0 warnings
EDIT — voxel.cljs (+2 lines, validated)
- :lookUp false})
+ :lookUp false
+ :mouseX 0.0
+ :mouseY 0.0})
deltas reset each frame ✓ — looks complete
SYSTEM LOAD<br>CPU [██░░░░░░] 24%
MEM [████░░░░] 55%
MCP<br>● chiasmus
● rlm
● wavescope
● lattice
LSP<br>● clojure-lsp
TODOS<br>✓ input delta fields
▸ pointer-lock listeners
○ minimap overlay
MODIFIED<br>voxel.cljs
[$_$]
░▌ add a minimap overlay to the HUD
voxel:main·<br>deepseek-v4-pro·<br>11k/1.0M (1%)·<br>3 msgs·<br>code·<br>running
[*] ON THE NAME
A dirge is a song to keep the dead from losing their way.<br>It turns grief into something that is remembered. Agents are like mayflies<br>awoken for a moment to work and to forget, with every new session effacing<br>the old one. Dirge keeps watch over things said and done, always folding<br>context into memory to carry past mistakes and preferences across<br>the gulf between sessions. It sings the past forward, so that no grave need<br>be dug twice. Dirge grieves for nothing, since nothing is truly buried under<br>its care, and its lament is a promise that what was built here once will be<br>remembered.
[*] WHY DIRGE
Small footprint, serious reliability
Native Rust, no runtime — and an agent loop engineered so cheaper models<br>stay productive instead of derailing.
Terminal-First TUI
ratatui + crossterm. Live token streaming, a branching session tree, and configurable info panes via /display — all keyboard-driven.
Robust Agent Loop
Repairs malformed tool calls, validates every write through tree-sitter before it hits disk, breaks repeat-loops, and — when a model keeps failing — injects a recovery checkpoint, suggests the tool/path it likely meant, then escalates to a stronger model.
One Permission Engine
A single Policy Decision Point with four modes, op-based rules, and session allowlists. The /why command traces exactly which policy decided — and why.
Role-Based Routing
Point the main loop, review, escalation, summarization, and subagent roles at different models. Mix DeepSeek, GLM, Anthropic, OpenAI, and Ollama in one session.
Self-Improving Memory
Two-tier per-project memory — hot facts inline, the rest a searchable breadcrumb index — plus a global cross-project tier for durable preferences, injected as a cache-stable snapshot. A post-session orchestrator extracts learnings and curates memory & skills between sessions.
Long-Horizon Sessions
Durable, incrementally-refreshed checkpoints anchored to a stable identity — so resuming a long, compacted session recovers its live state instead of a stale snapshot. Hold autonomous runs to a natural-language stop condition with --goal. Adapted from MiMo-Code.
Code Intelligence
Tree-sitter semantic tools and inline LSP diagnostics for 10+ languages — surfaced in tool output so the agent fixes compile errors on the same turn.
Extensible at Runtime
A Janet plugin system hooks the full lifecycle — intercept tools, rewrite prompts, register commands — plus Claude-compatible skills loaded on demand.
MCP & ACP
Connect MCP servers for extra tools — or run dirge mcp to be one, so another agent (e.g. Claude Code) delegates implementation tasks to dirge and reviews them. ACP for editor integration with Zed.
Sandbox Mode
Run every bash command in isolation with --sandbox: bubblewrap for a namespaced jail, or a hardware-isolated libkrun microVM — defense in depth on top of the permission engine.
Phased Planning
An opt-in /plan workflow runs explore → plan → implement → review as context-isolated phases: a read-only agent maps the code, a second drafts the plan, then a write-disabled reviewer runs the code and feeds gaps back for a bounded retry.
Spec-Driven Workflow
Align on what before how. The spec tool tracks changes — proposal, requirement deltas, and a task checklist with real status — as SQLite rows, not markdown ; living specs are the current truth, and archiving folds a change's deltas into them transactionally. The active change is injected into context; archiving forms a memory. Inspired by OpenSpec.
Token-Efficient I/O
Tree-sitter...