Skip to content

fix(desktop): 単発TODOで介入送信が無視される問題を修正#194

Merged
MocA-Love merged 4 commits into
mainfrom
fix/189-intervention-single-turn
Apr 16, 2026
Merged

fix(desktop): 単発TODOで介入送信が無視される問題を修正#194
MocA-Love merged 4 commits into
mainfrom
fix/189-intervention-single-turn

Conversation

@MocA-Love
Copy link
Copy Markdown
Owner

概要

Issue #189 の対応。AgentManager のタスク詳細ペインから「次のターンに注入する介入表示」でメッセージを送ると UI 上「予約済み」になるものの、Claude 側には一切届かなかった。

根本原因

`verifyCommand` 無しの単発TODOでは、`supervisor.runSession` が iteration 1 完了直後に
`status: "done"` を書いて `return` していた。`pendingIntervention` は次イテレーションの冒頭で読み出して Claude に渡す設計なので、次のイテレーションが発生しない単発モードでは永遠に読まれない。

修正

単発モードの完了分岐でも `pendingIntervention` を再チェックし、未処理分があれば done を書かずに `continue` して次イテレーションへ回すようにした。verify モードが既に持っている合流点に寄せただけで、セマンティクスは「介入が無ければ1ターンで done」「あればその分だけ延長」になる。

Test plan

  • verify 無しで単発TODOを作成→開始→介入メッセージ送信→Claude が実際にそのメッセージを受け取って追加ターンを実行
  • 介入を送らなければ従来どおり 1 ターンで done になる
  • 介入後に maxIterations 上限に達するとエスカレートする

Closes #189

verifyCommand 無しの単発TODOでは iteration 1 完了直後に
status=done を書いて return していたため、ターン実行中に
queueIntervention された内容が pendingIntervention に残り
Claude に永遠に届かなかった。

ターン終了時点で pendingIntervention が残っていれば done
マークを付けず次のイテレーションへ継続するようにした。
verify モードで既に使っているのと同じ合流点に寄せた修正。

Closes #189
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 15, 2026

Warning

Rate limit exceeded

@MocA-Love has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 3 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 58 minutes and 3 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b495cc3d-12c3-4ff7-adaa-0e44b4720381

📥 Commits

Reviewing files that changed from the base of the PR and between 58c8e6f and 06debb9.

📒 Files selected for processing (2)
  • apps/desktop/src/main/todo-agent/supervisor.ts
  • apps/desktop/src/renderer/features/todo-agent/TodoManager/TodoManager.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/189-intervention-single-turn

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

従来はイテレーション境界でしか介入が届かなかったが、通常の
Claude Code のようにいつでも割り込めるように改修。

runClaudeTurn 内に 500ms ポーリングを追加し、
pendingIntervention が設定されたら即座に child を SIGINT →
while ループに interrupted フラグで戻し、次のイテレーション
で --resume + 介入プロンプトとして Claude に届ける。

UI ヒントテキストも「数秒以内に自動割り込み」に変更。

Refs #189
@MocA-Love MocA-Love merged commit 2fcd6e8 into main Apr 16, 2026
6 checks passed
@MocA-Love MocA-Love deleted the fix/189-intervention-single-turn branch April 16, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant