Skip to content

bug: AI asks questions instead of using available tools #3873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
KJ7LNW opened this issue May 22, 2025 · 3 comments · May be fixed by #3879
Open

bug: AI asks questions instead of using available tools #3873

KJ7LNW opened this issue May 22, 2025 · 3 comments · May be fixed by #3879
Labels
Issue - Unassigned / Actionable Clear and approved. Available for contributors to pick up.

Comments

@KJ7LNW
Copy link
Collaborator

KJ7LNW commented May 22, 2025

Which version of the app are you using?

v3.16.5

Which API Provider are you using?
Google

Which Model are you using?
gemini-2.5

What happened?

When working with files that are not in obvious locations, the AI asks the user for file paths instead of using available tools to find the information itself. This creates unnecessary back-and-forth and puts the burden on the user to provide information that the AI could discover programmatically.

In a recent session, when asked to modify a component file, the AI immediately asked for the file path instead of using search_files or list_files to locate it.

Also tell us, what did you expect to happen?

The AI should automatically use search_files, list_files, or other appropriate tools to locate files or gather information before resorting to asking the user questions.

Steps to reproduce

  1. Ask the AI to modify a file that is not in an obvious location (e.g., "modify the CodeBlock component to add navigation buttons")
  2. Observe that the AI asks for the file location instead of searching for it
  3. The user has to explicitly remind the AI to use tools instead of asking questions

Suggested System Instructions Fix

This issue can be fixed completely with additional system instructions for the ask_followup_question tool. The following addition would resolve the problem:

IMPORTANT: Before using this tool to ask the user for information:
1. You MUST first attempt to use other available tools (search_files, list_files, execute_command, etc.) to discover the information yourself
2. You MUST only resort to asking the user when the information cannot be reasonably discovered through available tools
3. You MUST NOT ask questions about file locations, content, or system state that can be determined programmatically

This simple addition to the system instructions would ensure the AI exhausts available tools before asking questions, significantly improving the user experience without requiring complex natural language processing of procedural languages.

@mrubens
Copy link
Collaborator

mrubens commented May 22, 2025

I see the problem and agree that it makes sense in implementation focused modes, but I think these instructions would conflict with what we want it to do in architect mode for instance.

@KJ7LNW
Copy link
Collaborator Author

KJ7LNW commented May 23, 2025

I see the problem and agree that it makes sense in implementation focused modes, but I think these instructions would conflict with what we want it to do in architect mode for instance.

can you provide an example?

I think the problem that I had was either in "ask" or "architect" mode, it was asking me to tell it which file to look at when it was fully capable of using the tools that are defined for that mode.

maybe the solution is to be more generic in the statement and tell it to use tools that are available so if anything is not available (like execute command is unavailable in architect mode) then it will still use everything at it's disposal to get the answers

@KJ7LNW
Copy link
Collaborator Author

KJ7LNW commented May 23, 2025

what about this

IMPORTANT: Before asking the user for information:

  1. YOU MUST FIRST use available tools (eg, search_files, list_files, ...) to locate any needed information
  2. YOU MUST ONLY request user-provided details when those tools cannot retrieve them (eg, design specific considerations).
  3. YOU MUST PRIORITIZE your own knowledge and ONLY ask the user if you lack the answer when multiple options are suitable and require human consideration.

@hannesrudolph hannesrudolph moved this from New to Issue [Needs Discussion] in Roo Code Roadmap May 23, 2025
@hannesrudolph hannesrudolph moved this from Issue [Needs Discussion] to Issue [Unassigned] in Roo Code Roadmap May 23, 2025
@hannesrudolph hannesrudolph added the Issue - Unassigned / Actionable Clear and approved. Available for contributors to pick up. label May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue - Unassigned / Actionable Clear and approved. Available for contributors to pick up.
Projects
Status: Issue [Unassigned]
Development

Successfully merging a pull request may close this issue.

3 participants