[Feature]: Track actual Agent token usage per turn and measure context costs
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- electron, typescript
- 領域
- desktop-dev
調査の方向性
Start from the desktop Agent turn code that issues model calls and collects provider usage fields, and from the chat context indicator fed by #312 so the cumulative summary stays separate from it. Read the Workbench usage accounting from #653 before adding any new measurement path. Done means multi-call turns sum usage without double counting, missing usage is shown as incomplete, and summaries persist across restart. The maintainer has not yet confirmed scope, so agree on it before implementing.
索引モデルが issue の本文から書いたものです。
説明
Problem
Splitting the AI-token feedback out of #677, as requested by the maintainer. The reporter describes roughly 62,000 tokens used for AI editing and difficulty understanding which settings reduce consumption. This is a user report, not a reproduced measurement.
Current context occupancy and cumulative tokens consumed across an Agent turn answer different questions: a multi-step turn may send context repeatedly.
Existing work
- #312 already feeds the chat context indicator from the native chat-budget path, including compacted model context. Preserve it and distinguish it from cumulative usage.
- #653 already adds Workbench usage accounting and versioned measurement/replay tooling (part of #459). Reuse this rather than build another measurement system.
- I found no currently open PR dedicated to desktop per-turn usage and context-cost measurement. Please flag overlapping work before implementation.
Proposed first increment
- Aggregate provider-reported input/output tokens across model calls in a desktop Agent turn. Include cached/reasoning details when available without double-counting subsets of totals.
- Show a concise per-turn summary separate from the context indicator. Mark missing/partial usage as unavailable/incomplete, not zero; clearly label any estimates.
- Persist the summary with chat messages so reopening a project preserves it. Store usage metadata only, without credentials or raw provider payloads.
- Measure short/long transcripts and repeated editing turns in reproducible Workbench scenarios. Record provider/model, call count, usage completeness and editing outcomes alongside token totals.
Follow-up based on evidence
Compare range-limited transcript reads, smaller tool results, less repeated project context or adjusted compaction only after identifying the bottleneck. Verify editing outcomes alongside any token reduction.
Exact pre-run cost promises and hard token caps are outside this first increment and need separate design discussion.
Validation
- Multi-call turns sum available usage without double counting; missing/partial usage is explicit.
- Usage remains attached to the originating project/session/turn when sessions switch during a run.
- Completed-turn summaries survive restart and project reopening.
- Claimed reductions include reproducible before/after evidence and editing-quality checks.
I am interested in taking on the initial usage-accounting and measurement work if this scope fits the project direction.
- 主要言語
- TypeScript
- スター
- 3.7k
- フォーク
- 231
- 平均マージ
- 15時間 10分
- マージ済み PR(30日)
- 324
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getopenscreen/openscreen のほかの issue
-
Native review wanted: machine-translated recording bar tooltips (14 locales)再び着手できるかも @auberginewly が 22 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getopenscreen/openscreen#913 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: Windows update click opens the full NSIS wizard instead of a UAC prompt対応中かも @EtienneLescot が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
getopenscreen/openscreen#1437 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
getopenscreen/openscreen#1436 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
getopenscreen/openscreen#1435 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
getopenscreen/openscreen#1431 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
getopenscreen/openscreen の issue をすべて見る
似ている issue
-
BeOS .json missingオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mihaip/infinite-mac#475 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
marmelab/atomic-crm#401 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Deltares/webgl-streamline-visualizer#83 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信