A harness optimized to smaller LLMs
A coding agent tuned for small local models, built on top of pi.
The research story behind all this — why scaffold–model fit matters, how a 9.7 B Qwen beat frontier entries on Aider Polyglot, and what the load-bearing mechanisms actually do — is written up on Substack: Honey, I Shrunk the Coding Agent. Start there if you want the "why"; stay here for the "how".
pi is the minimal substrate — agent loop, multi-provider API, TUI, session tree, compaction, extension model. Four built-in tools (read / write / edit / bash) and a ~1000-token system prompt.
little-coder is pi + 30-odd extensions + 30 skill markdown files + a Python benchmark harness. It doesn't fork pi or shadow its CLI — pi is a plain dependency in package.json, and everything little-coder-specific lives under .pi/extensions/, skills/, and benchmarks/. It ships no npm install scripts; the launcher does everything at launch time.
The launcher runs pi with --no-extensions and wires in exactly the bundled set. That's what keeps the cold-start context around 7k tokens and makes behavior predictable — the set that loads is the set that ships, and nothing in your working directory changes it mid-task. The consequence is that a globally pi install'd package won't load inside little-coder by default, because pi install registers into pi's settings and --no-extensions skips those.
You have three opt-in ways around that, none of which change the default: drop your own extensions in ~/.config/little-coder/extensions/, point LITTLE_CODER_EXTRA_EXTENSIONS at files anywhere, or relaunch with --with-pi-extensions to let pi discover its own. Run /extensions to see what's loaded. Full guide: Extending little-coder. (Themes are unaffected — pi themes have always loaded.)
If you've never used pi, it's useful to skim pi.dev first — the rest of this doc assumes pi's model of --agent-import-path, --mode rpc, and .pi/extensions/ auto-discovery.
One-line install (Node.js 22.19+ required):
curl -fsSL https://raw.githubusercontent.com/itayinbarr/little-coder/main/install.sh | bashOr with npm directly:
npm install -g little-coderOr with bun:
bun add -g little-coderThat's the whole install. No clone, no npm install in a workspace, no PATH fiddling. little-coder is now on your PATH and works from any directory.
Note for
bun add -gusers. The launcher (bin/little-coder.mjs) is a Node.js script with#!/usr/bin/env nodeat the top, so Node ≥ 22.19 still has to be on your PATH for the binary to start — bun is fine for installing/updating the package, but the runtime is Node. If you want a fully node-less setup, replace the shebang in$(bun pm bin -g)/little-coderwith#!/usr/bin/env bun.
cd ~/your-project
little-coder # launches the default model (see below)
little-coder --model llamacpp/qwen3.6-35b-a3b # or name one explicitlyThis is the canonical setup little-coder is tuned for: a local llama.cpp server hosting Qwen3.6-35B-A3B. See Local model setup (optional) below for how to serve it.
Bare little-coder (no --model) launches the default model declared in models.json ("default": "llamacpp/qwen3.6-35b-a3b" out of the box), printing its friendly name at startup. This only kicks in on a first run — once you pick a model in-session, that choice sticks and the default never overrides it. Change the default with a default key in your user override file. See Configuring models.
Cloud models work the same way:
little-coder --model anthropic/claude-haiku-4-5
little-coder --model openai/gpt-4o-mini "What does this codebase do?"
little-coder --model ollama/qwen3.5 # local Ollama
little-coder --model lmstudio/local-model # local LM Studio (whatever model you have loaded)
little-coder --list-models # see everything pi knows aboutThe agent uses the directory you launched it from as its working directory — Read / Write / Edit / Bash operate on your project, not on little-coder's install path.
◆ PLAN MODE indicator shows below the input), or launch with --plan-mode (LITTLE_CODER_PLAN_MODE=1) to start there. Submit a request and little-coder researches it with sub-coders, asks you 1-3 clarifying questions (each with suggested answers and a free-text option), then writes a plan in the chat instead of editing anything. Approving it saves the plan to .pi/approved-plan.md and stops there; /implement is what switches to the action model, opens a fresh session seeded with the plan, and starts the work, so the research and Q&A that produced the plan do not eat the context the implementation needs (#98). Esc cancels a plan mid-run. (shift+tab stays pi's thinking-level cycle.)/deep-research <topic>) to scope a topic into a research brief, fan out read-only research sub-coders, and get back one cited markdown report, saved next to your working directory. The research children run in an ephemeral scratch directory, not your project, so f2 is for external and online research, not for exploring the code you are sitting in (#100); use a normal session or dispatch for that. Esc cancels mid-run./hotkeys is the full reference. ctrl+o expands tool output ("more"), ctrl+t toggles thinking blocks, ctrl+p cycles models./skills lists what is loaded and what each costs, /skills <tool> pins one when the selector keeps picking a different card, and /skills off returns to automatic selection (#118).dispatch) — little-coder can spawn isolated child sessions to research a question (read the repo + browse online, read-only) and report back concisely, without cluttering the main conversation. A live panel above the input tracks them. Sub-coders run serially by default (two of them contend for the same local model server and finish slower than one); opt into parallelism with LITTLE_CODER_SUBCODER_CONCURRENCY=2 or more.ShellStart) — long commands (training, builds, servers, watchers) run in the background instead of blocking a turn, and little-coder wakes the model on events in the job rather than on a timer. A footer line shows what's running. See Background jobs below./plan-model and /action-model. See Per-phase model selection below./name) and shown in the terminal tab title. Use /resume to list and reopen past sessions for the current directory.~/.config/little-coder/extensions/ and they load on the next launch. Run /extensions to see what's loaded and where it came from. See Extending little-coder.The footer at the bottom of the screen looks like this:
↑26k ↓5.4k R447k CH99.8% 9.3%/262k (auto) qwen3.6-35b-a3b • medium| Field | Meaning |
|---|---|
↑26k |
Cumulative input tokens billed as fresh across the whole session — not your current context size |
↓5.4k |
Cumulative output tokens generated |
R447k |
Cumulative tokens read from cache (the prefix your server didn't have to reprocess) |
W… |
Cumulative cache-write tokens; only shown when non-zero |
CH99.8% |
Cache-hit rate of the latest response alone — cacheRead / (input + cacheRead + cacheWrite). Not a session average, so it moves turn to turn |
9.3%/262k |
Current context usage against the window size. Amber above 70%, red above 90% |
(auto) |
Automatic compaction is enabled |
| right side | Active model, and its thinking level if it's a reasoning model |
A low CH on a long conversation means your server is reprocessing history it should have been able to reuse — worth investigating.
For local providers (llama.cpp, Ollama, LM Studio) pi expects some value in the API-key env even though local servers ignore it:
export LLAMACPP_API_KEY=noop
export OLLAMA_API_KEY=noop
export LMSTUDIO_API_KEY=noopLLAMACPP_BASE_URL, OLLAMA_BASE_URL, and LMSTUDIO_BASE_URL override the defaults (http://127.0.0.1:8888/v1, http://127.0.0.1:11434/v1, http://127.0.0.1:1234/v1).
For cloud providers, set the standard env (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) and pi will discover it.
Skip this section if you're using a cloud model.
Option A — llama.cpp (fastest for local; supports Qwen3.6-35B-A3B MoE):
…If you only need text and want to skip the projector download, drop the second hf download line and the --mmproj flag — little-coder still works text-only, but the TUI's image attachment will be rejected by the server with a 4xx.
Context window. -c sets the server's context (-c 16384 = 16K above — a conservative default for 8 GB VRAM). little-coder auto-detects the live n_ctx from llama.cpp's /props at startup and registers the model with it, so whatever you pass to -c is what the TUI shows and budgets against — no models.json edit needed. To run larger, relaunch the server with e.g. -c 131072 (128K) or -c 262144 (256K); the KV cache grows with it, so size it to your RAM/VRAM. (--list-models reflects the detected window.)
Option B — Ollama (simpler, but slower on MoE):
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3.5 # 9.7B — the paper's model
# or: ollama pull qwen3.6:35b-a3bOption C — LM Studio (GUI; OpenAI-compatible server on port 1234):
http://127.0.0.1:1234).export LMSTUDIO_API_KEY=noop
little-coder --model lmstudio/local-modellmstudio/local-model id routes to whatever model LM Studio currently has loaded — no extra config needed for the single-model case. If you serve on a non-default port, set LMSTUDIO_BASE_URL=http://127.0.0.1:<port>/v1. To target a specific model when you have several loaded, add an entry to ~/.config/little-coder/models.json (see Configuring models below).Serving from another machine on your LAN. Each provider's *_BASE_URL env var accepts any host, not just 127.0.0.1, so you can run inference on a beefier box and connect from a laptop or another device on the same WiFi.
On the server (the box with the GPU):
llama-server with --host 0.0.0.0 (or your specific LAN interface) instead of `12No open issues yet, or sync has not completed.