Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Subagents should inherit parent agent's allowedTools

Open territov opened this issue 9 months ago • 9 comments

Expected behavior

When a subagent is spawned, it should inherit the parent agent's allowedTools configuration, so tools like InternalSearch don't require approval if they're already allowed in the parent agent's config.

Actual behavior

Subagents run in isolated contexts and do not inherit:

  1. Parent agent's allowedTools from agent JSON config
  2. Session-level tool trusts (via /tools trust)
  3. trustedAgents only controls whether the subagent invocation itself is auto-approved, not the tools the subagent can use

The only workaround is dangerously_trust_all_tools: true per invocation, which is all-or-nothing.

Attempted solutions (all failed)

  1. Added InternalSearch to allowedTools in .kiro/agents/default.json — parent agent can use it without approval, but subagents still prompt

  2. Added toolsSettings.subagent.trustedAgents: ["default"] to both default.json and software-engineer.json — this only auto-approves the subagent spawn, not the tools inside

  3. Ran /tools trust InternalSearch in session — parent agent respects this, but subagents spawned afterward still prompt for approval

  4. Confirmed via documentation that subagents intentionally run in "restricted permission context" with no inheritance

Desired behavior

If I've explicitly allowed a tool in my agent config, subagents spawned by that agent should respect the same allowedTools list.

territov avatar Feb 05 '26 18:02 territov

🤖 Potential Duplicate Detected

This issue appears to be similar to:

What happens next?

  • ⏰ This issue will be automatically closed in 3 days
  • 🏷️ Remove the duplicate label if this is NOT a duplicate
  • 💬 Comment on the original issue if you have additional information

Why is this marked as duplicate? Both issues deal with tool trust inheritance/propagation - the new issue wants subagents to inherit parent's allowedTools, while #4672 wants to trust all tools from an MCP server. Both address the core problem of having to individually approve tools that should be automatically trusted based on configuration.

github-actions[bot] avatar Feb 05 '26 18:02 github-actions[bot]

It does not look like a duplicate to me

territov avatar Feb 05 '26 18:02 territov

This issue has been automatically closed as it appears to be a duplicate of an existing issue.

If you believe this is incorrect, please comment on this issue and a maintainer will review it.

github-actions[bot] avatar Feb 09 '26 00:02 github-actions[bot]

I'd expect subagents to respect the allowedTools in their agent config, not those in the config of the agent that spawned them. (Currently, they don't really do either…)

TrevorBurnham avatar Feb 19 '26 13:02 TrevorBurnham

Yeah I would've expected the same. But I added InternalSearch in the allowedTools of the agent config, and still I get a ton of approval requests for internal search.

territov avatar Feb 19 '26 17:02 territov

Kiro is far behind Claude; it is recommended to directly open its API for integration with Claude.

chmsfrog86 avatar Mar 31 '26 02:03 chmsfrog86

Kiro is far behind Claude; it is recommended to directly open its API for integration with Claude.

What API? If you're referring to the aws tool, the AWS API MCP provides similar functionality in any AI harness.

TrevorBurnham avatar Mar 31 '26 02:03 TrevorBurnham

Kiro is far behind Claude; it is recommended to directly open its API for integration with Claude.

What API? If you're referring to the aws tool, the AWS API MCP provides similar functionality in any AI harness.

I meant that Kiro could open its request API for Claude's custom models to use. The Kiro CLI and IDE are absolutely terrible.

chmsfrog86 avatar Mar 31 '26 03:03 chmsfrog86

Kiro's request API is basically just Amazon Bedrock. You can use Bedrock with Claude Code: https://code.claude.com/docs/en/amazon-bedrock

TrevorBurnham avatar Mar 31 '26 16:03 TrevorBurnham