Skip to content

Enforce todo-gated completion for orchestrator mode#11436

Open
0xMink wants to merge 1 commit intoRooCodeInc:mainfrom
0xMink:fix/orchestrator-completion-guard
Open

Enforce todo-gated completion for orchestrator mode#11436
0xMink wants to merge 1 commit intoRooCodeInc:mainfrom
0xMink:fix/orchestrator-completion-guard

Conversation

@0xMink
Copy link
Contributor

@0xMink 0xMink commented Feb 12, 2026

Summary

Fixes #11435

  • Force preventCompletionWithOpenTodos = true for orchestrator mode regardless of user setting
  • Block orchestrator completion when no todo list exists (require a plan before completing)
  • Existing behavior for non-orchestrator modes is unchanged

Companion to #11434 which addresses the visibility side (todo list in system prompt).

Test Plan

  • Orchestrator + no todo list: completion rejected, task.ask("completion_result") not reached
  • Orchestrator + empty todo list: completion rejected
  • Orchestrator + incomplete todos (setting disabled): completion rejected regardless
  • Orchestrator + all completed: completion allowed
  • Non-orchestrator mode: unchanged behavior
  • All 16 tests passing (11 existing + 5 new)

Orchestrator mode can prematurely complete tasks when context
condensation causes the model to lose track of outstanding work.
Force preventCompletionWithOpenTodos for orchestrator mode regardless
of the user setting. Also require a todo list to exist before
orchestrator completion is allowed — completion without a plan is
structurally premature.
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Feb 12, 2026
@roomote
Copy link
Contributor

roomote bot commented Feb 12, 2026

Rooviewer Clock   See task

Reviewed the changes to AttemptCompletionTool.ts and the 5 new tests in attemptCompletionTool.spec.ts. No issues found -- the orchestrator guard logic is correct, well-placed relative to existing checks, and all 16 tests pass.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orchestrator can complete tasks prematurely without verifying todo completion

1 participant