Skip to content

feat: Codex beta provider with API-equivalent cost (v2.3.0) - #93

Merged
Carl723000 merged 135 commits into
mainfrom
codex/v2.3.0-lineage-r6
Aug 28, 2026
Merged

Carl723000 merged 135 commits into
mainfrom
codex/v2.3.0-lineage-r6

Conversation

@Carl723000

@Carl723000 Carl723000 commented Aug 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds Codex as a beta provider on the shared dashboard, with the same overview, time-range, session, project, settings, and responsive UI foundations used by Claude.
  • Adds API-equivalent cost and weekly allowance-value estimates from local token logs.
  • Merges usage from multiple sign-ins found in one Codex home while keeping quota observations conservative.
  • Keeps verified usage visible, with progress and explicit partial-state wording, while a large Codex index converges.
  • Accelerates one-time Codex backfills with a bounded adaptive local worker pool, then returns completed indexes to the existing low-power incremental path.
  • Fixes [Bug]: v2.2.2 — one changed file re-reads the entire 1.1 GB corpus; Extension Host pegged at 100% CPU / 3.9 GB RSS #87 by moving Claude runtime refresh onto an exact in-memory per-file index; unchanged refreshes read zero JSONL bodies and changed files no longer trigger full-corpus aggregation.
  • Resolves Claude quota credentials from the active profile and locks the established transcript deduplication semantics with regression fixtures.

Metric semantics and limits

  • Request-level Codex attribution prefers the input, cached-input, output, and reasoning components in a valid last_token_usage snapshot. Its total_tokens is active-context size, not usage attributed to that request.
  • A full numeric total_token_usage plus last_token_usage signature suppresses only proven replay from the same pseudonymous rate-limit source or an immediately adjacent duplicate. The persisted replay map is bounded; raw account or rate-limit identifiers are not stored.
  • If last_token_usage is absent, cumulative total_token_usage remains a compatibility fallback and is reduced through the existing component-wise lineage high-water rules.
  • Existing fork/lineage reconciliation remains the ownership layer. Parallel per-file passes publish results in deterministic order, and regression tests require the complete parallel index DTO to equal the serial result.
  • The parser-state upgrade triggers one fail-closed reindex. Pre-upgrade contributions stay out of displayed usage until rebuilt, while completed files and their verified subtotal survive partial checkpoints and extension restarts.
  • API-equivalent cost applies current official API token prices to locally recorded usage. It is an estimate, not a bill, subscription charge, or official quota value.
  • Unknown Codex models remain unpriced. Pricing coverage uses all processed tokens in the selected scope as its denominator.
  • Reasoning tokens are a subset of output tokens and are never charged twice. A priced cost card displays $…; a scope with no priceable tokens displays — rather than a manufactured zero.
  • During incomplete indexing, the dashboard shows only the verified indexed subtotal and current progress; unverified legacy totals are excluded.
  • Stable duplicate-session identity ambiguity retains both local copies and a visible quality warning, but no longer falsely leaves an otherwise complete index labelled as still running.
  • Usage from multiple logins in the same Codex home is combined. Quota cards show the last observation and are not summed because Codex logs do not provide a reliable account identity.
  • Codex remains beta. Branches, Workflows, Cache Warmth, and content attribution remain Claude-only.

Indexing performance and runtime boundaries

  • A first or incomplete Codex backfill uses up to half the available logical CPUs, capped at six local file-pass workers. Main, lineage, period, and identity passes remain independently bounded and checkpointed.
  • Live progress remains frequent. Large durable snapshots are coalesced to roughly every 10 seconds, 2 GiB, or 256 completed passes, plus stage boundaries; a small warm append is saved exactly once.
  • Global lineage is reconciled only in stages that can change it. Completed indexes dispose the extra workers and return to the 64-pass / 128-MiB automatic budget; unchanged refreshes read no usage JSONL body and write no index.
  • On the maintainer's 16-logical-CPU machine, a read-only cold benchmark rebuilt 2,117 files / 20.79 GB to complete coverage in 66.7 seconds, including 34.75 GB of main and lineage pass I/O and 21 durable checkpoints. This is corpus- and hardware-specific evidence, not a universal performance guarantee.
  • Claude's production index is in memory for v2.3.0: one Extension Host cold-build remains, but subsequent append/truncate/replace/move/delete updates touch only affected files and aggregate groups. On a 681-file / 352.7-MB local corpus, cold build took 3.34 seconds; an unchanged incremental update took 8 ms with zero body reads, parsed lines, and aggregate mutations.

Claude-side changes

Attribution

Deferred work

  • Accepted for v2.3.1: the German header clipping near a 980 px viewport.
  • Accepted for v2.3.1: corrupt-index quarantine cleanup, including stale *.lock.pending-* directory reclamation.
  • Accepted for v2.3.1: provider-aware model-name variants.
  • Automatic attribution of $20/$100/$200 subscription tiers remains deferred because local Codex logs do not expose a reliable account-plus-plan identity. A future implementation must be explicit opt-in rather than guessed.
  • Provider-specific visual adaptation remains follow-up work; this PR keeps Codex inside the established shared-dashboard design system.

Validation

  • npm run test:release
    • Node: 588 tests — 587 passed, 0 failed, 1 capability-gated skip
    • Playwright: 53/53 passed
  • The token-semantics fixtures cover exact last usage, interleaved sources, same-source replay, cross-source reset reuse, last-only and missing-last records, cache aliases, counter regressions, persisted bounded replay evidence, and interrupted one-time reindex resumption.
  • New performance-semantic fixtures cover parallel/serial deep equality, worker cancellation and disposal, resumable checkpoint cadence, no duplicate final save, stable ambiguity wording, Claude full-loader equivalence, append tails, incomplete tails, request-ID cardinality changes, truncate, atomic replacement, move, delete, content UUID ownership, failed-read atomicity, and bounded 100-file updates.
  • Final local candidate: claude-code-usage-2.3.0-codex-beta-r10.vsix, 82 files, 872,284 bytes, SHA-256 1215c1c31584908cbda7d41d722bd473ef19d0f68315bf8b4214f02a563103fa. Package policy, ZIP integrity, and isolated macOS VS Code installation all passed; the isolated install reports growthjack.claude-code-usage@2.3.0.
  • package.json remains at 2.1.1; Release Drafter is intentionally driven by the maintainer-approved feature and minor PR labels for the v2.3.0 minor release.

🤖 Generated with OpenAI Codex

Carl723000 and others added 30 commits August 21, 2026 20:28
Capture the approved provider experience, incremental indexing, local optimization guidance, announcement cleanup, and release acceptance criteria in bilingual review documents.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Translate the approved design into three self-reviewed, TDD-oriented implementation plans covering release hygiene, provider/index architecture, and the Codex-specific product experience.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Add a pure, tested full-version selector so upgrades never fall back to stale major/minor release notes and fresh installs stay quiet.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Wire exact-version v2.3.0 release notes into the extension, add a default-on opt-out setting, keep fresh installs quiet, and localize the announcement across all eight UI languages.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Update the bilingual agent policy and architecture for the approved v2.3.0 provider boundaries, record the released v2.2.1 date, and preserve the existing automation hardening assertion.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Add explicit provider token, confidence, outcome, event, and limit contracts with tested processed and fresh-input semantics that prevent cached and reasoning subsets from being double-counted.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Add a golden-tested compatibility adapter that wraps the existing Claude all-time aggregation without changing token or cost results.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Add minimal schema guards and a synthetic-fixture-tested high-water parser for cumulative Codex token snapshots, turn context, subset semantics, quality flags, and local last-observed limits.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Exclude inherited parent counters, flag regressions without negative usage, pseudonymize session/project lineage metadata, distinguish approval reviewers, and retain only structural tool facts.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Codex discovery is restricted to session JSONL allowlists, keeps raw paths in memory only, and differentiates append, truncate, replacement, move, and deletion for incremental indexing.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Store only privacy-safe per-file aggregates, tail unchanged logs from the last byte offset, reuse archived sessions, and retain verified totals when one file fails.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Run local manifest discovery and incremental parsing in a cancellable single-flight worker, with privacy-safe progress, results, and errors.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Add the extension-facing Codex provider lifecycle, preserve the last verified snapshot on failure, and emit only anonymous index diagnostics.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Add safe default-on local Codex aggregation, a 30-second quiet watcher option, explicit status-bar provider and metric choices, and localized settings across all UI locales.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Aggregate recent-task, 7-day, 30-day, and project views with Codex-native processed, fresh, cache, reasoning, model, effort, lineage, coverage, and quality semantics.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Add deterministic local guidance for child-thread fresh usage, high-effort small changes, repeated post-change command structure, cache context, and approval-reviewer overhead.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Render Codex-native usage scopes, dimensions, coverage, last-observed limits, local optimization cards, and a side-by-side provider comparison without cost or quota equivalence.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Add provider-aware dashboard selection, Codex-only startup support, side-by-side comparison, interactive Codex scopes, and complete localized provider copy across all eight UI locales.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Create the local Codex provider without eager scanning, refresh it in a background worker, watch only allowlisted log roots with a 30-second quiet debounce, and switch status metrics without losing Claude state.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Document provider-specific metrics, local privacy boundaries, watcher controls, and release behavior across all seven README editions while preserving the original PR #38 credit.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Treat child counters as independent, preserve lineage across repeated metadata, map guardian sessions to approval reviewers, and ignore known non-usage envelopes. Clarify the local-content privacy boundary in every README.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Record the verified test suite, final VSIX audit, isolated activation smoke test, privacy-safe 2.58 GB benchmark, beta boundaries, and maintainer release path in Chinese.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Define the provider-native modules, shared visual language, behavior diagnostics, settings integration, and R2 verification plan.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Add detailed thread and daily rows, all-time and monthly scopes, token composition, and provider-native behavior metrics with focused tests.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Add eight provider-native modules, rolling and monthly chart data, Claude-style bar and composition visuals, compact formatter hooks, and behavior summaries.

---
🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---

🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---

🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

---

🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>

🤖 Generated with [OpenAI Codex](https://developers.openai.com/codex/)
Carl723000 and others added 13 commits August 21, 2026 20:36
Replace the parallel Codex render stack with provider-aware dashboard functions, rebuild Sessions as eight columns with expandable details, and retire obsolete Codex-only UI files and snapshots.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Use one uncached terminology family across all eight locales and settings copy while preserving internal field names and persisted values.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Restore expanded rows, table sorting, chart metrics, active destinations, and scroll position through the VS Code webview state API.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Replace semitransparent chart aliases used as solid fills, strengthen active and sortable text cues, and remove production DEBUG console output without suppressing real errors.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Document the Codex beta shared dashboard, uncached terminology, privacy and cost boundaries, faithful UI harness rules, and the distinct product and development-tool roles.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Rebuild token lineage from ordered numeric fingerprints, remove only verified copied prefixes, preserve independent siblings, migrate legacy indexes safely, and expose incomplete backfill progress and missing-parent quality in the shared dashboard.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Document the numeric lineage contract, conservative missing-parent behavior, active/archive overlap handling, legacy-index rebuild, and the user-visible incomplete-index progress state in English and Chinese.

Co-authored-by: Claude <noreply@anthropic.com>

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Retain the v2.3.1 benchmark and fixture sources while explicitly excluding the prototype and benchmark artifacts from the published VSIX.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Merge multi-sign-in usage while retaining last-observed limits, publish persisted verified subtotals during index convergence, and add API-equivalent cost and weekly value estimates. Keep Claude quota credentials aligned with the active profile, including the default-profile-only Keychain boundary (#89).

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
@Carl723000
Carl723000 requested a review from jack21 as a code owner August 24, 2026 11:28
@Carl723000 Carl723000 added feature Minor bump — new feature minor Minor bump labels Aug 24, 2026
Carl723000 and others added 10 commits August 26, 2026 01:18
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Cover copied replay prefixes, post-fork counter resets, independent identical siblings, nested forks, and persisted replayed appends with exact last-usage snapshots. Preserve the existing cumulative-fallback fixtures and runtime behavior.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Remove insertion-order sensitivity from the existing cumulative scan-parity test and the new exact-last test. Compare complete payloads by file key and explicitly verify a reversed file map, preserving all token and lineage assertions.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Use a bounded adaptive worker pool, coarser resumable checkpoints, and stage-aware lineage reconciliation for one-time Codex backfills while preserving the low-power steady-state path. Move Claude runtime refreshes onto an exact in-memory per-file incremental index so changed files no longer trigger full-corpus body reads or full-record aggregation.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Unify reset-aligned periods, withhold ambiguous allowance inference, add Codex cache-hit parity, and make the weekly value panel a dashboard-only setting without changing the index schema.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Use the localized Today label without changing recent-task semantics, and keep rolling 30-day charts and tables inside reliable horizontal scrollers.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Give the rolling 30-day table an explicit readable track width so Linux and macOS Chromium both expose the local horizontal scroller.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Make Today a real calendar-day scope with a targeted resumable hourly sidecar, default daily and monthly charts to API-equivalent cost, preserve unknown-model pricing boundaries, and align shared Claude/Codex time-series layouts.

Co-authored-by: OpenAI Codex <215057067+openai-codex[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Minor bump — new feature minor Minor bump

Projects

None yet

1 participant