Skip to content

fix(agents): reduce Explore subagent overuse by strengthening prompt guidance - #2141

Open
xielixing wants to merge 1 commit into
GCWing:mainfrom
xielixing:fix/issue-216-explore-frequency
Open

fix(agents): reduce Explore subagent overuse by strengthening prompt guidance#2141
xielixing wants to merge 1 commit into
GCWing:mainfrom
xielixing:fix/issue-216-explore-frequency

Conversation

@xielixing

Copy link
Copy Markdown

Fixes #216

Problem

The Explore subagent was being triggered too frequently for simple, targeted queries where direct Grep/Glob/Read would be faster and more accurate. This added unnecessary latency without improving results.

Root Cause

While the strongest offending language ("VERY IMPORTANT... CRITICAL that you use the Task tool with subagent_type=Explore") had already been removed in a prior change, the remaining guidance was too generic about "Task subagents" and did not explicitly call out Explore-specific overuse patterns.

Solution

Add explicit guidance in two places to reserve the Explore subagent for truly open-ended exploration:

  1. agentic_mode.md (Tool usage policy): New bullet clarifying that Explore should be reserved for broad architectural questions, unfamiliar code areas, or multi-module tracing — and that spawning it for targeted lookups (known symbols, specific files, single search patterns) adds latency without improving results.

  2. task/schema.rs (Task tool description): New bullet in the "When to use" section discouraging Explore for targeted lookups that a single Grep, Glob, or Read can handle.

Validation

  • cargo check -p bitfun-core — passes (only pre-existing dead-code warning)
  • cargo test -p bitfun-agent-content --test prompt_catalog_contracts — 3/3 tests pass
  • rustfmt on changed Rust file — clean

…guidance

Issue GCWing#216: The Explore subagent was being triggered too frequently for
simple, targeted queries where direct Grep/Glob/Read would be faster and
more accurate. Add explicit guidance in both the agentic mode prompt and
the Task tool description to reserve Explore for truly open-ended
exploration — broad architectural questions, unfamiliar code areas, or
multi-module tracing — and use direct tools for known symbols, specific
files, and single search patterns.

Changes:
- agentic_mode.md: Add bullet under Tool usage policy clarifying when to
  use vs. not use the Explore subagent
- task/schema.rs: Add bullet in Task tool 'When to use' section
  discouraging Explore for targeted lookups that a single Grep/Glob/Read
  can handle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Explore subagent is triggered too frequently and has poor performance

1 participant