Skip to content

toolsSettings.write.allowedPaths only auto-approves create, not strReplace or insert #7939

@ABiegalski

Description

@ABiegalski

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

  1. Configure an agent with write path restrictions:
{
  "toolsSettings": {
    "write": {
      "allowedPaths": ["C:/example/workbench/**"]
    }
  }
}
  1. Ensure write is not in the allowedTools array (to avoid blanket override).
  2. Ask the agent to create a new file in the allowed path → auto-approves
  3. Ask the agent to strReplace content in that same file → prompts for approval
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions