fix(agents): reduce Explore subagent overuse by strengthening prompt guidance - #2141
Open
xielixing wants to merge 1 commit into
Open
fix(agents): reduce Explore subagent overuse by strengthening prompt guidance#2141xielixing wants to merge 1 commit into
xielixing wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.
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 passrustfmton changed Rust file — clean