Back to .md Directory

Ralph vs Oneshot: Capability Eval Results

Compares two agent harnesses (Ralph vs oneshot) on coding tasks, finding marginal quality gains at 1.5-5x higher cost.

May 2, 2026
0 downloads
0 views
ai agent prompt eval claude workflow
View source

What this file does

Compares two agent harnesses (Ralph vs oneshot) on coding tasks, finding marginal quality gains at 1.5-5x higher cost.

When to use it

  • Evaluating whether context resets improve agent code quality
  • Deciding between multi-step and single-shot agent orchestration
  • Understanding cost-quality tradeoffs for coding agent harnesses
  • Designing evals for agent capability measurement

Assumes this stack

Claude SonnetClaude OpusPythonYAMLJWT

Ralph vs Oneshot: Capability Eval Results

January 2026

Conclusion

Ralph shows marginal quality improvement over oneshot, passing 2-13% more tasks across evaluation suites. However, this comes at 1.5-5x higher cost. The context resets between tasks are not the primary value driver. The more important factor is task decomposition and explicit test criteria in the prompt engineering, which can be applied to any agent harness.

SuiteRalphOneshotΔ Tasks Passed
workflow85% (41/48)83% (40/48)+2.5%
tasktracker93% (26/28)82% (23/28)+13%

Methodology

Agent Harnesses Under Test

We compare two agent harnesses that orchestrate Claude to complete coding tasks:

Oneshot harness: Single Claude session with full requirements. The agent generates the entire codebase in one continuous trajectory with no interruption.

Ralph harness: Breaks work into discrete tasks via a PRD. Each task runs in a fresh Claude session with isolated context. Tasks execute sequentially with context reset between each.

Experimental Design

The goal was to isolate the effect of context resets between task completions. Both harnesses use:

  • Same model: Claude Sonnet
  • Same task specifications: Identical requirements.md files
  • Same graders: Shared deterministic test suite run against both outcomes
  • Same prompts: Prompts are as close as possible between harnesses

The only difference: Ralph resets context between tasks, while oneshot operates in a single continuous session.

Evaluation Suites

SuiteDescriptionTasksGrader Type
workflowCLI pipeline engine with YAML parsing, dependency graphs, conditions, retries48Deterministic (unit tests)
tasktrackerREST API with JWT auth, 4 models, ~15 endpoints28Deterministic (API tests)

Graders

All graders are deterministic/code-based: the agent's outcome (generated code) is tested by running unit tests or API tests. A task passes only if all assertions pass. This approach is natural for coding agents because software is straightforward to evaluate: does the code run and do the tests pass?

Results

Workflow Engine CLI

MetricRalphOneshot
Tasks Passed41/48 (85%)40/48 (83%)
Duration991s624s
Tokens4.57M3.13M
Cost$2.61$1.75

Task Tracker REST API

MetricRalphOneshot
Tasks Passed26/28 (93%)23/28 (82%)
Duration1546s298s
Tokens7.83M1.01M
Cost$4.18$0.72

Model Comparison: Sonnet vs Opus (Workflow Suite)

MetricSonnet RalphSonnet OneshotOpus RalphOpus Oneshot
Tasks Passed41/48 (85%)40/48 (83%)41/48 (85%)40/48 (83%)
Duration991s624s522s395s
Tokens4.57M3.13M3.70M2.15M
Cost$2.61$1.75$2.96$1.99

Finding: Opus achieved identical pass rates to Sonnet but costs ~15% more. No quality improvement from using a larger model on this task. The 2.5% Ralph advantage over oneshot holds across both models.

Discussion

Marginal Capability Gains

The quality improvement from context resets alone is marginal (2-13%). Given the significant cost increase (1.5-5x), the loop mechanism with context resets is not the primary value driver.

What Actually Matters

The more important contribution is the prompt engineering around Ralph's task structure:

  1. Task decomposition - Breaking work into discrete, well-scoped tasks with clear success criteria
  2. Testability emphasis - Each task includes explicit test requirements that guide implementation
  3. Incremental verification - Structure that enables grading each piece before moving on

These patterns can be applied to any agent harness, including oneshot approaches. The loop is a convenient mechanism to enforce them, but the discipline of task breakdown and test-driven requirements matters more than context resets.

Cost-Quality Tradeoff

Ralph's gains come at significant cost:

  • 1.5x cost for workflow (49% more expensive)
  • 5x cost for tasktracker (480% more expensive)

For most use cases, a well-structured oneshot prompt with clear task breakdown may achieve similar quality at lower cost.

Limitations

  • Small sample size (2 suites, 1 trial each)
  • Same model used for both harnesses
  • Deterministic graders only (no model-based or human grading)
  • Results may vary with different task complexity levels

Challenges & Open Issues

1. Eval design tension

Writing deterministic graders without leaking test details into the requirements is difficult. If the requirements explicitly describe how the agent will be tested, the eval becomes trivial. If they're too vague, the graders become brittle, failing on valid implementations that don't match expected output formats.

This tension is inherent to capability evals for coding agents. Our current approach uses outcome-based graders (does the code work?) rather than transcript-based graders (did the agent follow specific steps?), which helps but doesn't eliminate the problem.

2. Task granularity tradeoff

Ralph allows the agent to complete multiple tasks per loop iteration if it chooses. We tested forcing exactly 1 task per iteration:

  • Minimal improvement in task pass rate
  • Major increase in token cost (context resets on every task)

The flexibility to batch related tasks appears to be the right default. It reduces cost without sacrificing quality.

3. Greenfield bias

Both eval suites are greenfield projects built from scratch. Context rot and compaction are less of a problem when there's no existing codebase to navigate. In large, complex codebases where the agent must read and modify existing code across many files, Ralph's context resets might provide more benefit by preventing accumulated context from degrading quality. These evals don't capture that scenario.

What's inside

Conclusion, methodology, results tables, model comparison, discussion, limitations, and open issues across 7 sections.

Change this for your project

  • Replace chr1sbest/wiggum with your own repository name
  • Replace workflow and tasktracker suite names with your own eval suites
  • Replace $2.61, $1.75 and other cost figures with your actual token pricing

Where it goes

Keep alongside your test suite. Used to define and score model evaluations.

Worth borrowing

  • Use deterministic graders (unit tests) instead of model-based grading for coding evals
  • Isolate one variable (context resets) while keeping model, prompts, and graders identical
  • Report both pass rate and cost to surface the tradeoff

Related Documents