๐ง TF Code, rebuilt: 284x faster to start, 47x lighter, and safer by default
Released on November 28, 2026
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. ๐
๐ฅ๏ธ 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, same tool code paths:
- 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.
| Metric | Claude Code | TF Code | Difference |
|---|---|---|---|
| Billed prompt tokens (small task, n=5) | 7,142 | 2,528 | 64.6% fewer |
| File reads, five runs of a three-file task | 35 | 16 | 2.2x fewer |
| Passes to green, 12-file refactor (n=3, both 9/9) | 23 | 9 | 14 fewer |
| Peak memory, headless single turn | 256 MB | 46 MB | 5.4x less |
| Peak CPU, headless single turn | 68% | 13% | 5x less |
| Cache read rate (small task, n=5) | 91.7% | 96.6% | 4.9 points higher |
- Billed means billed โ a prompt token not served from cache. Same model, same backend, same hardware.
- It reads once and keeps it โ three files, five runs, never more than four reads: 16 against Claude Code's 35, every run.
- Fewer passes to green โ when TF Code finds the layering it finishes a 12-file refactor in 9 passes. Claude Code's fastest ever is 23, on identical 9/9 correctness.
- Roughly five more agents per box โ 46 MB peak against 256 MB, and a fifth of the CPU per turn, so the fan stays quiet while you work.
- The model sets your ceiling; the harness sets your bill โ a 64% cut 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.
context.trim_tokensโ drops the oldest exchanges from the request before it is sent, with no model call and nothing persisted.compaction.gate_tokensโ compacts once the reported context reaches an absolute threshold, long before the model window forces it. Useful 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.
๐ Documentation: Compaction
โจ 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/andscripts/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_searchandquestionare exempt from the lean allowlist, so a lean session can still load the workflows its prompt advertises - Agents can author their own skills โ
skill_managegainedfiles,read_file,write_fileanddelete_file, with path-traversal protection - Every skill is a slash command โ and a skill's
aliasesadd extra names, which is how short commands survive from earlier versions
๐ Documentation: Skills
๐ 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:
tfcode mcp pending
tfcode mcp approve <name>
tfcode mcp reject <name>
- Decisions are keyed to a content fingerprint โ approving
npx tool@1does not silently approve a later edit that turns it into something else. 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 runexits before the engine boots rather than guessing, and--autodoes not bypass it, because auto-approving tool calls is not the same as auto-running a repository's own command. - 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.
What's New:
- Scoped filesystem access โ
workspace,tmp,cacheandhome, 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) oropen - 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
tfcode sandbox doctorโ human-readable and--json, exiting non-zero when a profile is enabled but unenforceable
๐ Documentation: MCP Servers ยท Sandbox
๐ 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.
tfcode extension link ~/src/writing-companion
tfcode extension install https://github.com/you/writing-companion
tfcode extension approve guardrails
Key Features:
- No build step โ TypeScript is transpiled in-process, so you save a
.tsfile and it runs on the next session. No Bun, no Node, nonpm run build linkfor live editing,installfor a fixed snapshot โ link reads through your working copy; install copies it into the store- Digest-gated trust โ a code-bearing bundle shows
needs approvaluntil you approve it at its current digest, and a new version changes the digest - Nothing runs invisibly โ with the perk off, an installed extension is listed as
inertand contributes nothing - A guided path โ
tfcode extension newscaffolds a working bundle with one complete file per contribution surface
๐ Documentation: Extensions ยท Authoring an extension
๐จ 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 (visual direction, first-slide picks, fonts) 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
design/<project>/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 "make the title bigger" 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 it with tfcode tfdesign setup --install, and nothing extra is loaded if you do not need design work.
๐ Documentation: TF Design
๐ ๏ธ Improvements & Fixesโ
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 channel and routine alongside kanban boards. Switch with /agents (<leader>a) or --agent; Tab now toggles Plan/Task mode rather than cycling agents.
Capability toggles are now perksโ
plugin_recommend is now perk_recommend, matching the perks it actually manages: email, scheduler, vibeguard, goal, loops, notifications, gateway, browser, computer use, voice, session search, mailbox, cloud delegation, escalation, extensions and TF Design. The legacy name still resolves, and builtin.* config keeps working as a read-only fallback.
MCP status rendering fixedโ
/mcp/status had briefly returned a nested object under status instead of the status string, which made MCP servers render as disabled in the web app and the TUI. It keeps its flat shape; provenance and approval state live on their own /mcp/provenance route, so existing clients are unaffected.
OpenAI Responses API for Codex CLIโ
ToothFairyAI now accepts POST /v1/responses, the wire format Codex CLI uses since it dropped Chat Completions support. Point Codex at https://ais.toothfairyai.com/v1 with wire_api = "responses" and it runs against your workspace with no proxy, reasoning events rendered inline.
๐ API Documentation: Responses API
Decision models: Drexโ
A new class of API-only model that does not write prose. Send a state plus typed questions โ yes/no, multiple choice or ordered scale โ and get a calibrated probability per option in a single forward pass, ready to compare against a threshold. drex-max covers general decisions including computer-use screenshots; drex-max-finance is tuned for banking, payments, insurance, credit and compliance work.
๐ Documentation: Decision Models
Sovereign model catalogue on the websiteโ
The site now lists which open-weight models are served in which region, so you can see exactly where a model runs before choosing it.
๐ Summaryโ
This update includes:
- Rust engine - TF Code rebuilt on a static binary: 284x faster cold start, 47x less memory, and a TUI drawn directly to the terminal
- Claude Code benchmark - Same model, same hardware, harness the only variable: 64.6% fewer billable tokens, 5.4x less memory and 5x less CPU per turn
- Long-context control - Trim requests and gate compaction on absolute token counts, with first-token budgets that scale with prompt size
- Searchable skills -
skill_search, nine bundled skills, andreferences/plusscripts/living with the workflow - Lean mode - A minimal tool surface that still reaches skills and questions
- MCP approval gate - Repository-declared servers need an explicit, fingerprinted decision, and headless runs fail closed
- OS sandbox - Seatbelt and Landlock containment for every shell with allow-listed network egress
- Extensions - Versioned bundles of tools, commands, agents, skills, hooks, MCP and LSP servers, behind a trust gate
- TF Design - Integrated into the engine, with question passthrough, repo-local artifacts and PPTX/PDF export
- TF Manage agent - A fourth agent for projects and agents, and the default renamed to TF Build
- Perks -
perk_recommendas the single toggle for every capability - Responses API - Codex CLI support on
/v1/responses - Decision models - Drex, for calibrated probabilities instead of prose
Thank you for using ToothFairy! We're constantly working to improve your experience. If you have any feedback or encounter any issues, please don't hesitate to reach out to our support team at support@toothfairyai.com.
Keep building magic with AI! ๐งโโ๏ธโจ
v0.709.0