GitHub's HydraFusion and Sovereign Fleet: The Same Three Routing Patterns, One in the Cloud, One on Your Desk
When GitHub introduced Project HydraFusion on September 4, 2026 and followed up on October 14, 2026 with HydraFusion Max, it confirmed an architectural shift that every heavy user of coding agents has felt firsthand: manual model dropdowns do not scale.
Asking a developer to guess before every prompt whether a task needs a fast drafting model, a deep reasoning model, or a second opinion from another provider family creates constant friction. GitHub’s answer inside Copilot is a multi-model runtime orchestrator built around three execution patterns: Single, Cascade, and Critique.
We built Sovereign Fleet (sovereign-fleet on GitHub, CLI fleet) around those exact three patterns, but for a completely different operational environment: unattended software engineering on your own hardware, where local weights run first, the Linux kernel confines every agent process, and only passing compiler and test gates can land a commit.
Quick Take: GitHub’s HydraFusion and Sovereign Fleet converge on the same three multi-model patterns (Single, Cascade, and Critique), but apply them at different altitudes. HydraFusion orchestrates cloud frontier models per request inside VS Code, github.com, and the Copilot CLI, billing AI Credits per model invoked. Sovereign Fleet orchestrates decoupled CLI harnesses (
goose1.55.0,aider0.86.2,pi1.3.0,opencode1.19.3, andclaude-code) per repository task inside ephemeral git worktrees (fleet/<task_id>), confines execution with Linux Landlock LSM (ABI v6), and replaces LLM-as-a-judge quality gates with sandboxed test suites (scripts/verify.sh,pytest).
1. The Same Three Patterns: File-and-Line Mapping
In GitHub’s architecture, HydraFusion inspects an incoming request and picks one of three orchestration plans:
- Single: Route directly to one model best matched to the task’s cost, latency, and capability profile.
- Cascade: Draft with a faster, lower-cost model, evaluate the result at a quality gate, and escalate to a stronger model only when needed.
- Critique: Have a primary model generate a solution, pass it to an independent critic model from another model family for review, and feed the critique back for a revision.
Sovereign Fleet implements all three patterns in open-source Python (Python 3.12, FastAPI, asyncio, zero database dependencies). Because the entire codebase is public, every pattern maps directly to concrete modules and line numbers in sovereign-fleet:
| Pattern | GitHub’s HydraFusion / HydraFusion Max | Sovereign Fleet (sovereign-fleet v0.6.0) | Exact Implementation in sovereign-fleet |
|---|---|---|---|
| 1. Single (Direct selection) | Selects one cloud model from the Copilot pool for low-ambiguity prompts. | Thompson-sampling router ranks lanes or (harness, model) pairs by minutes per correct result, combining bake-off priors with live spool history and skipping lanes on quota rest or unloaded local servers. | src/fleet/core/router.py:300 (Router.rank), src/fleet/core/router.py:334 (Router.rank_pairs), src/fleet/core/router.py:113 (_load_default_bakeoff_priors), src/fleet/core/bakeoff_priors.json |
| 2. Cascade (Draft, gate, repair, escalate) | Economical cloud model drafts first; if an internal quality gate rejects the output, HydraFusion escalates to a heavier frontier model. | Executes the top-ranked local pair or lane in an isolated git worktree (fleet/<task_id>). Runs AST GateGuard and the sandboxed repo test gate. On gate failure, runs one repair pass with the compiler/pytest output in the same worktree before escalating to the next ranked pair or lane (up to max_lanes = 3). | src/fleet/core/engine.py:365 (FleetEngine._run_pairs), src/fleet/core/engine.py:572 (FleetEngine._run_routed), src/fleet/core/engine.py:562 (single repair pass in _attempt), src/fleet/core/gateguard.py:27 (GateGuard.verify_python_syntax), src/fleet/core/gates.py:197 (run_gate) |
| 3. Critique (Cross-family review loop) | A model from one family drafts; a read-only critic model from a different provider family checks for logic flaws and guides a revision. | Phase 6e Cross-Lane Review: after a feature task passes its test gate and lands on main, the engine dispatches a review task to a different model lane (pick_reviewer excludes author_lane). If the reviewer emits critical or high findings in its findings JSON block, the engine automatically queues a bounded fix task back to the author lane (source="fleet_review_fix"). | src/fleet/core/engine.py:269 (FleetEngine._handle_review_loop), src/fleet/core/review.py:96 (pick_reviewer), src/fleet/core/review.py:102 (build_review_task), src/fleet/core/review.py:40 (parse_findings), src/fleet/core/review.py:146 (build_autofix_task) |
Here is how the Cascade repair-and-escalate loop looks inside src/fleet/core/engine.py:572-607:
# src/fleet/core/engine.py:572 at v0.6.0 (abridged: bookkeeping and receipts left out)
async def _run_routed(self, task: FleetTask, wt: Path) -> Tuple[str, Dict[str, Any]]:
"""Walk the router's ranking: each lane gets the task (and the last failure), one repair
pass on a verification failure, then the next lane continues in the same worktree."""
category = task.metadata.get("category", "")
ranking = self.router.rank(category, sensitive=_is_sensitive(task.metadata))
ranking = ranking[:self.routing.max_lanes]
failure = ""
for choice in ranking:
lane = choice.lane
if await self._not_ready(lane): # not the lane's fault: no attempt recorded
continue
status, last, outcome = await self._attempt(task, lane, failure, wt)
self.router.record(Attempt(lane, category, status == "completed", ...))
if status == "completed":
return "completed", {**last, "lane": lane}
failure = last.get("error", "verification failed")
return "failed", {"error": f"{len(ranking)} lane(s) failed; last: {failure[-300:]}"}
2. Four Architectural Differences That Define the Boundary
While the three routing patterns match, every design choice underneath them reflects the difference between a cloud subscription service embedded in an editor and an autonomous daemon running on your own workstation.
| Dimension | GitHub’s HydraFusion & HydraFusion Max | Sovereign Fleet (sovereign-fleet) |
|---|---|---|
| Unit of Work | Per prompt or chat turn in VS Code, github.com, or Copilot CLI (plus cloud PR branches when paired with the Copilot coding agent). | Per repository task in a local ephemeral git worktree (fleet/<task_id>), rebased and fast-forward merged onto main only after verification. |
| Model & Harness Pool | Closed cloud frontier pool (OpenAI and Anthropic models managed by GitHub). Welded to the Copilot runtime. | Any CLI harness (goose, aider, opencode, pi, claude-code) paired with any model endpoint (local_qwen on vLLM :30001 first, then free or paid cloud APIs). |
| Billing & Cost Model | Consumes GitHub Copilot AI Credits per model invoked at standard model rates; HydraFusion Max disables the Auto discount and has no latency SLA. | Local GPU runs at zero marginal token cost; router tracks Pacific-midnight quota windows (src/fleet/core/quota.py) and pauses exhausted cloud lanes automatically. |
| Ground-Truth Gate | Internal model quality gate and cross-model LLM critic heuristics. | Pre-gate Python AST GateGuard (src/fleet/core/gateguard.py) + real repository test suites (scripts/verify.sh, pytest) inside a Linux Landlock sandbox. |
| Process Containment | Interactive confirmation prompts and Trusted Directories in Copilot CLI; cloud runner isolation for the GitHub coding agent. | Unattended execution confined by Linux Landlock LSM (ABI v6 on kernel 6.12+): read-only system trees, writes restricted to the task worktree and /tmp, TCP restricted to whitelisted ports (src/fleet/core/sandbox.py). |
| Benchmark Transparency | Evaluated on GitHub’s internal CheckpointBench and subsets of SWE-bench Verified. | Public 192-run 4x4 bake-off JSONL + packaged Goose Recipes (recipes/fleet-ab-proposal-eval/recipe.yaml) enforcing the Strict Proof Rule. |
2.1 Unit of Work: Interactive Turns vs. Unattended Worktrees
HydraFusion is built first for interactive developer velocity inside VS Code, github.com, and the GitHub Copilot CLI, with HydraFusion Max adding higher reasoning effort and multi-model passes for harder prompts. (GitHub also offers an asynchronous Copilot coding agent that works on remote branches and opens draft Pull Requests in GitHub’s cloud infrastructure.)
Sovereign Fleet operates as a headless local software factory. Tasks arrive through the REST API (POST /api/fleet/tasks), the 12-tool MCP server (src/fleet/api/mcp_server.py), the Gitea/GitHub issue intake (src/fleet/plugins/intake.py), or a Matrix chat butler (!fleet approve <task-id>). For each task:
- Step 1:
WorktreeManager.create_worktree(src/fleet/core/worktree.py:90) checks out a fresh branchfleet/<task_id>in~/.fleet/worktrees/<task_id>. - Step 2: The chosen CLI harness runs unattended inside the worktree with explicit non-interactive flags (
--no-session --no-profile --with-builtin developerfor Goose;--yes-always --no-auto-commitsfor Aider;--autofor OpenCode). - Step 3:
gates.scope_violations(src/fleet/core/gates.py:71) verifies that every modified or untracked file falls within the task’sallowed_paths(a trailing slash such asrecipes/covers the directory), andgates.drop_untracked_outside(src/fleet/core/gates.py:258) removes untracked scratch files outside that scope before verification. - Step 4: If the repository gate exits
0,FleetEngine._land(src/fleet/core/engine.py:779) rebases the task branch ontomain, performs a fast-forward merge, pushes toorigin, and writes an atomic JSON receipt (~/.fleet/spool/receipts/<task_id>.json).
2.2 Harness x Model Decoupling: Why the CLI Matters as Much as the Weights
In HydraFusion, you cannot separate the orchestration router from GitHub Copilot’s prompt harness. You cannot ask HydraFusion to drive the Goose CLI (Agentic AI Foundation, started at Block) or Aider against a local vLLM server.
In Sovereign Fleet, the harness and the model are independent axes (src/fleet/plugins/harness_base.py and src/fleet/core/models.py). The router computes compatibility across API kind, tool-calling reliability, and privacy (is_sensitive=True restricts tasks strictly to private=True local endpoints in src/fleet/core/models.py:53), then ranks every valid (harness, model) pair.
Why does decoupling the harness matter? Because our 192-run 4x4 bake-off on a single NVIDIA DGX Spark (GB10, 128 GB unified memory, running Qwen3.6-35B on vLLM :30001 with --tool-call-parser qwen3_xml) proved that changing the CLI harness on the exact same model changes throughput by a factor of 4x:
Harness (on local Qwen3.6-35B) | Correct / 48 | First-Try Passes | Minutes / Correct Result | Total Minutes on Failed Runs |
|---|---|---|---|---|
| goose 1.55.0 | 38 / 48 (79.2%) | 35 | 1.6 min | 27.7 min |
| aider 0.86.2 | 39 / 48 (81.3%) | 32 | 3.0 min | 104.5 min |
pi 1.3.0 (read,edit,write only) | 28 / 48 (58.3%) | 27 | 5.0 min | 117.0 min |
| opencode 1.19.3 | 2 / 48 (4.2%) | 2 | 6.5 min | 10.8 min |
Aider passed 39 tasks and Goose passed 38, virtually tied on raw accuracy. Yet Aider spent 104.5 minutes on its 9 failed runs, whereas Goose failed fast and spent only 27.7 minutes on its 10 failed runs, delivering verified code in 1.6 minutes per correct result vs 3.0 minutes for Aider. Seeding bakeoff_priors.json with both pass counts (alpha, beta) and avg_duration_min lets Router.rank_pairs (src/fleet/core/router.py:334) score pairs by expected successes per minute (theta / duration), picking goose + local_qwen first for unattended local work.
2.3 Quality Gates: Model Heuristics vs. Kernel-Sandboxed Compiler Truth
HydraFusion’s Cascade and Critique patterns rely on model-based quality gates to decide whether a draft is good enough or needs escalation. That is the right trade-off for an interactive chat assistant where running a full test suite on every turn would stall the editor.
For an unattended background runner, however, trusting an LLM’s self-assessment is fatal. Agents routinely claim that tests pass when they never ran them, edit files outside the task scope, or leave syntax errors behind. Sovereign Fleet enforces three deterministic barriers:
- Linux Landlock LSM Kernel Sandbox (
src/fleet/core/sandbox.py): Beforeexecve, the launcher restricts itself with Landlock: writes only to the ephemeral worktree and/tmp, read access to/usr,/lib,/bin,/etcand configured read-only paths, and nothing else visible at all (secrets,~/.ssh,~/.git-credentials). Credential variables are stripped from the environment, andLANDLOCK_ACCESS_NET_CONNECT_TCPrules allow outbound TCP only to ports443,80,53and explicitly configured local model ports (such as30001for vLLM). - AST GateGuard (
src/fleet/core/gateguard.py): Before running the full test suite,GateGuard.verify_python_syntaxparses the worktree’s Python files withast.parseand, when ruff is installed, runs its crash-class rules (F821undefined names,E9) to catch them immediately, feeding line-accurate diagnostics into the repair pass without wasting a full test run. - Sandboxed Repository Gate (
src/fleet/core/gates.py:197): The repository’s own verification command (scripts/verify.shorpytest) runs inside the Landlock sandbox. Furthermore,FleetEngine._verify(src/fleet/core/engine.py:711) re-checksgit status --porcelainafter the gate finishes: a run that exited0without leaving any diff in the worktree is rejected ("No change left in the worktree after verification"), with its stdout/stderr tail preserved in the failure autopsy (src/fleet/core/receipts.py:121).
2.4 Self-Improvement with Proof: Goose Recipes
To keep failure autopsies from turning into unverified prompt tinkering, Sovereign Fleet packages its evaluation and self-improvement workflows as standard Goose Recipes in one-directory-per-recipe layout (recipes/<slug>/recipe.yaml):
recipes/fleet-ab-proposal-eval/recipe.yaml: Evaluates a proposedAGENTS.mdor lane-prompt change against baseline benchmark fixtures, using the evaluation script named in itseval_scriptparameter, and enforces the Strict Proof Rule ([ACCEPTED: PROVEN BETTER]only when landed tasks increase, or stay equal with faster median duration and zero first-try regression).recipes/fleet-self-improvement/recipe.yaml: Reads task autopsies from the spool, clusters recurring failure classes (scope_violation,gate_failed,no_changes), drafts a targeted proposal, and invokes the A/B evaluation recipe.recipes/fleet-bench-runner/recipe.yaml: Dispatches multi-tier benchmark suites through the Sovereign Fleet MCP server (fleet_dispatch_task,fleet_get_task_status,fleet_get_task_receipt).
# Validate and run the A/B proposal evaluation recipe with Goose 1.55.0
goose recipe validate recipes/fleet-ab-proposal-eval/recipe.yaml
goose run --recipe recipes/fleet-ab-proposal-eval/recipe.yaml \
--params proposal_path=~/.fleet/state/proposals/2026-10-21-goose-headless.md \
--params dry_run=true
3. Where GitHub’s HydraFusion Is Ahead (Honest Trade-Offs)
A credible engineering comparison requires naming where the cloud vendor has a structural advantage today:
- Frontier Reasoning Ceiling Without Local VRAM Limits:
HydraFusion Max routes across cloud frontier models (such as Anthropic’s top Claude tiers and OpenAI’s reasoning models) running on datacenter clusters. On a single local workstation such as an NVIDIA DGX Spark (121 GB usable / 128 GB physical unified memory), local inference is bounded by 27B to 35B parameter models (
Qwen3.6-35BNVFP4 on vLLM:30001) under a single-resident GPU mutex (switch.sh). Sovereign Fleet bridges this by escalating to cloud APIs when local attempts fail, but teams that want frontier-only multi-model Critique on every interactive turn get that immediately in HydraFusion Max. - Zero Local Infrastructure Setup:
HydraFusion requires flipping a model-picker toggle in VS Code or the GitHub Copilot CLI. Sovereign Fleet requires Linux kernel 6.12+ (for Landlock ABI v6), Python 3.12+, one or more installed agent CLIs (
goose,aider,opencode,pi, orclaude), and a local model server or API keys configured in~/.config/sovereign-fleet/fleet.toml. - Interactive In-Editor Turn Latency: HydraFusion is tuned for interactive chat and inline code edits while you wait. Sovereign Fleet is an asynchronous batch and daemon system: creating a git worktree, running a multi-turn CLI agent, and executing a 500-test pytest gate takes 1 to 3 minutes per task.
- What Sovereign Fleet Does Not Do Yet:
As documented in the repository
README.md, single-host execution is production-ready today (LocalBackend), while multi-node dispatch across remote machines and container-per-task isolation for kernel/driver tasks remain on the roadmap.
4. Where Other Orchestrators Sit: LangGraph and FleetQ
Developers evaluating Sovereign Fleet also frequently ask how it relates to LangGraph and FleetQ. Both are open-source, but they solve problems at completely different layers of the stack:
- LangGraph (langchain-ai/langgraph): Created by Harrison Chase and the LangChain team, LangGraph is a low-level Python and TypeScript library (
StateGraph) for writing cyclical agent state machines with checkpoint persistence in PostgreSQL, SQLite, or memory. Use LangGraph when you are writing a custom conversational or research agent in application code. Unlike Sovereign Fleet, LangGraph is a library, not an OS runner: it has no built-in git worktrees, no Landlock kernel sandbox, no CLI harness adapters, and no local GPU residency management. - FleetQ (escapeboy/agent-fleet-o): Created by Nikola Katsarov, FleetQ is a self-hosted enterprise operations portal built on PHP 8.4, Laravel 13, Livewire, PostgreSQL 17, and Redis 7. It features an 8-node visual DAG builder, over 670 MCP tools across 60 domains,
ActionProposalapproval policies, pessimistic-locked credit ledgers, and 20+ signal drivers across Slack, Teams, Discord, and Matrix. Use FleetQ when a cross-functional organization needs a visual mission control plane for SaaS workflows and API agents. Use Sovereign Fleet when you want a zero-database Unix daemon that drives local coding CLIs inside kernel-sandboxed git worktrees under compiler gates.
5. Summary: Choosing the Right Layer
| If your goal is… | Use… | Why |
|---|---|---|
| Interactive multi-model completions and chat inside VS Code with zero local ops | GitHub’s HydraFusion / HydraFusion Max | Cloud-managed Single, Cascade, and Critique routing across frontier models, billed via Copilot AI Credits. |
| Unattended repository engineering on your own Linux hardware with local models first | Sovereign Fleet (sovereign-fleet) | Same three routing patterns (Single, Cascade with repair, Cross-Lane Critique), decoupled across Goose/Aider/Pi/OpenCode, confined by Landlock LSM, and verified by real test gates. |
| Writing custom cyclical agent state machines in Python or TypeScript | LangGraph | Programmatic StateGraph nodes, edges, and superstep checkpointing. |
| Visual low-code DAG workflows and multi-channel SaaS automation for teams | FleetQ | Full-stack Laravel 13 portal with 670+ MCP tools, credit ledgers, and team chat connectors. |