Skip to content

read_files returns cryptic [BLOCKED] for .gitignore'd files with no permission-request flow #1151

Description

@elusuario73

What happened

When a file is listed in the repository's .gitignore, the read_files tool refuses to read it and returns [BLOCKED] with no explanation and no way to request access. The file is fully readable on disk — e.g. via terminal cat — so this is not an OS permission issue; the block is imposed by the tool layer because of ignore rules. Discovery tools (glob, code_search) silently omit the same files, so the agent has no way to detect that the file exists at all.

Steps to reproduce

Create a repo (or use an existing one) where a file is listed in .gitignore, e.g. AGENTS.local.md and AGENTS.md.
Ask the agent to read that file via the read_files tool.
Observe the tool output: [BLOCKED] (payload: {"content":"[BLOCKED]","referencedBy":{}}), with no explanation, no reason code, and no permission prompt.
Optionally, verify the file is actually readable: cat AGENTS.local.md succeeds.

Where does this happen?

Desktop app

Operating system

Linux

Version

0.0.76

Model

all

Logs or screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:desktopThe Electron desktop appbot:triagedClassified by the community triage bottype:bugA defect in the code with a reproducible failure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions