Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Aug 11, 2025

Summary

This PR addresses issue #6940 by adding a setting that allows users to completely disable the LLM's ability to ask follow-up questions.

Problem

Some LLMs (particularly GPT OSS) overuse the question-asking tool, repeatedly asking for confirmation instead of proceeding with tasks. This creates a frustrating user experience where the AI gets stuck in loops asking unnecessary questions.

Solution

  • Added a new setting alwaysAllowFollowupQuestions to the system prompt settings
  • When this setting is disabled (set to false), the ask_followup_question tool is completely removed from the LLM's available tools
  • The LLM will not even know the tool exists when disabled, forcing it to proceed without asking for clarification
  • Updated the UI description to clearly explain that disabling this removes the tool entirely

Changes

  • Added alwaysAllowFollowupQuestions: boolean to SystemPromptSettings interface
  • Modified getToolDescriptionsForMode to conditionally exclude the ask_followup_question tool
  • Updated generateSystemPrompt.ts and Task.ts to pass the setting through the system
  • Updated UI translation to describe the new behavior
  • Fixed test files to include the new required property

Testing

  • All existing tests pass
  • The setting correctly removes the tool from the available tools list when disabled
  • Default behavior (enabled) remains unchanged

Fixes #6940


Important

Adds a setting to disable LLM follow-up questions, removing the ask_followup_question tool when disabled, with updates to code, tests, and UI.

  • Behavior:
    • Adds alwaysAllowFollowupQuestions setting to disable LLM follow-up questions.
    • When disabled, ask_followup_question tool is removed from LLM's tools.
    • Updates UI description to reflect new behavior.
  • Code Changes:
    • Adds alwaysAllowFollowupQuestions to SystemPromptSettings in types.ts.
    • Modifies getToolDescriptionsForMode in tools/index.ts to exclude ask_followup_question when disabled.
    • Updates generateSystemPrompt.ts and Task.ts to handle the new setting.
  • Testing:
    • Updates tests in system-prompt.spec.ts and custom-instructions.spec.ts to include the new setting.
  • UI:
    • Updates settings.json to describe the new setting behavior.

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

- Add alwaysAllowFollowupQuestions to SystemPromptSettings interface
- Pass setting through generateSystemPrompt and Task.ts
- Conditionally exclude ask_followup_question tool when disabled
- Update UI description to clarify behavior when disabled

Fixes #6940
@roomote roomote bot requested review from cte, jr and mrubens as code owners August 11, 2025 16:37
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Aug 11, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

I reviewed my own code and found it acceptable. The bar was on the floor.

"followupQuestions": {
"label": "Question",
"description": "Automatically select the first suggested answer for follow-up questions after the configured timeout",
"description": "Allow the AI to ask follow-up questions. When disabled, the AI will not have access to the question-asking tool and must proceed without clarification",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing internationalization for other locales - all other locale files (fr, de, es, ca, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW) still have the old description for the follow-up questions setting. Could we update those as well to avoid confusion for non-English users?

maxConcurrentFileReads: number
todoListEnabled: boolean
useAgentRules: boolean
alwaysAllowFollowupQuestions: boolean
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Consider adding a comment about backward compatibility here. Since this adds a new required property to the interface, existing saved states might not have it. While the code defaults to true in multiple places, documenting this would help future maintainers understand the migration strategy.


// Conditionally exclude ask_followup_question if disabled in settings
if (settings?.alwaysAllowFollowupQuestions === false) {
tools.delete("ask_followup_question")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This implementation looks good! The tool is properly excluded when the setting is disabled. Consider adding a specific test case to verify that ask_followup_question is actually removed from the tools list when alwaysAllowFollowupQuestions is false.

@roomote roomote bot mentioned this pull request Aug 11, 2025
4 tasks
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 12, 2025
@daniel-lxs
Copy link
Member

This implementation is incomplete

@daniel-lxs daniel-lxs closed this Aug 13, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Aug 13, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Option to disable questions from LLM

4 participants