Four weeks of work on a single question: what happens if we stop tuning the old engine and rebuild it instead? The answer is TF Code on a new Rust core — one static binary, no runtime, milliseconds to start — alongside searchable skills, an MCP approval gate, an OS-level sandbox, installable extensions, and TF Design as a first-class capability.
Everything below shipped in the last four weeks and is live today. Nothing here is a roadmap.
🖥️ A new engine: TF Code rebuilt in Rust
The old engine was built on a bundled JavaScript runtime, and that choice set a floor under everything the product could do: a fixed startup tax, a high memory floor, and latency tails you could not schedule around. Those are properties of the runtime, not of our code, so tuning would have moved the numbers by percentages, not multiples.
So we rewrote it. TF Code now ships as one static binary with zero runtime dependencies — no interpreter, no module resolution, no node_modules to load. This is a structural change you can feel in the terminal, in the desktop app, and anywhere TF Code runs headless.
Measured on identical hardware, running the same tool code paths in both versions:
- CLI cold start — 2,074.8 ms down to 7.3 ms (284x faster)
- CLI peak memory at startup — 462 MB down to 9.8 MB (47x less)
- Server boot to first healthy response — 2,964 ms down to 229 ms (12.9x faster)
- Server idle memory — 524 MB down to 33 MB (15.9x less)
- Database-backed throughput — 452 req/s up to 1,529 req/s, with p99 latency down from 132.2 ms to 17.8 ms
- Runtime dependencies installed — 92 packages down to zero
What changes day to day:
- The agent stops being the heaviest thing on your machine — a few megabytes idle instead of hundreds, so it sits alongside your editor, test watcher and language servers without competing with them
- Commands feel like commands — milliseconds to start, so using TF Code from a git hook, a script or an editor plugin no longer adds a noticeable pause
- Long sessions stay consistent — no garbage-collector pauses and no tail that widens as the day goes on; memory under sustained load drops from a ~160 MB floor to roughly 6 MB
- The TUI is drawn directly to the terminal — keystroke response and memory no longer scale with session history, which is why the desktop app and the TUI both feel tighter on long conversations
- It can be embedded — a bounded, fast local process is what makes server mode practical inside other tools, not just as an interactive CLI
Measured against Claude Code: the harness is half the bill
Almost every lab is optimising the model. Almost nobody is optimising the harness around it. So we benchmarked the new release against the latest Claude Code CLI — same model, same backend, same hardware, same task. All 20 runs scored 4/4 correct, so the only variable was the harness.
- Billed prompt tokens — 2,528 against 7,142, which is 64.6% fewer. Billed means a prompt token not served from cache, on the same model and the same backend
- File reads — 16 against 35 across five runs of a three-file task: never more than four reads in a run, because it reads once and keeps it
- Passes to green — 9 against 23 on a 12-file refactor, on identical 9/9 correctness; Claude Code's fastest ever is 23
- Peak memory — 46 MB against 256 MB on a headless single turn, so roughly five more agents fit on one box
- Peak CPU — 13% against 68%, about a fifth per turn, which means the fan stays quiet while you work
- Cache read rate — 96.6% against 91.7% on the small task, over five cumulative runs
Two honest caveats. Headless latency is a draw, not a win: Claude Code's fastest run was 2.95 seconds against our 4.80, but the ranges overlap and model variance swamps both. And these are small samples — five runs on the token task, three on the refactor — so treat the direction as the finding rather than the third digit. We publish the methodology either way.
The point is not that one CLI beat another on a micro-benchmark. It is that the model sets your ceiling while the harness sets your bill. A 64% cut in tokens is the difference between an agent you can put in front of every employee and one you ration to three power users.
Long-context work without the surprise bill
Large contexts spend most of their time pre-filling before the first token appears. We rebuilt that path around explicit controls rather than hoping the window never fills.
- Trim the request — context.trim_tokens drops the oldest exchanges before a request is sent, with no model call and nothing persisted
- Gate compaction on an absolute count — compaction.gate_tokens compacts once the reported context reaches a threshold, long before the model window forces it, which is what you want on million-token models where you would rather pay for a summary than a million-token prefill
- Trim below the gate — a common layout keeps a large session shrinking on the wire so it never needs a summary at all
- Scaled first-token budgets — the allowance grows with prompt size (60s under 400k tokens, rising to 240s at 800k and above), so a big context is no longer cut off by a limit meant for small ones
✨ Skills you can actually find
A skill nobody can discover is just a file in a repository. Skills are now searchable, bundled, and cheap enough to keep a large catalogue.
Search-first discovery
The new skill_search tool matches a task's own vocabulary against every skill you have — bundled, project, user, ~/.claude, ~/.agents and workspace — using a local hashed n-gram matcher. No network call, no model, and a paraphrase is enough: "ship this to prod" finds the deployment skill even though it never uses the word "ship".
Nine skills inside the binary
review, batch, simplify, stuck, init, loops, models, tf-migrate-agent and reverse-engineer (also reachable as /rea) now ship with TF Code. They are ordinary skills — read them, copy them into .tfcode/skill/, or replace them with your own version of the same name.
Key features:
- References and scripts belong with the skill — references are read only when needed, scripts are executed and never loaded into context, so a workflow can carry real helpers without bloating the prompt
- Roughly 1,500 tokens saved per request — above eight skills the catalogue switches to a compact list and points at skill_search
- Lean mode keeps skills reachable — skill, skill_search and question are exempt from the lean allowlist, so a lean session can still load the workflows its prompt advertises
- Agents can author their own skills — skill_manage gained file listing, reading, writing and deleting, with path-traversal protection
- Every skill is a slash command — and a skill's aliases add extra names, which is how short commands survive from earlier versions
🔐 Safer by default: MCP approval and an OS sandbox
Two new layers, both answering the same question: what happens when the code you are running was not written by you?
Repository-declared MCP servers need approval
A tfcode.json in a repository is a config source, so cloning a repository was enough for it to declare an MCP server whose command then ran with your privileges. That no longer happens. Repository-declared servers sit in needs_approval until you decide, and you can inspect exactly what would run with tfcode mcp pending before approving or rejecting it.
- Decisions are keyed to a content fingerprint — approving npx tool@1 does not silently approve a later edit that turns it into something else, while cosmetic reordering does not re-prompt
- Per project, not per repository — approving a server in a directory you opened does not vouch for a clone you have never looked at
- Headless runs fail closed — tfcode run exits before the engine boots rather than guessing, and auto-approving tool calls does not bypass it, because that is a different decision
- Servers you configured yourself are never challenged — put one in your global config and it stays trusted in every project
OS-enforced shell sandbox
Permissions decide whether a command may run; the sandbox decides what a running command can reach. With a profile enabled, an approved bash command can only read the paths you allow, write the paths you allow, and reach the network destinations you allow — enforced by Seatbelt on macOS and Landlock on Linux, including nested shells and subprocesses.
- Scoped filesystem access — workspace, temp, cache and home, with common toolchain directories readable by default and everything else requiring an explicit entry
- Three network modes — none (every socket refused), proxied (only allow-listed hosts, through a local audited broker) or open
- Proxied egress you cannot accidentally bypass — the broker validates the destination hostname before connecting, refuses private and loopback destinations, and keeps HTTPS end-to-end
- A repository cannot widen your policy — the sandbox section is read only from trusted configuration, so cloning an untrusted repository never changes your containment
- A doctor command for ops — the sandbox doctor checks the backend and policy, in human-readable form or as JSON for CI, and exits non-zero when a profile is enabled but unenforceable
🔌 Extensions: capability in one installable bundle
An extension is a single versioned bundle that can add tools, slash commands, subagents, skills, hooks, MCP servers, LSP servers and standing context at once. It is enableable per project and gated behind an explicit trust decision, because it can run code.
You can link a bundle from a directory you are still editing, install a snapshot of it, install straight from a git repository, and approve it when it ships code.
- No build step — TypeScript is transpiled in-process, so you save a file and it runs on the next session; no Bun, no Node, no build command
- Link for live editing, install for a fixed snapshot — link reads through your working copy, install copies it into the store
- Digest-gated trust — a code-bearing bundle shows as needing approval until you approve it at its current digest, and a new version changes the digest
- Nothing runs invisibly — with the capability off, an installed extension is listed as inert and contributes nothing
- A guided path — the scaffolding command writes a working bundle with one complete file per contribution surface
🎨 TF Design is now a first-class capability
In this release TF Design is integrated into the engine rather than bolted on beside it, so a design brief becomes part of the same session you are already in.
- Discovery is built in — the agent enumerates TF Design's skills, design systems and media models, so it picks an appropriate style for the brief instead of guessing
- Delegation keeps you in the loop — when TF Design needs a decision, those questions arrive in TF Code's own question UI and the answers flow straight back, while progress is reported and the run is left uninterrupted
- Artifacts land in your repository — finished work is written as plain files into the design directory and stays versioned in the TF Design project, so you review and diff it like any other code change
- Iteration is a conversation — passing a previous project id continues that design, so asking for a bigger title refines the existing artifact instead of starting over
- Export is part of the tool — a finished design exports to PPTX or PDF without leaving the session
Because it adds meaningful capability, TF Design stays opt-in: install the add-on and nothing extra is loaded if you do not need design work.
🛠️ And there is more
- A clearer agent set — the default agent is now TF Build, and a fourth agent joins the line-up: TF Manage organises projects and agents, owning channels and routines alongside kanban boards. Tab now toggles Plan/Task mode rather than cycling agents
- Capability toggles are now perks — the recommend tool is now perk_recommend, matching the perks it actually manages across email, scheduler, goal, loops, notifications, gateway, browser, computer use, voice, session search, mailbox, cloud delegation, escalation, extensions and TF Design; the legacy name still resolves
- MCP status rendering fixed — a nested status object had briefly made MCP servers render as disabled in the web app and the TUI; the flat shape is restored and provenance moved to its own route, so existing clients are unaffected
- OpenAI Responses API for Codex CLI — ToothFairyAI now accepts the Responses wire format, so Codex can run against your workspace with no proxy and with reasoning events rendered inline
- Decision models (Drex) — a new class of API-only model that returns a calibrated probability per option in one forward pass instead of prose. drex-max covers general decisions including screenshots; drex-max-finance is tuned for banking, payments, insurance, credit and compliance
- Sovereign model catalogue on the website — the site now lists which open-weight models are served in which region, so you can see where a model runs before choosing it
Try it
The rebuild is live for everyone — update TF Code and the new engine is what you get, in the terminal and in the desktop app. Start with the TF Code documentation for the upgrade notes, then read the compaction, skills, sandbox and extensions pages for the new controls.
If you are new to ToothFairyAI, create a workspace and install TF Code with: npm install -g @toothfairyai/tfcode
