AI coding agents are moving beyond the idea of sending every request to one large language model. Modern development tasks vary significantly in complexity, and using the same model and execution strategy for every task can waste both time and AI credits.
GitHub Copilot CLI's HydraFusion research preview takes a different approach. Instead of selecting only a model, HydraFusion selects an execution workflow for each request.
The current HydraFusion implementation can choose among three patterns:
Single
Cascade
Critique
Each pattern represents a different trade-off between quality, cost, and latency. Single favors direct execution, Cascade allows a lower-cost first attempt with escalation when necessary, and Critique adds an independent review and revision step.
This makes HydraFusion particularly interesting for repository-level coding tasks, where the best workflow is not always the same.
What Is HydraFusion?
HydraFusion is a runtime orchestration system available as a research preview in GitHub Copilot CLI.
Traditional AI-assisted development usually looks like this:
Developer
|
v
Choose Model
|
v
Send Prompt
|
v
Model
|
v
Result
HydraFusion changes the abstraction:
Developer
|
v
HydraFusion
|
v
Choose Workflow
|
+---- Single
|
+---- Cascade
|
+---- Critique
|
v
Final Result
The developer does not have to manually decide which workflow should be used. HydraFusion evaluates the task and chooses an execution pattern based on capability signals related to reasoning, code generation, debugging, and tool use.
The goal is therefore not simply to find the "best model."
It is to determine the best way to solve the task.
The Three HydraFusion Workflows
Single Workflow
Single is the most direct execution pattern.
One selected model receives the task and attempts to solve it.
Task
|
v
Selected Model
|
v
Result
There is no additional critique or escalation stage.
This workflow is useful when the task can probably be solved correctly in one pass.
Typical examples include:
Small code changes
Straightforward bug fixes
Simple refactoring
Documentation updates
Basic repository questions
Routine test generation
For example:
Rename the private method getUserData to loadUserData
and update its references.
Using a multi-stage workflow for such a change would add unnecessary overhead.
Cascade Workflow
Cascade introduces escalation.
The first model attempts the task, and a quality gate determines whether the result is good enough.
Task
|
v
Efficient Model
|
v
Quality Gate
|
+---- Pass ----> Final Result
|
+---- Fail ----> Stronger Model
|
v
Final Result
This provides an important cost-control mechanism.
A relatively efficient model gets the first opportunity to solve the task. If the result does not meet the required quality threshold, the workflow can escalate to a stronger model.
GitHub describes Cascade as an efficient model drafting a solution followed by a quality gate that can accept the result or escalate to a stronger model.
Critique Workflow
Critique adds an independent review step.
Task
|
v
Drafting Model
|
v
Initial Result
|
v
Independent Critic
|
v
Review Feedback
|
v
Drafting Model
|
v
Revised Result
The critic is read-only and comes from a different model family. It reviews the draft without modifying the workspace, after which the drafting model performs one revision.
This workflow is useful when a second perspective is more valuable than simply trying the same task again.
Single vs. Cascade vs. Critique
The simplest comparison is:
Workflow | Main Strategy | Cost Profile | Latency | Best For |
|---|---|---|---|---|
Single | One model solves the task | Lowest potential overhead | Lowest | Straightforward tasks |
Cascade | Start efficient, escalate if needed | Adaptive | Low to moderate | Uncertain complexity |
Critique | Draft, independently review, revise | Higher | Higher | Complex or error-sensitive work |
The important word is potential.
Single is not guaranteed to be cheaper for every task because model choice and token consumption still matter.
Likewise, Critique is not automatically more expensive in a meaningful business sense. If the additional review prevents a failed implementation or significant developer rework, the total engineering cost can still be lower.
How Single Works in Practice
Imagine a developer asks:
Add a null check before accessing customer.Address
in CustomerService.cs.
The Single workflow may be sufficient:
Prompt
|
v
Model
|
+--> Inspect file
|
+--> Modify code
|
+--> Run relevant validation
|
v
Result
There is little uncertainty.
A second model does not necessarily provide meaningful additional value.
Advantages of Single
Simple execution
Lower orchestration overhead
Lower potential latency
Easier to understand
Good fit for routine work
Disadvantages of Single
No independent review
No automatic escalation
Mistakes can survive the first pass
More dependent on the selected model's capabilities
How Cascade Works in Practice
Consider a more complicated request:
Investigate why the checkout service sometimes calculates
an incorrect discount after multiple promotional rules are applied.
Fix the problem and add regression tests.
The task requires repository exploration, debugging, implementation, and testing.
Cascade can approach it progressively:
Task
|
v
Efficient Model
|
+--> Inspect checkout logic
|
+--> Identify likely cause
|
+--> Implement fix
|
+--> Validate
|
v
Quality Gate
|
+---- Good enough ----> Finish
|
+---- Not sufficient --> Escalate
|
v
Stronger Model
This avoids automatically paying for the stronger model when the first attempt is already sufficient.
Advantages of Cascade
Efficient first attempt
Automatic escalation
Better cost-quality balance
Useful for uncertain task complexity
Disadvantages of Cascade
Quality-gate decisions add complexity
Failed first attempts consume resources
Escalation can increase latency
Developers have less direct control over the exact model path
How Critique Works in Practice
Now consider a security-sensitive task:
Update the authorization middleware so that users can access
only resources belonging to their organization.
Preserve existing API behavior and add regression tests.
A first implementation may look correct while still containing a subtle authorization flaw.
Critique provides an independent review:
Task
|
v
Model A
|
v
Implementation
|
v
Model B
|
+--> Review authorization logic
+--> Check edge cases
+--> Identify missing tests
|
v
Model A
|
v
Revision
|
v
Final Result
The important property is independence.
The critic does not simply continue the same reasoning process. It evaluates the draft from another model perspective.
Advantages of Critique
Independent review
Better detection of subtle issues
Useful for complex code
Can improve reliability
Provides another reasoning perspective
Disadvantages of Critique
Additional model invocation
Higher potential token consumption
Higher latency
Review quality still depends on the critic
One critique pass cannot guarantee correctness
Why HydraFusion Does Not Always Use Critique
It may seem logical to ask:
If critique improves quality, why not critique every task?
Because quality is only one dimension.
Consider a simple task:
Add a missing test for CalculateTax().
A full draft-review-revise workflow could require:
Draft
+
Critique
+
Revision
That may be unnecessary.
For a high-risk task:
Rewrite the payment authorization flow.
the additional review could be worthwhile.
HydraFusion therefore treats workflow selection as an optimization problem involving performance, cost, and latency.
A Cost Comparison
Consider three hypothetical workflows.
Assume:
Small model = 2 cost units
Strong model = 10 cost units
These numbers are illustrative only.
Single
Strong model
= 10 units
Cascade
Suppose the efficient model succeeds:
Small model
= 2 units
If escalation is necessary:
Small model + Strong model
= 2 + 10
= 12 units
Critique
Suppose the draft uses a smaller model, followed by a critic and revision:
Draft = 2
Critique = 3
Revision = 5
Total = 10 units
The interesting result is that a multi-model workflow does not necessarily cost more than a single frontier-model attempt.
But this is only a conceptual example.
Actual HydraFusion cost is based on the tokens consumed by the constituent models and their standard rates. There is no separate HydraFusion charge.
Why Token Accounting Matters
A common mistake when comparing AI workflows is counting only the final response.
Consider:
Initial Draft
+
Critique
+
Revision
+
Retry
All of these stages can contribute to usage.
HydraFusion explicitly accounts for workflow legs such as:
Drafting
Critique
Revision
Escalation
Retry
Fallback
GitHub describes this as complete accounting across the workflow rather than counting only the final successful stage.
A realistic cost model is therefore:
Total Cost =
Input Tokens
+
Cached Input Tokens
+
Output Tokens
+
Additional Workflow Calls
The exact amount depends on the models and context involved.
Quality vs. Cost
The three workflows can be viewed as different points on a quality-cost curve.
Quality
^
|
| Critique
| *
|
| Cascade *
|
| Single *
|
+----------------------------> Cost
This diagram is conceptual rather than a benchmark result.
The objective is not to maximize one metric independently.
Instead:
Useful Result =
Quality
+ Reasonable Cost
+ Acceptable Latency
A workflow that produces excellent code but takes too long may not be ideal for an interactive development task.
Likewise, a very cheap workflow that produces code requiring extensive manual repair may be more expensive overall.
Join the conversation! Your thoughts help the community grow.