Background explore agents take 140+ seconds and return after agent has already found answers
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
### Describe the bug
The agent launched two background agents early in the investigation. Both took ~140 seconds to complete. By the time they returned results, the agent had already found most of the same information through direct grep/view calls. This consumed resources without meaningfully accelerating the investigation in this case
### Affected version
GitHub Copilot CLI 1.0.36
### Steps to reproduce the behavior
1. Ask the agent to investigate a large codebase
2. Agent launches multiple background agents
3. Agent also starts direct investigation with grep/view
4. Observe explore agents complete after the direct investigation has progressed past the agents' scope
### Expected behavior
The agent should either wait for agents before duplicating work, or cancel agents once the main thread has found the same info, or better calibrate when to use agents vs direct investigation based on complexity
### Additional context
_No response_
Contributor guide
Research direction
Reproduce the delay using the listed steps against a large codebase, comparing background-agent completion with the direct grep/view investigation. Trace the background-agent scheduling and cancellation entry points, then define and verify one consistent policy that prevents redundant work when direct investigation has already covered the same scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100