Skip to content

[Bug]: OpenCode harness does not expose native usage, pricing, and context data #8661

Closed as duplicate

Description

@pantharshit007

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Related work: #8388 tracks the missing live OpenCode context meter, and Ideas discussion #6909 tracks broader OpenCode history on the Usage page. This report focuses on wiring the native data OpenCode already provides into the same harness surfaces used by Codex and Claude Code.

Area

apps/server, apps/web, packages/contracts or packages/shared

Steps to reproduce

  1. Configure and connect an OpenCode provider in T3 Code.
  2. Start an OpenCode thread and send one or more prompts using a model that reports usage.
  3. Inspect the usage/context information next to the composer and compare it with an equivalent Codex or Claude Code thread.
  4. Open the Usage section and look for the OpenCode thread/provider data.

Expected behavior

The OpenCode harness should consume and expose the usage metadata that OpenCode already provides, with parity to Codex and Claude Code where the data is available:

  • show current and cumulative token usage and the model context limit in the composer context meter
  • include input, output, cached, and reasoning token fields when OpenCode reports them
  • calculate and display the corresponding price/cost using the model pricing data, or clearly identify the value as unavailable when pricing is not known
  • include OpenCode activity in the Usage section, including provider/model breakdowns and cost totals
  • keep the values tied to the active OpenCode session/model and avoid presenting estimates as subscription invoices

Actual behavior

OpenCode usage data is not fully hooked into T3 Code’s existing harness usage pipeline. The composer does not reliably show the native context and token information, and OpenCode activity/cost data is absent or incomplete in the Usage section. As a result, OpenCode users cannot see the same context and price information that is available for Codex and Claude Code, despite OpenCode providing the underlying data.

Impact

Minor bug or occasional failure

Version or commit

Latest main

Environment

T3 Code web or desktop app with the OpenCode provider; model and OpenCode version may vary depending on the usage fields exposed by the provider.

Logs or stack traces

No error is shown. This appears to be missing provider-to-harness usage wiring rather than a provider request failure.

Workaround

Inspect usage directly through OpenCode. There is no equivalent in-app context and price view for OpenCode.

Activity

  1. pantharshit007 commented on Aug 29, 2026

    @pantharshit007
    Author

    discussion already going on maybe will reopen this in future #6909

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions