🤖 fix: Token Budget stage Continues ignore turns whose end an outside client owns (ACP, xum run)
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
- 3-5 ngày
- Mức phù hợp với người mới
- 34/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Start by reading TokenBudgetStrategy.onContextBudgetStepSettled and enqueueContinuation in src/node/services/contextManagement/, then compare the externally owned turn checks in StopContinuationProvenance and AgentSession. Decide how warn and rollover stages should behave when an outside client owns turn completion; done means both paths avoid running an unobserved Continue. The issue says this work belongs to the #5286 lane.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found during review of #7231 (Codex thread PRRT_kwDOPxxmWM6vYpvt). This gap exists on main.
Problem
A Token Budget stage that comes due when a step settles stops the turn and queues a "Continue" (TokenBudgetStrategy.onContextBudgetStepSettled → enqueueContinuation). Nothing in src/node/services/contextManagement/ checks whether a client outside the session owns the turn's end. That client is an ACP prompt, whose prompt() resolves on the stream-end, or a callerOwnsTurnEnd session such as xum run. For such a turn, the client takes the stopped turn's stream-end as completion and can exit. The Continue, and the work after it, then run without that client observing them. enqueueContextContinuation also strips the ACP correlation fields.
The turn.stop hook continuations already gate on this (StopContinuationProvenance.externallyOwnedTurn, AgentSession.isExternallyOwnedTurn). #7231 gates its new refusal-fallback handover the same way, with AgentSession.isExternallyOwnedSend.
Proposed fix
Decide what a budget stage does for an externally owned turn. Option A: do not stop for a warn stage (keep working, and leave the warning for the next send). Option B: keep the stop, but end the turn without a Continue. A rollover stop needs the same decision.
Trigger
The next change to Token Budget settlement. Owner: the #5286 lane.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $512.38
- Ngôn ngữ chính
- TypeScript
- Star
- 2.1k
- Fork
- 139
- Merge trung bình
- 3 giờ 35 phút
- Pull request đã merge (30 ngày)
- 950
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/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 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🤖 fix: xum api exits 0 when a procedure returns success: falseCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/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 85/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
coder/xum#7733 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
"Claude Code request is missing its initial user message" when the prompt starts with an image pathĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
earendil-works/pi-claude-code#31 ·
Maintainer thường phản hồi trong vòng 8 ngày
-
bug pending triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
privatenumber/cleye#48 ·
-
Google text documents are base64-encoded twiceCó thể đã có người làm @feiiiiii5 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ 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