Skip to content

[Bug]: Kiro IDE fs_read guard denies .kiro/ reads when global gitignore excludes it — repo !.kiro/ negation not honored, blocks all stages; --doctor misses it #1146

Description

@omaraws

Description

On the Kiro IDE harness, the agent's fs_read permission guard denies reads of any path matching a pattern in the global git excludes file (~/.config/git/ignore). When that global file contains .kiro/ (a common personal-harness setup — mine is installed by a separate ~/.agents config), every read under .kiro/ is denied.

The framework already ships the intended mitigation in the project .gitignore (!.kiro/, inside the # AI-DLC:gitignore block's project-scoped override), but Kiro's guard does not honor that repo-level negation, nor does it consult git's actual ignore resolution. git check-ignore correctly reports the path as not ignored, yet the guard still denies it and cites the global file as the source.

Because every stage body, agent persona, protocol module, and knowledge file lives under .kiro/, this blocks the workflow completely — no stage can run.

Separately, /aidlc --doctor does not catch this: it reports all project checks green because it never verifies that the active harness can actually read a known .kiro/ file.

Steps to Reproduce

  1. On macOS with Kiro IDE, have a global git excludes file that ignores .kiro/:
    # ~/.config/git/ignore
    .kiro/
    
    (Confirm it is the active excludesfile; here it is git's default ~/.config/git/ignore.)
  2. Open an AI-DLC project whose committed .gitignore carries the shipped project-scoped override !.kiro/.
  3. Start a workflow (/aidlc <scope>) so the orchestrator emits the first run-stage directive (e.g. Intent Capture).
  4. Observe the agent attempt to read a stage file, e.g. .kiro/aidlc-common/stages/ideation/intent-capture.md.

Expected Behavior

The read succeeds. The project's !.kiro/ negation (and/or git's own ignore resolution, which reports the path as not-ignored) should un-block reads of tracked .kiro/ files, so stages can run. The guard should not deny a path that git check-ignore reports as not-ignored.

Additionally, /aidlc --doctor should detect and report the condition (a .kiro/ file is not readable by the active harness) with a concrete remedy, rather than passing all checks.

Actual Behavior

The read is denied:

Tool call denied by user's permissions.
Rule: deny fs_read matching ".kiro/"
Source: /Users/omaraws/.config/git/ignore.

Meanwhile git itself un-ignores the path (exit 1 = not ignored):

$ git check-ignore -v .kiro/aidlc-common/stages/ideation/intent-capture.md
$ echo $?
1

So the guard's gitignore evaluation diverges from git's: it matches the global .kiro/ pattern and ignores both the repo-level !.kiro/ negation and git's resolved state. Every subsequent stage read fails the same way, and the workflow cannot proceed past the first run-stage directive.

/aidlc --doctor reported 0 problems, 2 warnings (36 project checks passed) and did not surface the read block.

AI-DLC Version

v2 (current on main)

Release / Commit

Installed runtime aidlc 2.8.2; repo clone at v2.8.1-11-g0865300b (0865300b).

AI-DLC Phase

Not phase-specific (blocks all stages; first observed entering Ideation / Intent Capture).

Harness

Kiro IDE

AI Model

Claude Opus 4.8

Environment

  • OS: macOS 26.6.2
  • Harness: Kiro IDE
  • Global excludesfile: ~/.config/git/ignore containing .kiro/
  • Project .gitignore: ships the AI-DLC block plus the project-scoped !.kiro/ override
  • git: repo initialized; git check-ignore confirms .kiro/ and nested files are not ignored

Additional Context

Root cause lives in Kiro IDE's fs_read guard (a naive gitignore matcher that reads the global excludes file, does not reconcile cross-file negations, and does not consult git's index/resolution) — which AI-DLC cannot patch directly. But the impact is AI-DLC-specific and total, so two framework-side improvements would prevent a silent, total block:

  1. Doctor readability probe — add a check that attempts to read a known-tracked .kiro/ file under the active harness and fails loudly with a remedy when it is blocked. This is the fast, deterministic signal that was missing here.
  2. Known-issue doc + remedy — document that a global .kiro/ ignore breaks Kiro IDE despite the shipped !.kiro/ negation, with the workaround: add an fs_read allow for the workspace .kiro/** in ~/.kiro/settings/permissions.yaml (an explicit allow overrides the gitignore-derived deny). Adjusting the global excludes file is broader and re-introduces the personal-config leak that file exists to prevent, so it is not the recommended fix.

Workaround confirmed to be needed: git init + !.kiro/ makes git un-ignore .kiro/, but the Kiro guard still denies, so the permissions.yaml allow (or removing .kiro/ from the global excludes) is required to proceed.

Adjacent but distinct existing issues (different guard — plan-approval mutation classification, not gitignore-based denial): #1039, #965.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions