Skip to content

feat(agent): add built-in research subagent - #39474

Open
Fengrru wants to merge 2 commits into
anomalyco:devfrom
Fengrru:feat/research-subagent
Open

feat(agent): add built-in research subagent#39474
Fengrru wants to merge 2 commits into
anomalyco:devfrom
Fengrru:feat/research-subagent

Conversation

@Fengrru

@Fengrru Fengrru commented Jul 29, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a built-in read-only research subagent, following the same pattern as the existing explore subagent.

When given a task, it searches the web (websearch/webfetch) for tutorials and documentation, validates the local environment with read-only bash commands (which, --version), and returns a structured JSON report: steps, dependencies (with install/check commands and installed status), sources, and warnings. The intent is to invoke it before starting complex tasks that need external knowledge, so the main agent gets a validated plan instead of guessing.

Permissions are locked down like explore: "*": "deny" with only webfetch/websearch/bash/read/grep/glob allowed, and external directories read-only. It reuses the existing readonlyExternalDirectory and agent definition pattern, so no other code paths are touched.

Note: the docs mention a scout subagent for dependency source research; research does not overlap — scout inspects dependency repo source, research finds online tutorials/docs and checks the local environment.

How did you verify your code works?

The new subagent follows the exact structure of explore (same permission merge pattern, same prompt import mechanism), and the agent list sorts alphabetically so existing subagent-list test assertions are unaffected. Relying on this PR's CI (typecheck + test suites) to confirm.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jul 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

1 participant