Fuseway
A local agent company for coding. A local model on my GPU, Claude Code, Codex and Grok work as one team, and the leadership seats, deciding where work goes and planning bigger missions, go to whichever model earns them on measured results.
griffinseibold/fusewayWhy I built it
I use Claude Code and Codex every day, and I have a GPU at home that can run a capable local model. Each subscription has a five-hour window and a weekly one. I kept running one dry while the other, and the GPU, sat idle. Most of what I was spending them on (renames, docs, a small helper and its test) didn’t need a frontier model at all.
I didn’t want to decide by hand which model gets which job, or to trust one model’s opinion of itself. So Fuseway treats the models as a company. Every model, local or frontier, is a candidate for each role, and the important roles go to whoever has the best record on real work. I set the rules and the budget, and I write the tests that decide what counts as done.
How the company is organized
OwnerSets the roster, budget and acceptance tests
Dispatcher
Routes every chat requestLocal model + Haiku
Challengers: Local only · Haiku aloneChat roles
- Planner
- Builder
- Debugger
- Reviewer
- Explainer
CEO
Plans missions, delegates tasksLocal model
Challengers: Claude · Codex · GrokMission workers
- Builder
- Researcher
- Reviewer
- Local model
- Claude Code
- Codex
- Grok
There are two leadership seats, and both are contested.
- The dispatcher decides who answers each chat request. Once a local model is set up, it decides whether the local model can handle the request or it needs a frontier model. It starts as a cascade of the local model and Claude Haiku, with cheaper challengers measured alongside it.
- The CEO takes a larger mission, breaks it into a task graph, and delegates each task to a worker. It starts as the local model. Claude, Codex and Grok can challenge for the seat.
Each seat has its own team. Chat requests go to one of five roles: planner, builder, debugger, reviewer and explainer. Missions are staffed by workers: builders, researchers and reviewers, where only builders can write, and only one at a time. Any enabled backend can fill any mission role: the local model, Claude Code, Codex, or Grok Build, which is opt-in and uses its own CLI sign-in and billing. Each profile can pin an exact model, and local and Codex profiles an effort level.
Everything runs on my machine through each tool’s official CLI. Nothing runs or spends quota in the background on its own.
Giving each request a role
I type @fuseway in VS Code’s chat, and before any model runs, the request gets
a role. Each role has its own instructions, a model suited to the job, and a
setting for whether it may edit files. Planners, reviewers and explainers can
only read.
Planner
Plans, designs, trade-offsread-only/planClaude Opuselse Codex high
Builder
Everything else/buildClaude Sonnetelse Codex medium
Debugger
Bugs, errors, failing tests/debugCodex highelse Claude Sonnet
Reviewer
Reviews, audits, second opinionsread-only/reviewCodex highelse Claude Sonnet
Explainer
Questions that ask for no changeread-only/explainClaude Haikuelse Codex low
Roles are the default, so the extension needs nothing but Claude Code or Codex
signed in. In this mode the role also picks the backend, and if one provider
isn’t installed or is out of room, the other takes over. Every reply ends with the
role and why it was picked, the model that did the work, and the tokens it
used. A repository can change any role field by field, or add its own, in
.agents/routing.json.
Routing locally first
Once a local model is set up, routing switches to local-first. The role still sets the instructions and permissions, but the dispatcher decides who answers.
@fuseway
A request, its attachments and the conversation so far1Structural rules
Look at the conversation, not the wordsToo big for the local context, a pinned path, more than two files, or two local misses in a row go frontier.2Local model · no quota
Match the request against 79 kinds of workA strong local match stays local. A strong frontier match goes frontier.3Claude Haiku · ~1K tokens
Second opinion on close callsWeak frontier matches and words like passwords, migrations or production never go local on the local model’s word alone.Simple work
Local modelDocs, formatting, small helpers, tests, conversionsFrontier work
Claude Code or CodexWhichever has more of its 5-hour and weekly windows left, with 20% of Claude held back for meOutcomes feed a learner that scores this cascade against cheaper routers.
The current cascade is cheap first. Structural rules don’t read the words at all: a prompt and attachments over half the local model’s context, a file under a path I’ve pinned as sensitive, or “that didn’t work” after two local answers in a row all go to a frontier model.
Everything else goes to the local model, which reads a catalog of 79 kinds of work and reports which ones the request is related to. 46 need a frontier model: security, data, architecture, hard debugging, infrastructure, money, time zones. 33 are safe locally: docs, formatting, conversions, small helpers, sample data. A JSON schema limits its answer to real rule IDs. The catalog never changes between requests, so llama.cpp keeps it in its prompt cache, and matching takes about four seconds on the first request and about one after that.
Close calls go to Claude Haiku for a second opinion, at about 1K tokens.
Frontier work then goes to Claude Code or Codex, whichever has more of its
windows left. Fuseway reads those windows from what the CLIs report, keeps 20%
of Claude in reserve for my own sessions, and fails over to the other if a
request hits a limit midway. Grok’s quota isn’t visible to Fuseway, so it never
joins the automatic balancing. It answers when I ask for it with /grok, or
when I make it the frontier preference.
Earning a seat
The dispatcher seat is decided by a running scoreboard in local-first
mode, shown by /stats.
Two cheaper routers are measured against the cascade: local only, which is
free, and Haiku alone.
- Outcomes come from what I do next. An explicit “that worked” or “that’s wrong”, or a thumbs up or down, labels the turn. Moving on labels nothing, and neither do execution errors or quota failover. A local answer that worked proves local was the right call. A frontier answer can’t prove local would have failed, so it doesn’t count either way.
- Challengers are replayed in the background. When nothing else is running, Fuseway replays saved requests through the other routers. A new request cancels that work immediately, and paid replays are capped at 20K tokens a day.
- Recent results matter most. Results lose half their weight every seven days, and paid tokens and latency count against a router’s score.
- Switching is deliberate. A challenger needs 15 recent results and a three-point lead, and the seat changes hands at most once a day. Each router’s name includes its local model, so swapping in a new model starts it with no history.
The CEO seat is decided by head-to-head missions. A challenge runs the same mission once per CEO, with the same starting commit, workers, tests and budget. A team that passes beats a team that fails. When both pass, the one that used fewer model calls wins. A challenger takes over only after winning on at least three different missions and winning more than it loses. Ties keep the current leader.
The models that answer chat requests are scored too, grouped by backend, model, effort and execution mode, so I can see which ones actually succeed.
Running a mission
A mission is a goal, a list of acceptance checks, and the files that do the checking. The CEO answers with a JSON task graph. The controller checks that graph before any worker runs: the task count fits the budget, every worker is on the roster, and every dependency comes earlier. Workers then run in dependency order in an isolated Git worktree, with each task’s output passed to the tasks that depend on it.
- Tests can’t be gamed. The controller holds the verifier files in memory and restores them before grading, so a team that deletes or rewrites its tests can’t earn a pass. Checks run as plain commands, outside any model.
- Budgets are firm. Each team gets a set number of model calls and a time limit, and cancellation and deadlines reach the model CLIs and checks.
- Nothing applies itself. Runs never touch my checkout. Each team’s work stays in its own worktree with a full record of plans, models, tokens and results, and I copy what I want.
- Wasted quota is avoided. A challenge first runs the checks on the unchanged code and stops if they already pass or can’t run.
Measuring it
The router has its own set of 67 labeled requests. 16 were written alongside the catalog, 31 avoid its keywords, and 20 are fresh cases unlike any example, including traps like “change the copyright year.” The current cascade routes all 67 correctly, asking Haiku twice and averaging 1.15 seconds per decision. Two earlier misses came from a single keyword deciding alone, which is why keywords now only trigger a frontier check.
The bigger question is whether local-first routing saves frontier tokens without failing more tasks. The eval harness uses small Node repositories, each with a spec, starting files, a test, and a reference solution agents never see. All frontier sends every task to one frontier agent. Local first routes with the real cascade and escalates to the same agent, with the failing test output, if the local attempt doesn’t pass. Grading is the tests alone.
@fusewayPilot run · graded by tests
| Task | Routed to | Frontier |
|---|---|---|
| slugify | Local≈ small-helper | 0 |
| pager-bug | Local≈ simple-test | 0 |
| counter-race | Codex≈ concurrency | 78K |
The first pilot ran three tasks through Codex. Both arms passed all three. Local first sent two to the local model and used 78K frontier tokens instead of 235K. Three tasks is a smoke test, not a result, but it showed something I didn’t expect: even a trivial task costs Codex about 78K tokens, mostly its own startup context. Keeping a small task off a frontier agent saves the whole startup, not just the answer. The eval tasks are kept as a test set, so the catalog is never tuned against them.
The full seven-task set has its all-frontier baseline so far: Codex passed all seven and used 574K tokens, about 80K a task even for the smallest ones. The local-first arm is next.
A local model for each machine
fuseway model finds a running server on the usual ports. If there isn’t one,
it reads the GPU from nvidia-smi, AMD’s sysfs, or Apple’s unified memory, and
recommends the best model that fits from a table of hardware tiers. With my
approval, it downloads the model, checks its pinned SHA-256, starts it in Docker
with a pinned llama.cpp build, and checks that tool calls work.
The 16 GB tier runs Qwen3.6-35B-A3B, a mixture-of-experts model with 3B active parameters. Measured on a 16 GB AMD card with Vulkan, it processes 775 prompt tokens a second at 32K context, generates 101 tokens a second, and fits a 64K context in 13.3 GB of VRAM. That makes each agent turn about 3.5 times faster than the dense 27B model, at a small cost in precision.
Any OpenAI-compatible server works, including the model server on my Homelab.
One agent setup per repository
fuseway init gives Claude Code, Codex and Copilot Chat one set of
instructions. It adds a marked section to AGENTS.md, CLAUDE.md and Copilot’s
instructions file without overwriting anything, and it’s safe to rerun.
It also installs fusion, a dependency-free MCP server, so whichever chat I’m
in can hand work to the others: ask_local, ask_claude, ask_codex, and
critique, which asks Claude and Codex for a read-only review in parallel. A
shared set of skills comes along too, and requests like “security audit” or
“second opinion” route to the matching skill and to a frontier model. Agents
keep durable notes in a shared .agents/context/ cache, so the next session
doesn’t rediscover the same things.
Design choices
- Roles before routing. A role is picked by rules, not a model, so every request has the right instructions and permissions before anything runs.
- Seats are earned. Routing and leadership change only on enough recent, comparable wins, and a model never elects itself.
- Tests decide what counts as done. Missions and evals are graded by owner checks run outside any model, never by asking a model.
- Local first, with guardrails. The local model handles most requests, but sensitive words, pinned paths and repeated misses always reach a frontier model.
- Subscriptions through official CLIs. Frontier calls go through
claude,codexandgrok, so they draw from my existing plans like my own sessions do. - Every answer shows its work. Replies and mission records name the observed model, effort, tokens and reason. Unknown usage is recorded as unknown, not as free.