feature: Task tool should support required_tools parameter

Resolved 💬 3 comments Opened Feb 7, 2026 by shuhei0866 Closed Feb 10, 2026

Current: subagent_type determines tool set implicitly. Cannot fine-tune which tools a subagent needs.

Problem:

  • release/* subagents need Write/Edit/Bash(git) but NOT general shell access
  • Current model: subagent_type='implementer' grants broad tools
  • Need: Fine-grained control to maintain security isolation

Proposal: Add optional required_tools parameter to Task tool:

{
"description": "Implement feature",
"subagent_type": "implementer",
"required_tools": [
"Read", "Write", "Edit",
"Bash(pnpm *)",
"Bash(git add/commit/status/diff/log)",
"Glob", "Grep"
],
"prompt": "..."
}

Benefits:

  • Security: Restrict shell to specific patterns (no git push, rm, etc.)
  • Auditability: explicit tool whitelist
  • Worktree safety: pair with worktree guards to prevent main-branch edits

Use case: learning_with uses this to isolate release/* work from unsafe operations.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗