GitHub has unveiled Project HydraFusion, a research preview feature that routes coding tasks across multiple AI models at runtime to optimize performance and cost. In offline testing, HydraFusion matched or surpassed Claude Opus 5 on three agentic coding benchmarks while reducing estimated workflow expenses substantially.

The core strategy has long centered on matching developers with the most appropriate model for their specific task. Earlier this year, GitHub introduced Auto model selection to automate that matching process. HydraFusion extends this concept by orchestrating workflows that span multiple providers, enabling models to draft solutions, provide critique, revise work, or hand off to more capable systems when needed.

HydraFusion treats workflow selection as an optimization challenge, analyzing capability signals across reasoning, code generation, debugging, and tool use to pick the most efficient execution path that meets quality standards. For developers, this complexity remains invisible—users simply select HydraFusion like any other model, and the system handles the underlying coordination.

Three execution patterns

For each request, HydraFusion chooses from three distinct workflow patterns, each addressing different quality-to-cost tradeoffs:

Figure 1. HydraFusion architecture
  • Single. A selected model directly solves the task.
  • Cascade. An efficient model drafts a solution; a quality gate determines whether to accept it or escalate to a stronger model.
  • Critique. One model drafts a result, an independent critic from a different model family reviews it (similar to Rubber Duck debugging), and the drafting model revises once.

Single mode prioritizes speed and efficiency when one model suffices. Cascade gives a cost-effective model the first opportunity while preserving escalation to stronger inference if the candidate fails the acceptance gate. Critique introduces an independent perspective for tasks where external review proves more valuable than another unassisted attempt.

Benchmark performance

Across three agentic coding benchmarks, HydraFusion demonstrated frontier-class quality alongside significant estimated cost reductions. On TerminalBench 2.1, verified task quality improved by 4.9 percentage points at 67% lower estimated cost relative to Claude Opus 5.

Adaptive multi-model orchestration

Developers routinely coordinate models manually—selecting one for a task, requesting another to review output, or escalating difficult problems to more capable systems. HydraFusion brings this familiar workflow into the runtime. Users select HydraFusion once and focus on their task while the system manages model selection and orchestration behind the scenes.

Selectivity forms the foundation. Some coding tasks resolve directly, while others gain from review, revision, or escalation. HydraFusion evaluates each request and selects the least complex workflow expected to satisfy requirements, invoking additional model calls only when they likely enhance results. This adaptive strategy balances quality, cost, and latency across the model landscape.

As the model frontier evolves, HydraFusion evolves with it. When new models become available in GitHub Copilot, they can be evaluated and incorporated into the model pool, leveraging their capabilities for tasks where they excel.

Building HydraFusion

Translating adaptive multi-model orchestration into a reliable coding experience demands rigorous management of execution, review, cost, and repository state. HydraFusion rests on five operating principles:

  • Complete accounting. Aggregate cost and usage across every workflow component, including drafting, critique, revision, escalation, retry, and fallback.
  • Bounded execution. Assign explicit timeout and cancellation behavior to each component to maintain execution and cost within defined boundaries.
  • Isolated review. Execute review steps in isolated, tool-free contexts, while solver steps operate in the shared workspace with standard permission-aware agent loops. This enables independent model assessment without repository modification.
  • Fail-safe application. Refrain from applying patches when the workflow is cancelled or fails validation, ensuring incomplete changes never reach the repository.
  • Validated routing. Confirm workflow definitions, model bindings, fallback behavior, and model availability before execution starts.

These principles render multi-model orchestration practical for repository-level operations. Internally, the runtime logs the role, outcome, cost, latency, and diagnostics of each component for post-execution analysis. Externally, developers receive a single coherent response and one permission-aware changeset.

Evaluation results

Fixed HydraFusion policies underwent evaluation across three agentic coding benchmarks—TerminalBench 2.1, DeepSWE, and CheckpointBench (an internal benchmark derived from real GitHub Copilot sessions)—using Claude Opus 5 and GPT-5.6 Sol as comparison baselines. All policies received identical task inputs, tools, execution limits, pricing assumptions, grading criteria, and handling of missing results. Evaluation focused on verified task quality (the proportion of tasks confirmed as correctly solved) and complete estimated workflow cost, accounting for every invoked component including drafting, critique, revision, escalation, retry, and fallback.

TerminalBench 2.1

TerminalBench 2.1 assesses coding agents on intricate, multi-step tasks within terminal environments. HydraFusion and Opus 5 were compared on verified task quality and estimated workflow cost.

DeepSWE

DeepSWE evaluates demanding repository-level software engineering tasks requiring navigation of large codebases, comprehension of cross-file dependencies, and end-to-end fixes. HydraFusion came within 1.5 percentage points of Opus 5 while reducing cost by 36%, demonstrating a compelling quality-cost tradeoff for complex real-world engineering tasks.

CheckpointBench

CheckpointBench is an internal multi-turn benchmark built from real GitHub Copilot agentic coding sessions. Each conversation ties to a specific public repository and immutable commit, ensuring every session remains replayable. The benchmark spans language, task type, and difficulty, scrubbed for quality to produce a realistic evaluation set closely mirroring production agentic sessions. HydraFusion came within 0.1 percentage points of Opus 5 at 65% lower cost. Early internal testing confirmed this result.

So far, the reasoning and task solving capability [of HydraFusion] is at or better than Opus.

Principal Software Engineer at Microsoft

Iterative refinement

HydraFusion's routing policies were shaped by how developers use GitHub Copilot on actual coding tasks. To ensure reproducibility, GitHub curated CheckpointBench from real Copilot coding-session trajectories. The team refined HydraFusion repeatedly across CheckpointBench, DeepSWE, and TerminalBench 2.1, optimizing across all evaluation sets rather than targeting any single benchmark.

HydraFusion's per-capability scores provided a stable foundation for comparing candidate routing policies. Rather than manually adjusting thresholds, beam search constructed the optimal decision policy. Each candidate was measured against a frozen baseline on quality, cost, and failure modes, ensuring improvements rested on stable ground.

TerminalBench 2.1 offers the most comprehensive sequence of runs, providing the clearest view of iterative improvement. Progress was not uniform. Between August 11 and August 25, two operational failures in the evaluation harness produced invalid runs. Those failures were excluded from the performance trend, corrected, and followed by continued gains in HydraFusion configurations. By August 25, HydraFusion had reached its strongest operating points in the recorded series.

This development record demonstrates how policies improved through repeated experiments. TerminalBench 2.1 was one of several benchmarks used during development. Its relative saturation underscores the importance of broader validation, so the three-benchmark evaluation also incorporates DeepSWE's more demanding repository-level tasks. The research preview extends that learning loop to real developer workloads.

Getting started with the preview

For this preview phase, first-turn, single-prompt coding tasks represent the optimal starting point. Multi-turn performance with longer, iterative sessions will receive focus next.

The preview aims to identify which tasks benefit from compound workflows and how orchestration affects latency and cost in practice. For optimal results today, begin with substantial, well-scoped coding tasks that can be handed to Copilot in autopilot mode within a single prompt. Share findings—including strengths, limitations, and desired improvements—via /feedback in Copilot CLI or in the GitHub Community discussion.

HydraFusion remains an active research initiative. Results, models, workflows, availability, names, and product behavior may evolve as learning from the preview progresses. GitHub believes the next major advancement in coding agents will emerge from combining frontier intelligence with runtime orchestration. HydraFusion represents the first exploration of this direction: transitioning from selecting the best model to dynamically constructing the optimal solution method for each task.