Skip to content

bug(drivers): opencode and aider report no token usage and no typed errors, so conformance items 3 and 5 cannot pass #1115

Open

Description

@admarble

Found by: #1096 (driver conformance suite) — this issue backs the gap: #N skip reasons its opencode and aider adapters record.

Problem

Two of the six conformance contract items (#1096) cannot pass for opencode or aider, because the drivers never populate the fields the items assert on.

Item 5 — structured outcome (tokensUsed > 0):

Item 3 — typed error mapping (BillingError / RateLimitError):

Why it matters

The conformance suite's honest answer today is a typed skip. That is the right outcome for a contract test, but it means two of four registered drivers silently report $0.00-equivalent usage and untyped failures, and nothing else in the repo flags it. claude-code and codex both have a structured path; these two are the outliers.

Acceptance criteria

  • AC-1: OpencodeDriver.executePhase returns modelUsage with non-zero inputTokens/outputTokens for a completed run, derived from opencode's own usage signal (identify it first — step_finish may carry tokens alongside cost)
  • AC-2: AiderDriver.executePhase returns a usage signal for a completed run, or the driver documents in code why aider exposes none and the conformance skip stays structural: rather than gap:
  • AC-3: an opencode usage-limit failure yields BillingError with the reset time in metadata; a transient throttle yields a retryable RateLimitError (fixture text captured from a real run, not synthesized)
  • AC-4: #1096's opencode and aider adapters drop the corresponding gap: #<this issue> skips and assert instead
  • AC-5: npm run build && npm test green

Not in scope

The codex side of item 3 — #1087 owns that mapping.

Related

#1096 (the suite that found this) · #1087 (codex counterpart) · #986 (token metrics) · #862 / #992 (opencode driver) · #804 · #592

🤖 Generated with Claude Code

Activity

  1. added
    bug
    multi-agent
    on Sep 20, 2026
  2. added a commit that references this issue on Sep 28, 2026
  3. admarble commented on Sep 28, 2026

    @admarble
    ContributorAuthor

    Progress: #1204 merged. AC-1 is done: opencode reports modelUsage from step_finish.part.tokens. AC-4 is partly done: the opencode item-5 conformance skip was replaced with a real assertion.

    Still open, blocked on real captures (nothing synthesized):

    • AC-2 (aider usage): aider.ts captures stdout, but the repo has no real aider output, and aider is not installed on the dev machine. Needed: verbatim stdout and stderr from a real run with the driver's exact args (--yes --no-auto-commits --no-pretty --message …), committed as a fixture with a PROVENANCE.md line. If that run shows aider prints no usage line under --no-pretty, that is the evidence for the AC's "document why, structural: skip" branch.
    • AC-3 (typed opencode quota errors): the mapping goes in evaluateOpencodeRun's parsed.errors branch, following codex's USAGE_LIMIT_RE/THROTTLE_RE. Needed: real opencode run --format json stdout and stderr from one usage-limit run and one throttled run. Keep stderr, since it isn't known yet whether provider errors arrive as error events.
    • AC-4 remainder: the item-3 opencode skips and the aider skips come off once AC-2 and AC-3 land.
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

    bugmulti-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions