Skip to content

[Windows] install/sync/uninstall fail with Access is denied while writing managed files #293

@SantiagoGaonaC

Description

@SantiagoGaonaC

Pre-flight Checklist

  • I have searched existing issues and this is not a duplicate
  • I understand that PRs will be rejected if the linked issue does not have status:approved

📝 Bug Description

On Windows, gentle-ai fails during install, sync, uninstall, and rollback when writing managed files for multiple components and agents.
The failure is not isolated to Kiro. It also affects VS Code Copilot and GGA paths, which suggests the issue is in a shared file-writing layer rather than in any single agent adapter.
The recurring error is:

sync parent directory for "...": ... Access is denied
This appears while writing files under paths such as:
- C:\Users\USER\.kiro\steering\gentle-ai.md
- C:\Users\USER\.kiro\settings\mcp.json
- C:\Users\USER\.kiro\skills\...\SKILL.md
- C:\Users\USER\AppData\Roaming\Code\User\prompts\gentle-ai.instructions.md
- C:\Users\USER\bin\gga.ps1
- C:\Users\USER\.config\gga\AGENTS.md

🔄 Steps to Reproduce

🔄 Steps to Reproduce

  1. Install gentle-ai on Windows 11 using the latest release (v1.20.0).
  2. Run gentle-ai and install/configure an agent such as:
    • Kiro IDE
    • (And others)
  3. Let the pipeline run through install/sync.
  4. Observe failures in persona, engram, gga, sdd, and skills.
  5. Try gentle-ai uninstall or gentle-ai sync again.
  6. The same error pattern still appears.

✅ Expected Behavior

gentle-ai install, gentle-ai sync, and gentle-ai uninstall (and installs) should complete successfully on Windows, writing or removing managed files under the expected directories without permission errors.

❌ Actual Behavior

The pipeline fails with repeated Access is denied errors when trying to sync the parent directory of files being written.
Example errors:

inject persona for "kiro-ide": sync parent directory for "C:\\Users\\USER\\.kiro\\steering\\gentle-ai.md": sync C:\Users\USER\.kiro\steering: Access is denied.
inject engram for "kiro-ide": sync parent directory for "C:\\Users\\USER\\.kiro\\settings\\mcp.json": sync C:\Users\USER\.kiro\settings: Access is denied.
inject skills for "kiro-ide": skill "judgment-day": write failed: sync parent directory for "C:\\Users\\USER\\.kiro\\skills\\judgment-day\\SKILL.md": sync C:\Users\USER\.kiro\skills\judgment-day: Access is denied.
inject engram for "vscode-copilot": sync parent directory for "C:\\Users\\USER\\AppData\\Roaming\\Code\\User\\prompts\\gentle-ai.instructions.md": sync C:\Users\USER\AppData\Roaming\Code\User\prompts: Access is denied.

Gentle AI Version

1.20.0

Operating System

Windows

AI Agent / Client

Other

📋 Affected Area

Installation Pipeline

💡 Logs / Error Output

FAILED: component:engram — inject engram for "kiro-ide": sync parent directory for "C:\\Users\\USER\\.kiro\\settings\\mcp.json": sync C:\Users\USER\.kiro\settings: Access is denied
FAILED: component:gga — ensure gga powershell shim: write gga runtime file "C:\\Users\\USER\\bin\\gga.ps1": sync parent directory for "C:\\Users\\USER\\bin\\gga.ps1": sync C:\Users\USER\bin: Access is denied
FAILED: component:sdd — inject sdd for "kiro-ide": sync parent directory for "C:\\Users\\USER\\.kiro\\steering\\gentle-ai.md": sync C:\Users\USER\.kiro\steering: Access is denied
FAILED: component:skills — inject skills for "kiro-ide": skill "judgment-day": write failed: sync parent directory for "C:\\Users\\USER\\.kiro\\skills\\judgment-day\\SKILL.md": sync C:\Users\USER\.kiro\skills\judgment-day: Access is denied

Additional Context

I manually verified that basic Windows permissions are not the issue:
New-Item -ItemType Directory -Path "$env:USERPROFILE.kiro\steering" -Force Set-Content -Path "$env:USERPROFILE.kiro\steering\gentle-ai.md" -Value "test" Both commands succeeded, which suggests the failure is specific to how gentle-ai performs its file writes (or finalization/sync step), not to a basic inability to write in those directories. The same error pattern affects multiple components and multiple agents, so this does not appear to be Kiro-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus:approvedApproved for implementation — PRs can now be opened

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions