🤖 fix: Token Budget stage Continues ignore turns whose end an outside client owns (ACP, xum run)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 34/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 2.1k
- フォーク
- 139
- 平均マージ
- 3時間 35分
- マージ済み PR(30日)
- 950
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/xum のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
riverqueue/river#1576 ·
メンテナーはふだん 1 日以内に返信
-
[bug] A prompt queued during a run is assessed without its text対応中かも @jwiegley が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
DevMortimer/pi-warden#211 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
mattermost/compass-design#191 ·
メンテナーはふだん 1 日以内に返信
-
Add unit tests for the organization admin role check対応中かも @SaffuSafwan が今日担当しました。 オープンarea/core good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
HorusGoul/trizum#559 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信