Cache-first loop
Append-only conversation log keeps the prompt prefix byte-stable across turns, so DeepSeek's automatic cache hits 85–95% — not 40%.
Cache-first agent loop for DeepSeek V4 (flash + pro). Edits files as reviewable SEARCH/REPLACE blocks. Ink TUI. MCP first-class. No LangChain.
$ npx reasonix code
Every abstraction earns its weight against a DeepSeek-specific property — dirt-cheap tokens, R1 traces, automatic prefix caching, JSON mode. Generic wrappers leave these on the table.
Append-only conversation log keeps the prompt prefix byte-stable across turns, so DeepSeek's automatic cache hits 85–95% — not 40%.
Flash-first defaults, turn-end auto-compaction, model self-escalation when (and only when) needed. Per-turn cost badge in the TUI.
Lives in your terminal. Streaming preview, slash commands, plan picker, edit-confirm modal. Plain mode for stubborn Windows shells.
Stdio + HTTP+SSE transports. Live progress notifications. Same cache-safety + repair plumbing as native tools.
Edits arrive as SEARCH/REPLACE blocks; nothing hits disk until /apply. Per-file diff confirm modal, undo history, sandboxed paths.
Context gauge with proactive compaction, oversized tool-result repair, forced-summary fallback near the window edge.
Free credit on signup at platform.deepseek.com.
No install needed.
cd my-project
npx reasonix code
First run walks you through a 30-second wizard (paste API key → pick preset → pick MCP servers).
The model proposes edits as SEARCH/REPLACE blocks — nothing hits disk
until you /apply.
Requires Node ≥ 20.10. macOS, Linux, Windows (PowerShell · Git Bash · Windows
Terminal). Press Esc anytime to abort; /help for the
full command list.
read_file · write_file · edit_file ·
search_files · directory_tree ·
run_command with read-only allowlist. Sandboxed to the
launch root — no path escapes. Plan mode and per-edit review modal.
Committable REASONIX.md for team conventions plus a private
per-user ~/.reasonix/memory/ with global and per-project
scopes. The model can write to it via the remember tool.
Drop SKILL.md files anywhere. Names + descriptions are
pinned in the prefix; the model picks them autonomously, or you trigger
with /skill name.
Shell commands fire at PreToolUse · PostToolUse
· UserPromptSubmit · Stop. Exit code drives
pass / block / warn.
Wizard catalog, or --mcp "name=cmd" to attach stdio /
HTTP+SSE servers on the fly. Live progress bars on long calls.
web_search + web_fetch via Mojeek — no key, no
signup, off-by-flag for offline / CI. Bring-your-own provider via the
WebSearchProvider interface.
On the same τ-bench-lite workload (8 multi-turn tool-use tasks × 3 repeats =
48 runs per side), live DeepSeek deepseek-chat, sole variable
prefix stability:
| metric | baseline (cache-hostile) | Reasonix | delta |
|---|---|---|---|
| cache hit | 46.6% | 94.4% | +47.7 pp |
| cost / task | $0.002599 | $0.001579 | −39% |
| pass rate | 96% (23/24) | 100% (24/24) | — |
Reproduce without spending an API credit:
git clone https://github.com/esengine/reasonix.git && cd reasonix && npm install
npx reasonix replay benchmarks/tau-bench/transcripts/t01_address_happy.reasonix.r1.jsonl
npx reasonix diff \
benchmarks/tau-bench/transcripts/t01_address_happy.baseline.r1.jsonl \
benchmarks/tau-bench/transcripts/t01_address_happy.reasonix.r1.jsonl
The committed JSONL transcripts carry per-turn usage,
cost, and prefixHash. Reasonix's prefix hash stays
byte-stable across every model call.
npx reasonix code [path] # coding mode scoped to path
npx reasonix # chat (uses saved config)
npx reasonix setup # reconfigure the wizard
npx reasonix run "ask anything" # one-shot, streams to stdout
npx reasonix stats # cross-session cost dashboard
npx reasonix mcp inspect <spec> # probe a single MCP server
Common flags:
--preset <fast|smart|max> # model + harvest + branch bundle
--model <id> # explicit DeepSeek model id
--mcp "name=cmd args…" # attach an MCP server (repeatable)
--session <name> # named session
--no-config # ignore ~/.reasonix/config.json (CI)