Skip to content

Explore subagent is triggered too frequently and has poor performance #216

@bobleer

Description

@bobleer

Description:
The Explore subagent is being triggered for many simple tasks where it's not necessary, leading to slow response times. The agent prompt heavily encourages using the Task tool with Explore subagent even for straightforward tasks that could be completed more quickly with direct tool usage.

Steps to Reproduce:

  1. Ask a simple question about the codebase (e.g., "How are errors handled?")
  2. Observe the agent automatically launches the Explore subagent
  3. Wait through the relatively slow exploration process
  4. Often the result could have been obtained faster with direct Grep/Glob/Read calls

Expected Behavior:

  • The agent should be more selective about when to use the Explore subagent
  • Simple, targeted queries should use direct tools (Grep, Glob, Read) instead
  • Explore should be reserved for truly open-ended exploration tasks
  • Consider adding heuristics or prompting guidance to avoid overusing Explore

Technical Details:

  • The agentic_mode.md prompt (lines 91-97) strongly encourages using Task tool for exploration
  • It states: "When doing file search, prefer to use the Task tool in order to reduce context usage"
  • And: "VERY IMPORTANT: When exploring the codebase... it is CRITICAL that you use the Task tool with subagent_type=Explore"
  • This creates a strong bias towards Explore even when not optimal
  • The Explore subagent itself can be slow due to its thorough nature

Files Involved:

  • src/crates/core/src/agentic/agents/prompts/agentic_mode.md - prompt encouraging Explore usage
  • src/crates/core/src/agentic/tools/implementations/task_tool.rs - Task tool definition
  • src/web-ui/src/flow_chat/tool-cards/TaskToolDisplay.tsx - frontend display

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions