GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): retain OpenCode V2 per-turn token usage by saphid · Pull Request #9937 · pingdotgg/t3code

Conversation

@saphid

@saphid saphid commented Sep 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

OpenCode V2 now records per-turn token usage from step-finish events, deduplicating step IDs and carrying input, cache, output and reasoning totals into the turn. Completed turns report complete usage, interrupted/failed turns preserve partial usage, and turns without usage data report unavailable rather than zero. Subagent presence is tracked separately from the main-agent totals.

Current head ea21a4983 includes current V2 base 3aa47e294 and the shared test-only prerequisite #10865. Merge #10865 first; the topic itself changes 2 files. This rebuild removes the obsolete merged-base history from the PR diff.

Validation: 58 focused tests pass across the affected feature and foundation persistence coverage. Scoped server typecheck passes; targeted lint, formatting and diff checks pass. After merging the latest V2 base, 24 OpenCode adapter and targeted queued-cancellation replay tests pass; server typecheck passes. New-head CI is pending.

Independent cross-provider review was unavailable: the direct Claude Opus 5 high launcher in this audit exited 1 with expired OAuth before inference. No Claude review is claimed.

Targets Orchestrator V2 in #2829. Updated with GPT-6 in Codex/T3.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This focused fix restores per-turn token accounting and changes provider-turn usage data consumed by analytics and potentially metering. The implementation is isolated and tested, but the billing/usage surface warrants human review.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from 9242b91 to 3d81172 Compare September 8, 2026 03:31
@saphid

saphid commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Independent automated first-pass review (Amp/Astra agent mode) against base 415ed0f: no actionable findings. Verified in source: usage normalization matches the pinned OpenCode v1.15.13 conversion; step-ID dedup handles replay; root/child accumulation stays separate; unavailable/partial shapes satisfy the TurnTokenUsage contract; hasSubagents is only set on task tools; tokens fields are SDK-required and defensively clamped. One note: the PR-side diff vs the current base tip is inflated because the base branch advanced past 415ed0f; the contribution itself remains the two adapter files.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 8, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

juliusmarminge and others added 19 commits September 7, 2026 23:12
@juliusmarminge @codex
fix(mobile): allow archiving post-provider work
e0f89c5
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(mobile): distinguish queued and waiting archive states
2e776a8
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(cursor): log close attempts before execution
e6d5c09
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(acp): discover final teardown descendants
b13443d
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(checkpoints): preserve valid run history
03d044b
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(orchestration): preserve imported conversation state
3c658ad
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(acp): enforce task and permission invariants
c252769
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(testkit): harden provider replay recording
5941af5
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(server): isolate deterministic attachment ids
3d4a365
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(claude): preserve explicit model options
e596525
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(web): enforce secure provider field defaults
eb63d51
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(client): preserve live thread relationships
3cbe7fb
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(checkpoints): retain thread-start baseline after failed runs
12fbe64
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(mobile): gate thread controls on live runs
4ce4c48
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(orchestrator): address late review findings
452d3d5
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(orchestrator): handle fresh review edge cases
7709348
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(orchestrator): harden provider edge cases
8dc3ad5
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(orchestrator): execute resolved runtime responses
0f87bec
Co-authored-by: codex <[email protected]>
@juliusmarminge @codex
fix(orchestrator): release stranded effect claims
b54f3f8
Co-authored-by: codex <[email protected]>
juliusmarminge added 13 commits September 7, 2026 23:12
@juliusmarminge
feat(mcp): expose the existing thread search query (pingdotgg#10561)
90335b9
@juliusmarminge
feat(mcp): expose scheduled task run-now (pingdotgg#10562)
e060fec
@juliusmarminge
feat(mcp): expose project service operations (pingdotgg#10563)
e64c1bb
@juliusmarminge
feat(mcp): expose attachment upload and send (pingdotgg#10564)
892c468
@juliusmarminge
feat(mcp): expose project thread launch service (pingdotgg#10565)
cc2a95e
@juliusmarminge
feat(mcp): expose branch-backed workspace discovery (pingdotgg#10566)
054a37d
@juliusmarminge
fix(orchestration): map late steering to follow-up turns
a6bbe8b
- Re-route steering that races completion into idempotent follow-up dispatches
- Preserve scheduled-task attribution and provider ownership history across clients
@juliusmarminge
fix: reconcile main's round-24 features after the rebase
c2eeb89
Port main's pull-request discovery, active thread ordering, async question dismissal, settlement fixes, provider-session import, attachment context, and provider correctness changes into orchestration v2.

Keep the branch's intentional composer and subagent behavior while adopting main's web and mobile fixes. Prevent headless setup terminals from hanging on the color probe, and move the v2 migration block to 050-061 after main claimed 048-049.
@juliusmarminge
chore: remove accidentally committed audit artifacts
5b42579
@juliusmarminge
fix(ci): repair rebased checks and stop duplicate runs
c8e30f9
Restore the failed-before-start timer guard, align two server fixtures with the reconciled behavior, and remove dead files, exports, and dependencies surfaced by Knip.

Drop the temporary branch push trigger now that the PR is mergeable, so each update runs the pull-request workflow once.
@juliusmarminge
fix(web): port auto-balance updates to v2 chat
8ca7ee3
Keep main's batch machine-update banner and update action while preserving the v2 runtime-based environment lock used by draft load balancing.
@juliusmarminge
chore: format files exposed by CI
2460494
@juliusmarminge
fix: reconcile main's round-26 updates after rebase
6102d00
Adopt TypeScript 7 and Effect rc.112 across orchestration v2, including the TaggedError API migration and updated Effect-aware tests. Restore main's composer-aware scroll-to-end clearance while retaining selected-model settings sync, preview recording transfer, image galleries, desktop context menus, and layout hit targets. Regenerate the lockfile on the upgraded dependency baseline.
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from efd9994 to 6102d00 Compare September 8, 2026 06:23
juliusmarminge and others added 6 commits September 8, 2026 14:26
@juliusmarminge
fix(web): restore compact load-earlier control
91b1936
@juliusmarminge
perf(orchestration): bound v2 transport payloads
79634b1
Advertise bounded socket snapshots and authoritative dispatch validation, omit raw command output and inline file bodies at the wire boundary, and preserve compact status metadata across web and mobile. Add transport-budget coverage for snapshots, resume, commands, legacy import, and projection maintenance.
@juliusmarminge
fix(web): preserve tool failures after output redaction
7dd9873
@github-actions
fix(server): account for OpenCode turn usage
ef63e9d
@github-actions
test(server): match V2 tool output redaction in retention coverage
2088c00
@github-actions
Merge commit '2088c001d' into HEAD
648221e
@saphid
saphid force-pushed the fix/v2-opencode-usage-20260905 branch from caac367 to 648221e Compare September 9, 2026 00:18
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Sep 9, 2026
juliusmarminge and others added 2 commits September 8, 2026 17:26
@juliusmarminge
fix: restore sidebar behavior after v2 rebases
3aa47e2
Restore pinned-thread shelf classification, server-owned unread state, hidden-subagent-safe project ordering, guarded jump hints, draft upload cleanup, and active-provider archive guards across the current and legacy sidebars.

Bring the surrounding current-main sidebar work forward as well: canonical project favicons, stable row layout, thread file drops, account-aware mobile provider badges, and deferred desktop keyring loading.
@github-actions
Merge commit '3aa47e294fbb7b7cc33b0fb6cd7c19bb4985ff52' into HEAD
ea21a49
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from ed5dc41 to 2b1139a Compare September 10, 2026 19:28
@juliusmarminge

juliusmarminge commented Sep 10, 2026

Copy link
Copy Markdown
Member

Closing as superseded by 95045bb, already on remote v2. The adapter retains normalized per-turn OpenCode step-finish usage, deduplicates step IDs, reports main-agent scope and subagent presence, and distinguishes complete/partial/unavailable totals. Current code additionally checks message ownership to avoid charging unrelated/replayed steps to a turn. All five focused usage cases pass on current v2.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Sep 10, 2026
@simonvanlaak simonvanlaak mentioned this pull request Oct 3, 2026
fix(server): record ACP prompt response turn usage #15233
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@saphid @juliusmarminge @Yusuf007R @maria-rcks @mwolson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.