Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Custom agents invoked as sub-agents receive no operational tools (regression since ~mid-August 2026)

Open nathan-sowatskey-natwest opened this issue 3 months ago • 13 comments

Before opening, please confirm:

Operating System

macOS 26.6.2

Kiro Version

1.0.395

Bug Description

Custom agents invoked as sub-agents receive no operational tools (regression)

Summary

Custom agents defined in .kiro/agents/*.json receive only 4 orchestration-level tools when invoked as sub-agents via invoke_sub_agent. Their declared tools array (e.g. read, write, shell, @mcp) is ignored. Built-in sub-agents (general-task-execution, introspect, context-gatherer) receive their full tool set in the same session. This is a regression: it worked on 7 August 2026 with 1.0.242, and was broken after a Kiro update approximately two weeks later (~21 August) to 1.0.395 .

Environment

  • Kiro IDE on macOS (darwin, zsh)
  • Kiro version: see below
  • Last known working version: the version installed on 7 August 2026
  • Multi-root workspace with 8 workspace folders
  • Custom agents defined in .kiro/agents/ in one of the workspace folders
  • Agents tested with both old-style individual tool names (fs_read, fs_write, grep, glob, code) and Kiro 1.0 tag-based vocabulary (read, write, shell, context, @mcp) — same result with both

Actual behaviour

The custom agent receives only 4 orchestration/harness tools (disclose_context, subagent_response, report_progress, user_input). The tools array in the agent's JSON definition is not resolved to actual tool implementations.

Reproduction results (31 August 2026)

All tests performed in a single vibe session on macOS:

Sub-agent Type tools declared Tools received Could read file?
general-task-execution Built-in (default) Full set Yes
introspect Built-in (default) Full set N/A (answered questions)
context-gatherer Built-in (default) Full set Yes
test-agent Custom (.json) read, write, shell, context, @mcp 4 orchestration tools only No
environment-check-agent Custom (.json) read, shell, context, @mcp 4 orchestration tools only No
service-dev-agent-python Custom (.json) read, write, shell, context, @mcp 4 orchestration tools only No

What was ruled out

  • Tool name format: tested both old-style (fs_read, fs_write, grep, glob, code) and new-style tags (read, write, shell). Same result with both.
  • allowedTools configuration: tested with allowedTools matching the full tools set and with narrower subsets. No effect.
  • toolsSettings.subagent.trustedAgents: added to custom orchestrating agents. No effect when the built-in session agent is the parent, because the built-in session agent has no editable config file to set trustedAgents on.
  • Agent definition validity: a Python validation script confirms all agent definitions are well-formed JSON with valid tool names.
  • Workspace root: agents are in one workspace folder of a multi-root workspace. Built-in agents resolve correctly from the same workspace.
  • Agent complexity: the minimal test-agent with 7 lines of JSON and 6 lines of Markdown reproduces the problem identically to complex agents with resources, permissions, and declared-intent blocks.

Regression timeline

  • 7 August 2026: custom agents invoked as sub-agents had full tools. An SDLC framework with 24 custom agents delegating to each other was operational.
  • ~21 August 2026: after updating Kiro, custom sub-agents stopped receiving operational tools. The exact version that introduced the regression is unknown.
  • 31 August 2026: confirmed via systematic testing with a minimal reproduction case.

Impact

This breaks any workflow that delegates tasks to custom agents via invoke_sub_agent. The custom agent launches and can communicate back to the parent, but cannot read files, write files, run commands, or call MCP servers. The only workaround is to route tasks through the built-in general-task-execution agent, which works but does not load the custom agent's system prompt, resource attachments, or tool-scoping — the features that custom agents exist to provide.

Workaround

Use general-task-execution instead of custom agents for sub-agent delegation. This receives full tools but loses the custom agent's prompt, resources, and scoped permissions.

Version: 1.0.395 VSCode Version: 1.109.5 Commit: 3a3248f62ad8a4a451d7709f30a27f4bc1398d15 Date: 2026-08-27T04:51:42.538Z Electron: 39.6.0 Chromium: 142.0.7444.265 Node.js: 22.22.0 V8: 14.2.231.22-electron.0 OS: Darwin arm64 25.6.0

Steps to Reproduce

Steps to reproduce

Step 1 — create a minimal custom agent

.kiro/agents/test-agent.json:

{
  "name": "test-agent",
  "description": "Test agent for tool binding diagnostics",
  "prompt": "file://.kiro/agents/test-agent.md",
  "tools": ["read", "write", "shell", "context", "@mcp"],
  "allowedTools": ["read", "write", "shell", "@mcp"]
}

.kiro/agents/test-agent.md:

---
description: "Test agent for tool binding diagnostics"
---
# Test agent

You are a diagnostic agent. When invoked, list every tool available to you by name, then attempt to read the file `.kiro/agents/test-agent.json` and report its contents.

Step 2 — invoke the custom agent as a sub-agent

In a vibe session (the default/built-in session agent), ask Kiro to invoke the test agent. The session agent calls invoke_sub_agent(name="test-agent", prompt="List every tool you have access to. Name each one.").

Step 3 — observe

The sub-agent reports only 4 tools:

  1. disclose_context
  2. subagent_response
  3. report_progress
  4. user_input

No file-reading, file-writing, shell, search, or MCP tools are present despite "tools": ["read", "write", "shell", "context", "@mcp"] in the agent definition.

Step 4 — control test with a built-in agent

In the same session, invoke a built-in sub-agent: invoke_sub_agent(name="general-task-execution", prompt="Read the file .kiro/agents/test-agent.json and report its contents.").

Step 5 — observe

general-task-execution has full tools and successfully reads the file.

Expected Behavior

Expected behaviour

Per the Kiro documentation at https://kiro.dev/docs/custom-agents/subagents/ :

When you delegate to a custom agent, the sub-agent uses that agent's tools and permissions configuration.

The custom agent should receive the tools declared in its tools array.

Conversation ID

sess_6ef99026-ca04-4d52-b1c4-0d6c44babec3

Additional Context

No response

🤖 Potential Duplicate Detected

This issue appears to be similar to:

What happens next?

  • ⏰ This issue will be automatically closed in 3 days
  • 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
  • 💬 Comment on the original issue if you have additional information

Why is this marked as duplicate? Both issues report the same core problem: custom agents invoked as sub-agents receive only a limited set of orchestration/harness tools instead of their declared tools array. Issue #11142 describes custom agents getting only 'semantic_reviewer' role instead of full tool set, while the new issue describes getting only 4 orchestration tools (disclose_context, subagent_response, report_progress, user_input). Both identify this as a regression, both are on macOS 26.6.2, and both contrast broken custom agent behavior against working built-in agents.

github-actions[bot] avatar Aug 31 '26 11:08 github-actions[bot]

Thanks for raising this.

The 4 surviving tools might be the key detail. In our source, disclose_context appears to be allowlist-exempt (kept even under an empty allowlist), and the other three look like the sub-agent harness set. That signature suggests the tool policy is being applied but matching zero operational tools -- not skipped.

Two candidate mechanisms: (a) the tools array might be dropped before reaching the dispatch-time policy (registry/adapter side, possibly multi-root related), or (b) the allowlist might be evaluated against an available-tools set not yet populated at child-dispatch time. Your dual-vocabulary test failing both ways seems to rule out tag mapping and points at an empty input on one side of the match.

Your Aug 7 -> ~Aug 21 window narrows the bisect; there was subagent trust and custom-agent inclusion-flag work in roughly that range.

One data point that would help: does the same agent get correct tools when selected as the main session agent (not via invoke_sub_agent)? Yes -> break is in the sub-agent dispatch path; no -> agent-config loading.

Marking as a bug to investigate further.

AnilMaktala avatar Aug 31 '26 13:08 AnilMaktala

Thanks @AnilMaktala — your analysis of the 4 surviving tools matches what I'm seeing. The harness set plus disclose_context being allowlist-exempt is consistent with "policy applied against an empty available-tools set" rather than "policy skipped entirely".

To your question: does the agent get correct tools as the main session agent?

No. I tested this just now: opened a new vibe session in the IDE with the test-agent selected as the main session agent (not via invoke_sub_agent). Result: only disclose_context was available. No read_file, no execute_bash, no grep_search, nothing. All three diagnostic operations (read file, run shell command, list tools) failed.

This means the break is in agent-config loading, not the sub-agent dispatch path. The tools array in a custom agent's .json definition is not being resolved to actual tool bindings at all — whether the agent is the main session agent or a sub-agent.

The slight difference in tool sets between the two modes is interesting: as a sub-agent, the custom agent gets 4 tools (disclose_context, subagent_response, report_progress, user_input); as the main session agent, it gets 1 (disclose_context). The 3 harness tools are sub-agent plumbing that wouldn't apply to a main agent, so this is consistent — the base state is disclose_context only, with the harness tools added for sub-agent mode.

On the duplicate question:

#11142 and this issue are almost certainly the same root cause. #11142 describes it from the CLI side (custom agent loses sub-agent roles after /agent swap), this issue describes it from the IDE side (custom agents have no tools at all). Both point at the same thing: the custom agent config's tools field is not being resolved to tool bindings.

I'd suggest keeping both open — they cover different clients (CLI v3 vs IDE 1.0) and the reproduction steps are complementary.

Since my last comment I upgraded from 1.0.395 to 1.0.411 (Commit c1ed2c90f5be825ed9e3fbf00cdff00830b3b9cd, Date 2026-08-28) and re-ran the sub-agent reproduction. Same result: the custom test-agent sub-agent receives only the 4 orchestration tools (disclose_context, subagent_response, report_progress, user_input) — no read_file, no execute_bash, no search. File/shell operations failed because the corresponding tools were not bound.

So the regression is unchanged across 1.0.395 → 1.0.411. Combined with the main-session-agent result above, the picture is: the custom agent's tools array is not resolved to bindings in either mode, and neither version in this range fixes it. Consistent with your candidate (a) — the tools array dropped before dispatch-time policy — since it fails identically whether the agent is parent or child.

Happy to test any specific build or config change if that would help.

Tested the CLI as well (kiro-cli 2.20.0), to compare against the IDE and against #11142. The CLI behaves differently from the IDE — custom sub-agents do receive their tools.

Method. A minimal custom agent with an inline prompt (see the file:// note below for why inline), tools: ["read", "write", "shell", "@mcp"], run non-interactively with --trust-all-tools. Three tasks each time: list tools, read a file, run echo tools-work.

Test Agent Result C — control kiro_default (built-in) Full tools (79), file read + command succeeded A — custom as main agent cli-test-agent via --agent fs_read, fs_write, execute_bash bound; file read + command succeeded B — custom as sub-agent invoked from kiro_default read, write, shell bound (+ harness summary); file read + command succeeded

So on the CLI, both the main-agent path (A) and the sub-agent dispatch path (B) bind the custom agent's declared operational tools. This is the opposite of what I see in the IDE (1.0.411), where the same custom agent gets only disclose_context as a main agent and only the 4 orchestration tools as a sub-agent.

Implication for the duplicate question. #11142 (CLI 2.20.1) and this issue (IDE) may not be the same defect after all. On my CLI (2.20.0) the sub-agent tool binding works; #11142 reports the CLI losing sub-agent roles after /agent swap, which is about which sub-agents are reachable, not about the invoked agent's tool grant. The IDE issue here is that the invoked custom agent gets no operational tools at all. Same family (custom-agent handling), but different surfaces and possibly different root causes. Worth noting I'm one patch behind #11142 (2.20.0 vs 2.20.1).

Two incidental CLI findings while testing:

@mcp in a custom agent's tools did not produce MCP tools for the sub-agent — it reported read, write, shell but no MCP. The read/write/shell tags bound correctly, so this is a narrower @mcp-specific gap on the CLI, not the wholesale failure seen in the IDE.

The CLI cannot load any agent whose prompt uses a file:// reference relative to the workspace. kiro-cli agent list in a repo with 25 such agents emitted 25 errors like:

Error: File URI not found: file://.kiro/agents/qa-agent.md (resolved to /…/bdd-kiro/.kiro/agents/.kiro/agents/qa-agent.md)

The CLI resolves file://.kiro/agents/x.md relative to the agents directory, doubling the path. The IDE resolves the identical definitions correctly against the workspace root. Happy to file this separately if useful — it means file://-prompt agents authored for the IDE are unusable in the CLI.

Environment: kiro-cli 2.20.0, macOS 26.6.2, same multi-root workspace as the IDE tests above.

Confirming this on Windows, and adding a few data points not covered above.

ENVIRONMENT

  • Kiro IDE 1.0.437 on Windows 11 (this issue reports 1.0.395 on macOS, so the regression is still present two versions later, and it is not platform-specific).
  • Also reproduced by a second user on the same workspace running an earlier IDE version.
  • Workspace agents in .kiro/agents/, tools: ["*"], allowedTools: ["read","write","shell","knowledge","subagent"].

ADDITIONAL FAILURE MODE: AGENT PICKER, NOT JUST SUB-AGENT DELEGATION This issue covers custom agents invoked via invoke_sub_agent. The same failure also occurs when a custom agent is selected as the PRIMARY agent from the agent picker — which is the documented way to use a custom agent in the IDE. In that mode the tool set is even smaller: exactly ONE tool, disclose_context. No subagent_response / report_progress / user_input, since there is no parent to report to. The session export confirms it: usage_summary reports "usedTools": ["disclose_context"] as the only tool used across the turn.

So the scope may be broader than sub-agent delegation: it looks like custom agent tool resolution fails in the IDE regardless of how the agent is entered.

KIRO-CLI IS NOT AFFECTED — SAME AGENT FILES, DIFFERENT SURFACE This may help narrow it down. One of our custom agents is also invoked head-less by a batch runner on a Linux host via kiro-cli chat --agent <name> --no-interactive. There it receives its full tool set and works normally: it read files, queried a database and produced its output this morning, billing ~12 credits for the run. Same agent definition format, same tool tags, same workspace layout.

That points at the IDE harness rather than at agent config parsing or the tool tag vocabulary.

METHODOLOGICAL NOTE FOR ANYONE TESTING THIS "Restore" inside an existing session does NOT reload agent configuration: the tool set stays the one resolved when the session was created. We changed the agent JSON six times and re-tested via Restore, concluding each time that the fix had failed, when in fact it had never been loaded. Every config change must be tested in a FRESH chat. A related tell: the "Included Steering" header appears only on the first message of a session, so its absence after a Restore is expected and is not a second symptom.

FURTHER RULED OUT (in addition to the six items in the report)

  • includeMcpJson: tried true and omitted. Note the missing tools include the local terminal tool, unrelated to MCP.
  • excludedTools / toolsSettings / hooks: none present in the affected agents. (One unrelated agent had an empty "hooks": {} — removing it changed nothing, but worth knowing that one docs page states the IDE ignores agents containing that field while the configuration reference says the opposite.)
  • Permissions: no managed-settings.json under C:\ProgramData\Kiro; user and workspace permissions.yaml contain only "allow" rules; KIRO_HOME unset.
  • Resources: removing a resource with a non-standard file extension changed nothing.
  • Full IDE restart including a version upgrade: no change.
  • Agent files verified: all valid JSON, all prompt targets exist, deployed copies byte-identical to the versioned sources (one of the affected agents had not been modified for months).

IMPACT, matching what you describe: every workspace agent is unusable in the IDE, in both modes. Our workaround is to have the default agent do the work directly and pass the custom agent's prompt file as context (#agent-prompt.md), which recovers the specialised instructions but not the preloaded resources.

StefanoFratini avatar Sep 02 '26 10:09 StefanoFratini

Correction to my previous comment: two of the points I raised were already covered above and I should have read the thread more carefully before posting.

The agent-picker failure mode (1 tool vs 4) was already reported on 31 Aug, including the observation that the harness tools account for the difference. And the kiro-cli comparison was already covered on 1 Sep, with a more systematic control/main-agent/sub-agent matrix than mine. Apologies for the noise.

What I think still adds something: Windows (vs macOS above) so it is not platform-specific; IDE 1.0.437, two versions past the 1.0.411 tested here, still broken; "tools": ["*"] as opposed to the explicit tag lists tested above; and the note that "Restore" inside a session does not reload agent configuration, which invalidated several of our test iterations before we noticed.

@nathan-sowatskey-natwest — one data point that may help with your separate CLI finding above (the CLI failing to load agents whose prompt uses a workspace-relative file:// path, resolving it against the agents directory and doubling it). Our agents load correctly in kiro-cli, and the difference is the form of the reference:

"prompt": "file://./my-agent-prompt.md"

with the ./ prefix, resolved relative to the directory containing the agent JSON, which is what the configuration reference specifies for the prompt field. Agents authored as "file://.kiro/agents/my-agent.md" are the ones that double. So that CLI issue may be a path-form mismatch rather than a hard incompatibility, and rewriting the prompt reference with ./ may be enough to make file://-prompt agents usable in the CLI.

StefanoFratini avatar Sep 02 '26 12:09 StefanoFratini

Confirming on Windows, with an additional symptom that may widen the scope.

Environment: win32 (Windows 11), Kiro 1.1.14 (commit f694ef1b), kiroAgent extension 1.1.28, multi-root workspace with 8 folders, agent defined in ~/.kiro/agents/*.json (global scope rather than workspace).

Same core symptom. A .json custom agent invoked via invoke_sub_agent received only the four orchestration tools you list — disclose_context, subagent_response, report_progress, user_input — and none of its declared tools. It reported the absence itself rather than failing silently, which is at least honest, but it had nothing to work with.

Additional data point: the agent's MCP servers are not started either. My agent declares its own server in an agent-scoped mcpServers block with includeMcpJson: false:

"mcpServers": {
  "teamwork": { "type": "http", "url": "https://mcp.ai.teamwork.com/analyst" }
}

When invoked as a sub-agent, that server name never appeared at all in ~/.kiro/logs/<ts>/mcp.log. Not a failed connection — no connection attempt. Verified with:

grep -o -E '"serverName":"[^"]+"' mcp.log | sort -u

which listed every other server and not this one.

Selecting the same agent from the picker started the server correctly and gave it all 38 of its MCP tools:

Connected with transport ... serverName: teamwork
mcp.connect.ok            serverName: teamwork

So on the sub-agent path it isn't only that the tools array goes unresolved — agent-scoped MCP server startup appears to be skipped as well. If tool resolution and server startup are separate steps, both are being missed.

One note on tool vocabularies, since you mention testing both: on 1.1.14 the older individual names are the ones that work. fs_read is accepted; read, write, glob, grep, code, introspect, and use_subagent are all rejected outright, and an unrecognised tag causes the entire agent to be dropped from the picker with no error at default log level. If both vocabularies genuinely parsed for you on 1.0.395, that's a behaviour change somewhere between the two versions. I filed that separately as #11411, since it's a distinct failure mode from this one.

csmith-uturn avatar Sep 15 '26 23:09 csmith-uturn

Still reproducing on Kiro CLI V3 (kiro-cli 2.20.0), 2026-09-20.

A custom agent invoked as a sub-agent via the orchestration tool still receives only the four orchestration tools — disclose_context, report_progress, subagent_response, user_input — and none of the operational tools its tools array declares.

Minimal reproduction (2026-09-20): a custom agent declaring "tools": ["read", "context", "@mcp"] was dispatched as a sub-agent and asked only to enumerate its available tools and read a single file. It reported the four orchestration tools and no fs_read / grep / glob / shell tool, so it had no operation with which to open the file. A steering file attached via the agent's resources field was also not loaded into the sub-agent session.

Control (same session): built-in sub-agents (general-task-execution, introspect, context-gatherer) receive their full tool set and read files normally.

Already ruled out, and still ruled out:

  • Tool-name vocabulary — both the legacy granular names (fs_read, grep, glob) and the v3 tags (read, write, shell) behave identically.
  • allowedTools breadth — tested matching the full tools set and narrower subsets; no effect.
  • toolsSettings.subagent.trustedAgents — no effect.

Per the v3 docs (custom-agents/subagents (https://kiro.dev/docs/custom-agents/subagents/)), a delegated custom agent should use that agent's own tools and permissions configuration. The runtime is not binding the declared tools to custom sub-agent sessions — only built-in sub-agents receive operational tools.

Not to put too fine a point on it, Kiro is hindering more than helping here.

Still reproducing on kiro-cli 2.28.0 — regression now spans ~6 weeks and three builds, no intervening fix

Note that I am running Kiro-cli chat --v3.

This is not fixed as of the current build. Re-confirmed today on kiro-cli 2.28.0 (macOS). The reproduction chain is now:

Date Build Result
7 Aug 2026 1.0.242 custom sub-agents receive full declared tools (last known good)
31 Aug 2026 1.0.395 regressed — only 4 orchestration tools
20 Sep 2026 2.20.0 (CLI V3) still regressed
today 2.28.0 still regressed

Latest reproduction, using a real roster agent rather than the minimal fixture. The agent's definition declares "tools": ["read","write","shell","context","@mcp"] and "allowedTools": ["read","write","shell","@mcp"]. Invoked as a sub-agent and asked only to (1) enumerate its actually-bound tools and (2) read one file, it reported exactly:

disclose_context
report_progress
subagent_response
user_input

read/fs_read, write/fs_write, shell, and @mcp were all absent — the file read could not even be attempted because no read tool was bound. Identical signature to the original report.

Why this is more than a single-workflow inconvenience: the documented contract at https://kiro.dev/docs/custom-agents/subagents/ states that a delegated custom agent "uses that agent's tools and permissions configuration." For ~6 weeks across three builds that contract has not held for any custom agent dispatched via invoke_sub_agent, while built-in sub-agents (general-task-execution, introspect, context-gatherer) continue to receive their full tool set in the same session. The defect also fails silently: the sub-agent launches and communicates normally, so a delegation appears to run while the delegate is incapable of doing any file, shell, or MCP work — well-behaved agents detect the absence and refuse, but the failure mode is capability-absence, not an error, which makes it easy to miss.

Impact for anyone building a multi-agent SDLC on custom agents: every delegated custom agent is inert for real work. The only workaround — routing through general-task-execution — discards the custom agent's prompt, resource attachments, and scoped permissions, i.e. the entire reason for defining custom agents.

Could a maintainer confirm whether this is on the triage radar, and whether full tool-binding for delegated custom sub-agents is still an intended contract (as the docs state) or now considered under-specified? If a repro on 2.28.0 with a specific agent definition would help, happy to supply one.

Why this matters beyond "a tool is missing": it breaks multi-agent orchestration in a governed SDLC

Adding to the reproduction reports above (still failing on kiro-cli 2.28.0), I want to explain why this defect is more serious than its "custom sub-agent has no tools" summary suggests. In a governed, multi-agent SDLC the sub-agent delegation path is not a convenience — it is the mechanism by which the process works at all. #11150 removes that mechanism while leaving every surface looking functional.

The orchestration pattern this defeats

We run an AI SDLC in which a coordinator agent (a delivery-agent) sequences work across specialised agents — business analyst, dev (Java/Python), QA, merge-request reviewers, and security reviewers — and deliberately runs dev and QA in tension with each other. The coordinator's agent definition is explicitly configured for this:

"tools": ["read", "context", "subagent", "@mcp"],
"toolsSettings": {
  "subagent": {
    "availableAgents": ["service-dev-agent-java", "qa-agent", "lib-dev-agent-java", ...],
    "trustedAgents":   ["service-dev-agent-java", "qa-agent", "lib-dev-agent-java", ...]
  }
}

The intended flow is: coordinator reads the approved task documents, builds a dependency graph, and dispatches each task to the owning agent via invoke_sub_agent, interleaving a dev implementation with an immediate QA validation so each challenges the other.

How #11150 breaks it — doubly

  1. The coordinator, when itself dispatched as a custom sub-agent, does not receive the subagent tool its definition declares — so it cannot delegate.
  2. Even where delegation can be triggered, every delegated agent (dev, QA, reviewer) receives only the four orchestration tools and so cannot read the spec, write code or tests, run a build, or call Jira/MCP. The delegate launches, reports back, and is incapable of doing the actual work.

So the whole point of specialised agents — a dev agent that writes code under its own prompt and scoped grant, a QA agent that independently validates it, a reviewer that runs the build — collapses. The multi-agent process degrades to a single generalist session.

Why the silent-failure mode makes it worse in a governed context

A governed SDLC depends on roles being distinct: the dev agent implements, the QA agent adversarially checks, the MR reviewer gates, each under its own prompt, resource attachments, and least-privilege tool grant (for example, read-only reviewers that deliberately lack write). #11150 erases those distinctions at runtime while the configuration still declares them. There is no error — the delegation "succeeds" and the sub-agent talks back — so a process can appear to be running its governance when the agents enforcing it are inert. Well-behaved agents detect the missing tools and refuse rather than fabricate, which is the correct failure, but it means governed work simply stops rather than being done by the intended role.

The general-task-execution workaround is particularly costly here: it restores tools but discards the custom agent's prompt, resources, and scoped permissions — i.e. exactly the role-separation and least-privilege properties a governed SDLC relies on. Routing a read-only security reviewer through a general agent with full tools is not an acceptable substitute for a reviewer that is sandboxed by construction.

Net

For single-agent, interactive use #11150 is an inconvenience with a workaround. For a multi-agent, phase-gated SDLC built on delegation and role separation, it removes the delegation substrate and the per-role tool scoping at the same time, silently. Our coordinator agent now has to detect that delegation is unavailable and fall back to producing a plan for a human to run agent-by-agent — which works, but is the manual process the orchestration was built to replace.

Could a maintainer confirm whether restoring declared tools (and the subagent capability) to delegated custom agents is on the roadmap, and whether the documented contract at https://kiro.dev/docs/custom-agents/subagents/ — that a delegated custom agent "uses that agent's tools and permissions configuration" — is still intended to hold? Happy to supply the minimal coordinator + dev + QA definitions as a reproduction if useful.

Note that I am running Kiro-cli chat --v3

Update: resolved for us by changing the shape of the agent definitions — root cause and verified fix

Following up on my earlier reports. Our 24 custom agents now receive exactly the tools they declare when dispatched as sub-agents, in the IDE and on both kiro-cli engines. No Kiro update was needed. The cause was the shape of our agent definitions, which several Kiro behaviours together turned into a silent loss of tools. This also answers @AnilMaktala's question about main agent versus sub-agent: the problem is in how a definition is found and registered, not in the sub-agent dispatch path, which fits @StefanoFratini's report that the agent picker is affected too.

What our definitions looked like

Every agent was a pair with the same basename in .kiro/agents/: <name>.json carrying the tools, and <name>.md carrying only the prompt. The .json pointed at the prompt with a workspace-root path, and was in the legacy format:

{
  "name": "service-dev-agent-python",
  "prompt": "file://.kiro/agents/service-dev-agent-python.md",
  "tools": ["read", "write", "shell", "context", "@mcp"],
  "allowedTools": ["read", "write", "shell", "@mcp"]
}

What we found

Each result below comes from a probe that counts a tool as bound only when a value comes back that only that tool could have produced: the contents of a random marker file, a random value echoed through shell, and a random value written to a new file. We never accepted the agent's own list of its tools.

  1. The same-basename .md shadows the .json. In the IDE, every .md in an agents directory registers as an agent in its own right, named after the file. At the directory root that name equals the .json's name, so the tool-less .md agent is the one that gets selected or dispatched. On kiro-cli V3 the pair also lost its tools: only as a sub-agent on 2.37.0, and as a main agent too on 2.37.1. On the V2 engine the result depended on which file carried tools.
  2. A file:// prompt path is resolved from the .json's own directory, not the workspace root. file://.kiro/agents/<name>.md became .kiro/agents/.kiro/agents/<name>.md. kiro-cli agent validate reports the file as not found, kiro-cli does not register the agent, and the IDE drops it from the registry without any message.
  3. The IDE did not register a legacy-format definition (an allowedTools key with no generated permissions block), even when it had a correctly named and correctly located prompt file. We saw this with test definitions in both user and workspace scope. Combined with point 1, it means the IDE probably never loaded our real .json files at all, and every dispatch reached the bare .md. That fits the symptom, and fits it starting after an update, but we inferred it rather than watched it happen.
  4. Side effect: starting kiro-cli in a clone rewrites every legacy-format definition in place and leaves a .json.bak beside each one, so checked-in files show up as modified.

The fix

For each agent:

  • rename the prompt so it no longer shares the definition's basename: <name>.md → <name>.prompt.md;
  • point the definition at it relative to the definition's own directory: "prompt": "file://./<name>.prompt.md";
  • convert the definition to the universal format with kiro-cli agent upgrade --no-backup .kiro/agents. This adds a permissions block derived from allowedTools and a kiroUpgrade block with two hashes. After that, kiro-cli no longer rewrites the file at startup.
{
  "name": "service-dev-agent-python",
  "prompt": "file://./service-dev-agent-python.prompt.md",
  "tools": ["@mcp", "context", "read", "shell", "write"],
  "allowedTools": ["read", "write", "shell", "@mcp"],
  "permissions": { "rules": [ "...generated by kiro-cli..." ] },
  "kiroUpgrade": { "revision": 2, "fingerprint": "sha256:...", "source": "sha256:..." }
}

To edit a definition afterwards, we delete the two generated blocks and run the upgrade again. Regenerating an unchanged file reproduced it byte for byte on kiro-cli 3.1.0.

Verification (macOS, kiro-cli 3.1.0, Kiro IDE 1.1.14)

  • kiro-cli V3, all 24 agents dispatched as sub-agents: each bound exactly the tools it declares, and no agent bound a tool it does not declare.
  • kiro-cli V2, and the IDE: one agent from each of our six grant patterns, dispatched as a sub-agent. All passed, including an orchestrator dispatching a dev agent onward, which then used read, shell and write.
  • Withheld tools stay withheld: read-only reviewers had no write or shell tool in any environment. One caveat: an agent granted shell without write was able to create a file through shell on V3, which is what you would expect, since a shell can write.
  • Not tested: MCP tools, on any engine.

What may still be worth fixing in Kiro

None of these blocks us any more, but each made the failure silent and hard to diagnose:

  • Any .md in an agents directory becomes an agent, including the prompt file of a .json agent, and it silently shadows a .json agent with the same name. A warning, or skipping a .md that a .json references as its prompt, would have pointed straight at the cause.
  • A prompt path that does not resolve, or a definition in a format the IDE does not accept, drops the agent from the IDE registry with no message. kiro-cli's agent validate does report the bad path, but the IDE says nothing.
  • Resolution from the definition's directory: if file:// paths are meant to resolve from the definition's directory rather than the workspace root, saying so in the custom-agent docs would help. Root-relative paths are easy to write by analogy with other workspace paths.

For anyone else hitting this, check two things: whether each agent .json has a .md with the same basename beside it, and whether its prompt path resolves from the .json's own directory (kiro-cli agent validate --path <file> shows this). @StefanoFratini and @csmith-uturn, I can't tell from your reports whether your layout matches ours, but those two checks are quick.

Unless a maintainer wants this kept open for the silent-failure behaviours above, I'm happy for it to be closed as resolved by configuration.