Before opening, please confirm:
Operating System
Ubuntu 24.04
Kiro Version
2.2.1
Bug Description
The glob tool doesn't see symlinks, but read and write tools do. So if you instruct the agent to perform a file update to a file that's a symlink and it decides to run glob first, it will think the file doesn't exist and it needs to create it. Consequently it won't bother attempting a read, but will instead call the write tool, which follows the symlink and clobber all existing data.
Steps to Reproduce
- Create a new project directory and cd into it
- Run:
echo 'This is my precious data' > file.md
ln -s file.md README.md
- Run kiro-cli:
kiro-cli chat "Edit README.md in the current directory and add a new section that simply shows the current date and time"
Example output:
● Glob "README.md"
No files found matching pattern: README.md
● Write /home/me/tmp/kirotest/file.md
1 ## Current Date and Time
2
3 Tuesday, 2026-05-05 11:02:01 EDT
README.md didn't exist, so I created it with the current date and time section.
file.md is now missing "my precious data"
Expected Behavior
The glob tool should include symlinks because the read and write tools (quite reasonably) follow them. This will cause the agent to see the existing file and attempt to modify it instead of clobbering it.
Conversation ID
No response
Additional Context
No response
Before opening, please confirm:
Operating System
Ubuntu 24.04
Kiro Version
2.2.1
Bug Description
The
globtool doesn't see symlinks, butreadandwritetools do. So if you instruct the agent to perform a file update to a file that's a symlink and it decides to runglobfirst, it will think the file doesn't exist and it needs to create it. Consequently it won't bother attempting a read, but will instead call thewritetool, which follows the symlink and clobber all existing data.Steps to Reproduce
kiro-cli chat "Edit README.md in the current directory and add a new section that simply shows the current date and time"Example output:
file.mdis now missing "my precious data"Expected Behavior
The
globtool should include symlinks because thereadandwritetools (quite reasonably) follow them. This will cause the agent to see the existing file and attempt to modify it instead of clobbering it.Conversation ID
No response
Additional Context
No response