Description
When toolsSettings.write.allowedPaths is configured to auto-approve writes within a specific directory, only the create command is auto-approved. The strReplace and insert commands still prompt for user approval, even when the target file is within the allowed path.
Steps to Reproduce
- Configure an agent with write path restrictions:
{
"toolsSettings": {
"write": {
"allowedPaths": ["C:/example/workbench/**"]
}
}
}
- Ensure
write is not in the allowedTools array (to avoid blanket override).
- Ask the agent to create a new file in the allowed path → auto-approves ✅
- Ask the agent to
strReplace content in that same file → prompts for approval ❌
- Ask the agent to
insert content into that same file → prompts for approval ❌
Expected Behavior
All three write commands (create, strReplace, insert) should be auto-approved when the target path matches allowedPaths.
Actual Behavior
Only create is auto-approved. strReplace and insert prompt the user for approval despite the file being within the allowed path.
Environment
- Kiro CLI on Windows 11
- Agent config uses
toolsSettings.write.allowedPaths with glob pattern
Description
When
toolsSettings.write.allowedPathsis configured to auto-approve writes within a specific directory, only thecreatecommand is auto-approved. ThestrReplaceandinsertcommands still prompt for user approval, even when the target file is within the allowed path.Steps to Reproduce
{ "toolsSettings": { "write": { "allowedPaths": ["C:/example/workbench/**"] } } }writeis not in theallowedToolsarray (to avoid blanket override).strReplacecontent in that same file → prompts for approval ❌insertcontent into that same file → prompts for approval ❌Expected Behavior
All three
writecommands (create,strReplace,insert) should be auto-approved when the target path matchesallowedPaths.Actual Behavior
Only
createis auto-approved.strReplaceandinsertprompt the user for approval despite the file being within the allowed path.Environment
toolsSettings.write.allowedPathswith glob pattern