DocsQuick StartAI News
AI NewsGitHub Rubber Duck: Let Claude and GPT review each other's code
Product Update

GitHub Rubber Duck: Let Claude and GPT review each other's code

2026-04-08
GitHub Rubber Duck: Let Claude and GPT review each other's code

GitHub Copilot CLI launches an experimental feature called Rubber Duck, introducing a cross-model review mechanism—using Claude for coding and GPT for review—bridging 74.7% of the performance gap on SWE-Bench Pro.

On April 6, GitHub did something pretty interesting: it added an experimental feature called Rubber Duck to Copilot CLI. The core idea is—let different families of AI models review each other’s code.

Simply put, you use Claude Sonnet 4.6 to write code, and after that, GPT‑5.4 helps you review it. It’s not the same model checking its own output—it’s a cross‑family second opinion.

This idea isn’t new. At the end of March, Microsoft added a similar multi‑model collaboration feature called Critique to Microsoft 365 Copilot’s Researcher, enabling GPT and Claude to work together on research tasks. Rubber Duck, however, brings that logic to the code‑generation scenario—targeting more specific problems and producing more measurable results.

The Ceiling of Single‑Model Self‑Review

Let’s first talk about why we need this.

Current coding agents have an old problem: mistakes made during the planning phase snowball. It seems reasonable to let one model plan, implement, and then self‑check—but the issue is that its training biases and blind spots are systemic.

Think of someone proof‑reading their own writing—they’ll almost always miss some errors because of cognitive bias: they see what they think they wrote, not what’s actually on paper. Models are the same way. If Claude makes a flawed architectural assumption during planning, it likely won’t question that assumption when reviewing later—because the assumption originates from its own “thought process.”

This isn’t a capability issue—it's structural.

Comparison diagram of single‑model self‑review vs cross‑model review, showing the difference between error accumulation and detection mechanisms

How Rubber Duck Works

The name Rubber Duck comes from the classic “rubber duck debugging” method—programmers explain their code logic to a rubber duck and often find bugs themselves. The twist: this time the “duck” is another AI model—and it actually talks back.

Here’s how it works:

  • The user selects a Claude model as the primary agent, responsible for planning and implementation.
  • Rubber Duck automatically calls GPT‑5.4 as an independent reviewer at key points.
  • GPT‑5.4 doesn’t rewrite code—it outputs a “high‑value review checklist.”

The checklist includes three categories: missing details, questionable assumptions, and uncovered edge cases.

Reviews are triggered at three checkpoints:

  1. After planning — assess architecture decisions and tech stack choices.
  2. After complex implementation — check for logical flaws in the code.
  3. After writing tests — evaluate test coverage and boundary conditions.

Beyond active triggers, there’s also a passive mode: when the agent gets stuck in a loop (e.g., repeatedly modifying the same code while tests keep failing), Rubber Duck intervenes automatically. Users can also manually request a review at any time.

A noteworthy design detail: all review feedback and revision justifications are shown to the user. It’s not a black box—you can see what GPT‑5.4 suggested, what Claude accepted or rejected, and why.

How the 74.7% Figure Was Calculated

Honestly, you might raise an eyebrow at “performance improvement of nearly 75%.” But looking closer, GitHub’s phrasing is actually quite careful.

They used SWE‑Bench Pro, a mainstream benchmark for evaluating coding agents. The test logic:

  • Run Claude Sonnet 4.6 solo as the baseline.
  • Run Claude Opus 4.6 solo as the performance ceiling.
  • Then test Sonnet 4.6 + Rubber Duck (GPT‑5.4 review) to see how much of that gap it closes.

The result: it closed 74.7% of the gap. Note—this doesn’t mean performance improved by 74.7%; it means Sonnet with cross‑model review approaches the level of Opus running alone.

This is a smart and honest way to put it. It acknowledges the reality: a cheaper model plus a review mechanism can approximate the performance of a more expensive one—but not fully match it.

Even more interesting is how it performs on hard tasks. For tasks modifying more than 3 files or requiring over 70 steps, Rubber Duck scored 3.8% higher than the baseline. That sounds modest—but in complex tasks, every single percentage point represents a significant gain in practical usability.

In real cases, Rubber Duck effectively identified problems such as:

  • Architectural flaws (e.g., circular dependencies between modules)
  • Loop boundary errors (e.g., unhandled edge conditions in for loops)
  • Cross‑file conflicts (e.g., two files interpreting the same interface differently)

These are precisely the issues single‑model self‑reviews tend to miss—because they require “a different perspective” to spot.

How Does It Compare with Microsoft’s Critique?

As mentioned earlier, at the end of March Microsoft introduced Critique and Council to Microsoft 365 Copilot, also enabling GPT and Claude to collaborate. But the two approaches differ markedly in scope and architecture.

Critique targets research contexts—GPT drafts a document, Claude verifies facts and logic using academic standards, and two‑way reviews will be supported later. It uses a parallel comparison architecture—two models independently produce reports, then a “referee model” evaluates both outputs to synthesize consensus and differences.

Rubber Duck targets coding contexts—one model leads, the other reviews. It’s not parallel—it’s a sequential write‑then‑review workflow. This design fits programming better, since code generation is inherently ordered: planning → implementation → testing.

From a broader perspective, Microsoft launching two cross‑model collaboration features within two weeks sends a clear signal: the era of single‑model AI is fading. Future AI products will increasingly use multi‑model orchestration.

What does that mean for developers? Your toolchain must flexibly call different models. Today it’s Claude + GPT; tomorrow it could be Gemini + DeepSeek. If your infrastructure is locked to one provider, switching costs will be high. Aggregation platforms like OpenAI Hub are useful in this trend—one API endpoint to switch between models without maintaining separate integrations per vendor.

How Developers Can Use It

Rubber Duck is still experimental. To enable it:

  1. Install the latest GitHub Copilot CLI.
  2. Run the /experimental command to enable experimental features.
  3. Select a Claude model as the primary agent.
  4. Ensure you have access to GPT‑5.4.

Once enabled, Rubber Duck works automatically at those three checkpoints—no extra setup required.

If you want to implement similar cross‑model review in your own project, the logic is simple: one model generates, another reviews, then feedback loops back to the first model.

Here’s a simple example using OpenAI Hub–compatible format to have Claude generate a code plan and GPT review it:

import openai

# Use OpenAI Hub to call different models through one endpoint
client = openai.OpenAI(
    base_url="https://api.openai-hub.com/v1",
    api_key="your-openai-hub-key"
)

def generate_plan(task: str) -> str:
    """Generate a code plan with Claude"""
    resp = client.chat.completions.create(
        model="claude-sonnet-4.6",
        messages=[
            {"role": "system", "content": "You are a senior software engineer. Please draft a detailed implementation plan for the following task."},
            {"role": "user", "content": task}
        ]
    )
    return resp.choices[0].message.content

def rubber_duck_review(plan: str, task: str) -> str:
    """Review the plan with GPT and output a list of key concerns"""
    resp = client.chat.completions.create(
        model="gpt-5.4",
        messages=[
            {"role": "system", "content": """You are an independent code reviewer.
Please review the following implementation plan and output a list of high-value concerns, including:
1. Missing details
2. Questionable assumptions
3. Uncovered edge cases
Do not rewrite the plan—only provide review comments."""},
            {"role": "user", "content": f"Task description: {task}\n\nCurrent plan:\n{plan}"}
        ]
    )
    return resp.choices[0].message.content

def refine_plan(plan: str, review: str, task: str) -> str:
    """Claude revises the plan based on review feedback"""
    resp = client.chat.completions.create(
        model="claude-sonnet-4.6",
        messages=[
            {"role": "system", "content": "Revise your plan according to the review feedback. For each comment, explain whether you accepted or rejected it and why."},
            {"role": "user", "content": f"Original task: {task}\n\nYour plan:\n{plan}\n\nReview feedback:\n{review}"}
        ]
    )
    return resp.choices[0].message.content

# Example usage
task = "Implement a thread-safe, concurrent LRU cache with TTL expiration support"

plan = generate_plan(task)
print("=== Initial Plan ===")
print(plan)

review = rubber_duck_review(plan, task)
print("\n=== Rubber Duck Review ===")
print(review)

final_plan = refine_plan(plan, review, task)
print("\n=== Revised Plan ===")
print(final_plan)

The key here: use one API endpoint (OpenAI Hub) to seamlessly switch between Claude and GPT—no need for two SDKs or authentication systems. Just change the model name.

Why It Matters

Broadly speaking, Rubber Duck represents a paradigm shift—from “bigger models” to “smarter orchestration.”

For the past two years, the AI industry’s main theme has been an arms race—more parameters, longer context windows, higher benchmark scores. But Rubber Duck’s data demonstrates: a mid‑range model plus a good review mechanism can approximate a top‑tier model’s performance.

Claude Sonnet 4.6 costs roughly one‑fifth as much as Opus 4.6. If Rubber Duck closes 74.7% of the gap, even accounting for the extra review call cost, the total expense could be only one‑third to one‑half of directly using Opus. For teams deploying coding agents at scale, that’s a tangible cost optimization.

More practically, this feature solves a widespread pain point: you don’t fully trust AI‑generated code to go live, but manual reviews are too slow. Having another AI perform the first pass filters out structural issues; human reviewers can focus on higher‑level architecture decisions.

Of course, some caveats remain. Cross‑model review adds API calls and delay. In fast‑iteration workflows, will developers have the patience to wait for GPT‑5.4’s review every time? Are the three automatic checkpoints well‑chosen? These questions require real‑world validation.

Also, for now Rubber Duck only supports the Claude‑primary + GPT‑review combination. Will the reverse be supported? Or will we see Gemini, DeepSeek, and others added? GitHub’s blog doesn’t say—but given Microsoft’s simultaneous rollout of Critique for M365 Copilot, multi‑model orchestration is clearly the long‑term direction.

Final Thoughts

The “rubber duck debugging” method works not because the duck is smart—but because explaining forces you to re‑examine your own assumptions. Rubber Duck automates that logic, and the “other party” is no longer a silent duck—it’s an AI model with a different knowledge structure and reasoning style.

This may become one of the most noteworthy trends in AI coding tools by 2026: not that single models get vastly stronger, but that collaboration between different models gets vastly smarter.


References:

Related Articles

View All

Contact Us

We usually reply quickly during business hours

Scan WeChat

Support: Hub Assistant

WeChat ID: