chat.disableInheritingDefaultResources is ignored in 2.19.1 - custom agents still inherit default resources
Version: kiro-cli-chat 2.19.1 | Windows 11 | PowerShell 7.6.4 (Core)
Expected
With chat.disableInheritingDefaultResources=true, custom (user-defined) agents should load only the resources they explicitly declare.
Actual
Default resources are inherited regardless of the setting.
Reproduction (minimal - agent declares no resources at all)
kiro-cli settings chat.disableInheritingDefaultResources truekiro-cli settings chat.disableInheritingDefaultResources-> printstrue- Create
~/.kiro/agents/t.json:{"name":"t","description":"x","tools":["read"],"allowedTools":["read"]} kiro-cli chat --no-interactive --trust-tools=read --agent t "/context show"
Result: 6 matched files in use, Context files total: 1.4% of context window. The listed resource rules include AmazonQ.md, AGENTS.md, README.md, .kiro/skills/*/SKILL.md, <HOME>/.kiro/skills/*/SKILL.md, and <HOME>/.kiro/steering/**/*.md (matching all six global steering files). None of these are declared by the agent.
This also reproduces when the agent does declare a resources array, so it is not a None-vs-Some fallback - the explicit declaration and the inherited default both load.
Secondary bug: duplicate loading
When an agent explicitly declares file://<HOME>/.kiro/steering/**/*.md and the same directory is also added by inheritance as <HOME>\.kiro\steering/**/*.md, canonical-path dedup does not match the two spellings (forward vs back slashes). Every global steering file is then loaded twice and counted twice in the context total.
Observed: 13 matched files where 7 were expected, each steering file listed twice at identical percentages.
This one bites anyone who declares steering explicitly while inheritance is on - which is the configuration the docs currently recommend for custom agents.
Additional notes
- The key appears in
kiro-cli settings list --allwith its documented description, so it is a recognized setting, not a typo. - The changelog lists the setting as introduced in CLI 2.10; this is 2.19.1.
- Exactly one settings file exists on disk (
~/.kiro/settings/cli.json), confirmed by searching AppData / .kiro / .aws for a second store. So this is not two competing scope stores. - Reproduces with cwd = home directory and with cwd = a project directory.
kiro-cli settings listlabels this key(workspace)whilemcp.loadedBeforein the same file is labeled(global)- possibly related to how scope is resolved for this key.- There is no
kiro-cli agent schemasubcommand in this build, so a per-agent override field could not be checked.
Side note
kiro-cli issue <DESCRIPTION> passes its positional argument as the GitHub issue title, not the body, so a multi-line description produces an enormous title and an empty description. It also overwrites the system clipboard with that title, which clobbers anything the user had staged to paste into the body.
Thanks for opening this issue and providing such a thorough reproduction case! The detailed breakdown of how chat.disableInheritingDefaultResources is being ignored—along with the secondary path-normalization dedup bug on Windows—is really helpful for our team to investigate. A maintainer will review this shortly. We appreciate you taking the time to document this so clearly! 🙏
Thanks for the exceptionally thorough write-up and repro — it made this fast to confirm.
Root cause (confirmed): chat.disableInheritingDefaultResources is currently only honored by the V3 agent engine. The V1/V2 engines ignore it. On a --no-interactive run without --v3, the engine resolves to V1/V2 (V3 only when the KAS rollout is active), so your custom agent went through the V2 loader, which applies the default resources to every agent unconditionally — there is no check of the setting on that path. The six inherited rules you listed (AmazonQ.md, AGENTS.md, README.md, the two skills globs, and global steering) are exactly what the V2 loader injects, which confirms the V2 path. This is why settings reports true (the value is stored fine) yet inheritance still happens.
The fix is to honor the setting in the V2 loader (skip default-resource injection for custom/user-defined agents when it is set, while built-in agents keep inheriting), mirroring the V3 behavior.
Secondary bug (also confirmed): the duplicate-loading you saw is real. Glob resources aren’t canonicalized the way single-file resources are, and on Windows the inherited steering glob is generated with mixed separators (…\.kiro\steering/**/*.md) while your explicit declaration uses forward slashes, so the two don’t dedup and every steering file loads twice. We’ll fix the glob dedup/normalization as part of this.
Side note: the kiro-cli issue <DESCRIPTION> behavior (positional arg used as the title instead of the body, and overwriting the clipboard) is a separate CLI-UX bug — I’m splitting that into its own issue so it doesn’t get lost.
Marking as a bug. Appreciate the detail on scope stores and the settings file — that ruled out a competing-store theory early.
Confirming this is still present on kiro-cli 2.23.0 (macOS, KAS 0.66.8), and that it reproduces on the V3 engine — not only V1/V2.
Minimal deterministic repro: a custom agent that declares no resources, measuring how many global steering files leak into its context (via --output-format stream-json) while toggling the setting on the V3 engine:
# custom agent with an empty resources list
printf '%s' '{"name":"probe","description":"probe","tools":["read"],"allowedTools":["fs_read"],"resources":[]}' \
> ~/.kiro/agents/probe.json
kiro-cli settings chat.disableInheritingDefaultResources false
kiro-cli chat --no-interactive --output-format stream-json \
--agent probe --agent-engine v3 "hi" 2>&1 | grep -c '\.kiro/steering/' # -> N (>0)
kiro-cli settings chat.disableInheritingDefaultResources true
kiro-cli chat --no-interactive --output-format stream-json \
--agent probe --agent-engine v3 "hi" 2>&1 | grep -c '\.kiro/steering/' # -> same N
rm -f ~/.kiro/agents/probe.json
Both runs return the identical count — the setting has no effect. In our case the empty-resources agent inherited 12 global steering files with the flag false and true.
Ruled out on our side:
- It is a custom (user-defined) agent, not
kiro_default. - Not a scope-resolution issue:
kiro-cli settings chat.disableInheritingDefaultResourcesreportstrue (global)and the workspace has no override. - Not the engine: reproduces under
--agent-engine v3(KAS 0.66.8 starts). - Not an agent-format issue:
.jsonand.mdare documented as equivalent in V3, and there is no per-agent inheritance field.
Net on 2.23.0: a custom agent still inherits all global steering/skills regardless of the flag, and when the agent also declares its own resources, those load on top of the inherited copies (duplicate entries in /context).
Update on kiro-cli 2.32.0 (macOS). On the V2 engine the setting now works, so the V1/V2 loader that @AnilMaktala identified as applying default resources unconditionally does now check it. Two honest limits on that: I did not re-test the V3 engine, so the 2.23.0 report above (which reproduced on V3) is not addressed by these numbers, and this is macOS, not the Windows build the issue was opened against.
Separately, and unchanged: an agent's own resources: [] still does not opt
out, which is the part worth splitting off.
Same shape of probe, a custom agent in <cwd>/.kiro/agents/, reading
contextUsagePercentage from the stream-json metadata event rather than
grepping for steering paths:
| agent config | chat.disableInheritingDefaultResources |
context used |
|---|---|---|
no resources key |
unset (default) | 6.430% |
"resources": [] |
unset (default) | 6.430% |
no resources key |
true |
3.409% |
"resources": [] |
true |
3.409% |
24 global steering files on this machine, 1M context window. The 3.021pp delta is about 30,200 tokens per turn.
Two things follow:
-
The setting is honored on 2.32.0 under V2, both globally and at
--workspacescope (kiro-cli settings --workspace <key> true, which lands in<cwd>/.kiro/settings/cli.json). Worth confirming on Windows before this is closed, since the original report was PowerShell and the dedup half of it is separate. -
The per-agent field is still purely additive. An empty
resourceslist is identical to no list at all, to three decimals. That matters because the docs presentresourcesas the per-agent opt-out, and because the setting is the only lever available: it is global or per-workspace, and there is no per-invocation flag inkiro-cli chat --help. A tool that spawnskiro-cliwith a generated agent therefore cannot opt that one agent out without mutating config that the user's other sessions in the same directory share.
Possibly worth its own issue, but noting it here since it is the thing people reach for first when they read this thread.
One more detail that cost me some time: workspace settings resolve from the
exact spawn cwd with no walk up to a git root. Run from <repo>/src, a file at
<repo>/.kiro/settings/cli.json is invisible and kiro-cli settings <key>
reports no value. Workspace agents behave the same way, so a probe agent is
simply "not found" from a subdirectory.
The setting is still not working on V3. Just tested today with kiro-cli 2.35.1. On V2 it is working.
Quick repro and extension of my comment above. V2 honours
chat.disableInheritingDefaultResources; V3 still does not. The V3 bundle never references the setting.
| engine | setting true |
setting false |
|---|---|---|
| V2 | nothing inherited | steering + skill inherited |
| V3 | steering + skill inherited | steering + skill inherited |
Repro in a scratch home (KIRO_HOME must be absolute; KIRO_DUMP_REQUESTS is read by V3 only, so on V2
the answer is the evidence):
export KIRO_HOME="$HOME/kiro-repro/kiro-home"
mkdir -p "$KIRO_HOME"/{agents,settings,steering,skills/marker-skill} "$HOME/kiro-repro/project"
echo '{"chat.disableInheritingDefaultResources": true, "chat.enableAutoAgentUpgrade": false}' > "$KIRO_HOME/settings/cli.json"
echo 'Steering marker: STEERING-MARKER-7F3A.' > "$KIRO_HOME/steering/marker.md"
printf -- '---\nname: marker-skill\ndescription: Marker skill SKILL-MARKER-9C1E.\n---\nSkill body.\n' > "$KIRO_HOME/skills/marker-skill/SKILL.md"
echo 'You are a probe agent.' > "$KIRO_HOME/agents/probe.md"
echo '{"name":"probe","description":"probe","prompt":"file://./probe.md","tools":[]}' > "$KIRO_HOME/agents/probe.json"
cd "$HOME/kiro-repro/project"
Q='Quote every string in your context that ends in a 4-character hex code after a hyphen, such as ABC-1234. Reply NONE if there is none.'
kiro-cli chat --no-interactive --v2 --agent probe "$Q" # NONE
KIRO_DUMP_REQUESTS=1 KIRO_DUMP_REQUESTS_DIR="$HOME/kiro-repro/dumps" kiro-cli chat --no-interactive --v3 --agent probe "$Q"
grep -rl -e STEERING-MARKER-7F3A -e SKILL-MARKER-9C1E "$HOME/kiro-repro/dumps" # matches
In the V3 dump the steering file arrives as <user-rule id=marker> and the skill is listed in the
disclose_context tool description. That tool is added even with tools: [] or
excludedTools: ["disclose_context"]. On V3 the workspace's .kiro/steering/, AGENTS.md and
.kiro/skills/ are inherited the same way.
Workaround for the home layer: start V3 with a KIRO_HOME that holds only agents/ and settings/, and
symlink into its skills/ only the skills the agent should see. The run above then answers NONE, and
neither marker is in the dump. A skill:// resource with an absolute path is not a substitute: on V3 it
lists nothing, without a warning. Nothing equivalent covers the workspace layer short of starting the
session outside the project, and there grep_search and file_search return no results for the project.
Just tested on 3.3.0 - this setting works sometimes. Maybe there's some timing issue between read of the settings and read of the default context?