A Go rewrite that treats DeepSeek's prefix cache as a first-class citizen
Reasonix is a terminal coding agent engineered to keep long-running sessions cheap by never invalidating the prompt cache.
What it does
Reasonix is a config- and plugin-driven AI coding agent that runs in your terminal. You chat with it or fire off tasks (reasonix run "implement the TODOs"), and it reads, edits, and executes code on your behalf. Everything is declared in TOML — models, tools, permissions, MCP plugins — with secrets pulled from environment variables so they never touch disk.
The interesting bit
The project is explicitly “tuned around DeepSeek’s prefix cache.” That means the architecture tries to keep the initial prompt prefix stable across turns so DeepSeek can reuse cached tokens and you don’t burn money on long sessions. It’s a rare case of an agent framework optimizing for a specific provider’s billing mechanics rather than just model capabilities. The Go rewrite (1.0, main-v2) also ships as a single static binary with zero runtime dependencies beyond a TOML parser — cross-compiled to six targets with one make cross.
Key highlights
- Two-model collaboration: Optionally pair a fast executor (e.g., DeepSeek Flash) with a slower planner (e.g., DeepSeek Pro) in separate, cache-stable sessions.
- MCP-native plugins: External tools speak stdio JSON-RPC or Streamable HTTP; existing
.mcp.jsonfiles drop in and work field-for-field. - Sandboxed writes: File-writers are confined to
workspace_rootwith symlink/..resolution to prevent escape; macOS bash gets Seatbelt jail, though Linux sandboxing is still to come. - Custom slash commands: Markdown prompt templates in
.reasonix/commands/become/review,/git:commit, etc., with$ARGUMENTSexpansion. - @ references with autocomplete:
@path/to/fileinjects file contents;@server:uripulls MCP resources; typing@or/opens a hierarchical picker.
Caveats
- The 1.0 Go rewrite is not yet on npm despite the README still advertising
npm i -g reasonix; you currently build from source. - Linux sandboxing for
bashis unimplemented — falls back to unconfined execution with an escape prompt. - The project is young enough that the TypeScript 0.x branch is “legacy” and maintenance-only after a ground-up rewrite.
Verdict Worth a look if you’re already paying for DeepSeek and want a terminal agent that thinks about your token bill. Skip it if you need mature Linux sandboxing or a polished one-click install today.