Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jan 6, 2026

Summary

Modifies the extension so that when the AI model produces a message without any tool calls, it's treated as a follow-up question instead of an error.

Linear: https://linear.app/roocode/issue/ROO-400

Behavior

autoApprovalEnabled alwaysAllowFollowupQuestions Behavior
Auto-continues, tells model to use a tool
Shows message to user, waits for response
Shows message to user, waits for response
Shows message to user, waits for response

Changes

  1. packages/types/src/followup.ts - Added hideHeader?: boolean flag to FollowUpData interface
  2. src/core/task/Task.ts - Modified no-tool handling to present as follow-up instead of error
  3. webview-ui/src/components/chat/ChatRow.tsx - Added logic to hide "Roo has a question" header when hideHeader is true
  4. src/core/prompts/sections/tool-use.ts - Relaxed strict tool-per-message requirement
  5. Tests - Added comprehensive test coverage, updated snapshots

Key Improvements

  • Removed error treatment (MODEL_NO_TOOLS_USED) for no-tool responses
  • Removed consecutiveMistakeCount increment for this scenario
  • Added hideHeader flag to avoid showing "Roo has a question" header when not appropriate
  • Made tool-per-message requirement conditional in system prompt

Testing

  • 6 unit tests added in no-tool-followup.spec.ts
  • 13 snapshot updates for system prompt tests
  • All 5107 tests passing

Important

Treats AI messages without tool calls as follow-up questions, adding a hideHeader flag for UI control and updating logic for auto-approval settings.

  • Behavior:
    • Messages without tool calls are treated as follow-up questions instead of errors in Task.ts.
    • Introduces hideHeader flag in FollowUpData to control UI display in ChatRow.tsx.
    • Updates logic in Task.ts to handle different configurations of autoApprovalEnabled and alwaysAllowFollowupQuestions.
  • Tests:
    • Adds no-tool-followup.spec.ts with 6 unit tests to verify new behavior.
    • Updates 13 snapshot tests for system prompt changes.
  • Misc:
    • Removes MODEL_NO_TOOLS_USED error handling.
    • Adjusts tool-use.ts to relax tool-per-message requirement.

This description was created by Ellipsis for 0da4d35. You can customize this summary. It will automatically update as commits are pushed.

- Add hideHeader flag to FollowUpData interface to optionally hide 'Roo has a question' header
- Modify no-tool handling in Task.ts to present as follow-up instead of error
- Update ChatRow.tsx to conditionally hide header when hideHeader is true
- Relax strict tool-per-message requirement in system prompt
- Remove error treatment (MODEL_NO_TOOLS_USED) for no-tool responses
- Remove consecutiveMistakeCount increment for no-tool scenarios
- Add comprehensive test coverage
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners January 6, 2026 22:28
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Jan 6, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 6, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

All changes were reviewed and the implementation is correct:

  • packages/types/src/followup.ts - hideHeader flag properly added to interface and schema
  • src/core/task/Task.ts - No-tool handling logic correctly treats responses as follow-up questions
  • webview-ui/src/components/chat/ChatRow.tsx - Header hiding works correctly to prevent duplicate text
  • src/core/prompts/sections/tool-use.ts - Tool requirement relaxation is appropriate
  • Tests - Comprehensive coverage in no-tool-followup.spec.ts
  • E2E tests - alwaysAllowFollowupQuestions: true correctly added to integration test configurations
Previous reviews

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

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Jan 6, 2026
TOOL USE
You have access to a set of tools that are executed upon the user's approval. You must use exactly one tool per message, and every assistant message must include a tool call. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know how much this change impacts things?

@daniel-lxs daniel-lxs marked this pull request as draft January 6, 2026 23:15
- Add nonInteractive: true to CLI integration test
- Add alwaysAllowFollowupQuestions: true to vscode-e2e tests
- Ensures tests auto-continue when model doesn't use tools
- Fixes timeout issues introduced by relaxed tool requirement in system prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: PR [Needs Review]

Development

Successfully merging this pull request may close these issues.

4 participants