Skip to content

Tracking: harness efficiency (step count and tool result tokens) #772

Closed

Description

@will-lamerton

Tracking issue for the efficiency work prompted by a third-party benchmark.

Background

Harness efficiency, not quality tested nanocoder 1.29.0 against Pi, OpenCode and Claude Code with the model held constant (DeepSeek V4 Flash) across eight bug-fix tasks in a large codebase. Nanocoder got 64 runs, 8 per task, so it is the best-sampled harness in the study.

Results:

  • Pi: 4 tools, 1,340 fixed overhead, 28.0 avg steps, 14,775 output tokens, 2.1m, grade 2.34
  • OpenCode: 10 tools, 7,197 fixed overhead, 16.6 avg steps, 17,463 output tokens, 3.1m, grade 2.07
  • Claude Code: 27 tools, 23,132 fixed overhead, 37.9 avg steps, 58,370 output tokens, 8.0m, grade 2.42
  • Nanocoder: 15 tools, 6,121 fixed overhead, 37.4 avg steps, 55,844 output tokens, 5.2m, grade 2.25

Quality was statistically flat: every confidence interval overlaps every other. The author's conclusion is that harness choice is an efficiency decision, not a quality one.

The good news is our system prompt is the second leanest of the four, about a quarter of Claude Code's. That is the part we control most directly and we have done it well.

The bad news is all our cost sits in the agent loop. 37.4 steps and 55.8K output tokens to reach the same grade OpenCode reaches in 16.6 steps and 17.5K. Since the system prompt is re-sent every step, a lean prompt multiplied by 37 steps loses to a fat prompt multiplied by 17.

The author's specific criticism was that nanocoder was "re-reading the same files more than any other harness". An audit found that is not model behaviour, it is a designed-in forced round-trip.

Steps and latency

These are the ones that move step count, which is what the benchmark actually measured.

Tokens

These compound, because tool results persist in the conversation and are re-sent on every subsequent step.

Structural

Open design question

Status (updated 2026-09-15)

All twelve wastage items have landed. #771, a design discussion, is the only thing still open under this issue.

Correction on step count. This section previously read "nothing merged so far has moved that number, every fix to date has been tokens, not steps", and described #760 and #761 as not yet started. That was written before both landed on 2026-08-09, and I never rewrote the prose after ticking the boxes. #760 is specifically a step-count fix: it raised the metadata threshold and made large reads return a preview, so an 800-line file went from five round-trips to one.

The accurate statement is that nobody has measured since the step-count fixes landed. We have no harness that reproduces the benchmark's step count, so we cannot currently say whether the 37.4 figure still holds. Anyone citing this issue as evidence that the step count is unchanged should cite that instead.

What this is waiting on. #1197 builds the evaluation harness (steps, tokens and cost per task) and publishes a baseline against current main. That baseline is the next real update to this issue.

Follow-on design. #1186 is the design record for the structural work, persistent repo map, cross-step deduplication of tool results, and index/LSP lookup tools. Phase 0 (#1197) is approved on its own and the later phases are held behind its numbers. The cross-step dedup mechanism lives in #793.

Caveats worth keeping in mind

The 2.25 vs 2.42 grade gap is not real. The author explicitly warns that run-to-run swing on a single harness can be a full grade, and that under about 10 runs per condition you are mostly measuring noise.

Grading was a single coarse 0-3 scale by one grader over bug-fix tasks only. It can detect "roughly equivalent" but cannot detect quality that exploration might buy on open-ended work. We should fix the mechanical waste, which is not in dispute, without assuming every behaviour the benchmark penalised is actually wrong.

Activity

  1. added
    enhancement
    high-priority
    performance
    on Aug 3, 2026
  2. AryanNandanwar commented on Aug 3, 2026

    @AryanNandanwar
    Contributor

    Hey Will, I'd like to work on this issue

  3. added
    area:agent
    area:tools
    and removed on Oct 7, 2026
  4. will-lamerton commented on Oct 7, 2026

    @will-lamerton
    MemberAuthor

    Every item tracked here has been closed. What's left is the subagent-scope discussion in #771 and the measurement harness in #1197, and both are tracked on their own. Closing the tracker.

  5. removed
    high-priority
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentarea:toolsenhancementperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions