🤖 perf: the chat-input handoff countdown uses provider usage while Token Budget stages open on the request estimate
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
Start with src/common/utils/compaction/autoCompactionCheck.ts and src/browser/components/CompactionWarning/CompactionWarning.tsx, then read tests/ipc/tokenBudgetStages.fixture.integration.test.ts and the referenced changes in #7214 and #7332. Trace how the request estimate reaches the renderer and how the countdown is shown. Done when Token Budget mode never displays a handoff countdown after the handoff row has been delivered.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found by the Codex review of #7332 (thread PRRT_kwDOPxxmWM6vk5R2). The problem already exists on main. No fix is in #7332.
Problem
In Token Budget mode, the chat-input bar counts down with "Handoff target in N% usage". It computes N from provider-reported usage (checkAutoCompaction in src/common/utils/compaction/autoCompactionCheck.ts, rendered by src/browser/components/CompactionWarning/CompactionWarning.tsx). The handoff and final stages open on the request estimate instead:
- Since #7214, the turn start opens a stage when the built request's estimate reaches its point.
- #7332 makes settlement use the same next-request estimate.
The estimate runs above provider usage (OpenAI about 1.3–1.6 times, Claude about 1.04–1.36 times, see #5223). So the handoff row can already be delivered while the bar still shows "Handoff target in N% usage". At a 70% target and 1.3–1.6 times, the handoff comes at about 44–54% provider usage. The bar stays hidden until 60%.
Evidence
- On main, the fixture test "estimate-only crossing (R2a)" in
tests/ipc/tokenBudgetStages.fixture.integration.test.tsdelivers a handoff while saved usage stays far below every stage point. CompactionWarning.tsxbuilds the countdown text fromusagePercentageonly.
Options
- Show the request estimate in the bar: send the last request estimate to the renderer and count down from it.
- Drop the countdown in Token Budget mode: show only "Past the handoff target" after the handoff row exists, and no percentage before.
Acceptance
- In Token Budget mode, the bar never shows a countdown to a handoff that the window already received.
Refs #5223, #7214, #7332.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $527.71
- Ngôn ngữ chính
- TypeScript
- Star
- 2.1k
- Fork
- 140
- Merge trung bình
- 3 giờ 23 phút
- Pull request đã merge (30 ngày)
- 953
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/xum
-
🤖 tests: lock in git status outgoing-count rename equivalence and clarify index-lock commentĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🤖 fix: Daytona startAndWait can start a sandbox after its deadline and then report a timeoutĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
coder/xum#7358 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Add: ON Phim Viet SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Subagent progress token count ignores usage.iterations and swings on multi-iteration responsesĐang mởarea:agents area:cost bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
anthropics/claude-code#105375 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
galaxyproject/loom#616 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
e2e-failure ready-to-code
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày