Code
TurboLLM Code is a local coding agent that works directly in a real repo folder — reading files, editing code, running commands, and reporting diffs. Built on pi's SDK, fully offline, no cloud key needed. It runs on whatever model you've loaded on your own GPU.
How it works
Open Workspace → Code in the TurboLLM UI. Pick a repo folder, and the agent starts working inside it. It can read files, make edits, run bash commands, and report a real diff — all in a single session that stays connected to your local model.
Real repo, real diffs
Works in an actual git repository. Every edit produces a real diff you can review, revert, or commit.
Optional worktree isolation
For safety, Code can work in an isolated git worktree — changes are clean, and you decide when to merge.
Terminal feel
Dense, fast interface inspired by opencode and pi — flat tool-call lines, real stats footer, loaded-resources header.
Full tool access
Read, grep, find, bash, edit, write — plus MCP tools from your marketplace, and skills from your library.
Session management
Code sessions are persistent and organized in the sidebar. Create new sessions, archive old ones, filter by status, or clear the archive. A session can be resumed later — nothing is lost.
Archive & resume
Archive a session to clear the view without losing work. Resume it later to pick up where you left off.
Branching via revert
Revert to any past message to branch the conversation — the reverted tail is discarded but restorable with /resume.
Session export
Export a session's transcript for reference or sharing.
Thinking control
A real token-budget slider (0–16k tokens) controls how much reasoning the model does. Turn thinking on for deep reasoning with collapsible thought blocks, or off for direct answers. The slider is enforced server-side — what you see is what the model gets.
Context management
Long sessions fill the context window. TurboLLM handles this automatically:
Auto-compaction
When the context nears its limit, the agent summarizes earlier turns and keeps the conversation going — no hard crash.
Manual
/compactForce a compact at any time. A prominent accent banner shows progress while it runs.
The status footer shows real-time context usage as you go — tokens consumed, percentage of the window, and a live ring chart. No guessing.
Tools & the approval gate
Before any tool executes, an approval bar appears with four choices:
Deny
Block this call.
Allow
Permit this one call.
Allow for this session
Auto-allow this tool for the rest of the session.
Always Allow
Auto-allow it everywhere from now on.
Per-tool defaults live in Developer → Tool permissions. Tools are visually labeled as read or write so you always know what's at stake.
Subagent delegation
Code can delegate tasks to subagents — parallel workers that run independently and report back. This is useful for multi-file refactors, searching across large codebases, or running independent analyses in parallel.
Git actions
Code can stage, commit, and push changes directly. The sidebar shows the current branch, any uncommitted changes, and the status of the last commit.
Performance
Every turn shows real per-turn token counts and tokens/sec — measured from actual generation on your GPU, not estimated. A loop-breaker prevents the agent from getting stuck on repeated identical tool calls (auto-breaks after 3 consecutive duplicates).
VS Code extension
A first-party VS Code extension embeds the TurboLLM Code UI directly inside the editor. It loads as an unpacked extension today, with Marketplace publishing deferred. The extension iframes the Code workspace in the TurboLLM activity-bar container, pre-fills the repo picker from your workspace folder, and stores your API key in VS Code's SecretStorage.
Open VS Code → Extensions → "Load unpacked extension" → point at the turbollm-vscode/ folder from your TurboLLM install. The extension appears in the activity bar as a TurboLLM icon.
MCP server
Any MCP-compatible tool can delegate a coding task to TurboLLM via turbollm mcp-server. One tool, delegate_code_task: hand it a repo path and a task description, and it runs a full Code session synchronously, returning the result. A fresh scratch session is created per call — no second daemon involved.