Summary
Add support for ignoring paths while the agent is executing so it does not read or modify ignored files. By default, the agent should respect paths listed in .gitignore. If an .agnignore file is present, it should override .gitignore for agent execution and be used as the source of ignored paths instead.
Task
Implement agent-side path ignore behavior with the following expected behavior:
- During agent execution, prevent reading from or modifying paths matched by the active ignore file.
- Use
.gitignore as the default ignore source when no .agnignore file exists.
- If an
.agnignore file is found, use it instead of .gitignore for agent path filtering.
- Clearly define where
.agnignore is discovered from, such as the repository root/current workspace root.
- Ensure ignored paths are enforced consistently across file reads, writes, edits, and other file-system operations performed by the agent.
- Add tests covering:
.gitignore paths are ignored by default.
.agnignore overrides .gitignore when present.
- Ignored paths cannot be read or modified by the agent.
- Non-ignored paths remain accessible.
Notes
This feature is intended to let projects control which files the agent may inspect or change, while allowing a dedicated agent-specific ignore file to override normal Git ignore behavior when needed.
Summary
Add support for ignoring paths while the agent is executing so it does not read or modify ignored files. By default, the agent should respect paths listed in
.gitignore. If an.agnignorefile is present, it should override.gitignorefor agent execution and be used as the source of ignored paths instead.Task
Implement agent-side path ignore behavior with the following expected behavior:
.gitignoreas the default ignore source when no.agnignorefile exists..agnignorefile is found, use it instead of.gitignorefor agent path filtering..agnignoreis discovered from, such as the repository root/current workspace root..gitignorepaths are ignored by default..agnignoreoverrides.gitignorewhen present.Notes
This feature is intended to let projects control which files the agent may inspect or change, while allowing a dedicated agent-specific ignore file to override normal Git ignore behavior when needed.