glob tool hangs indefinitely on Windows when absolute path is in pattern parameter
Bug
The glob tool hangs indefinitely on Windows when an absolute path is included in the pattern parameter with no path parameter specified.
Steps to Reproduce
In a Kiro CLI session on Windows:
Hangs (must be cancelled):
glob(pattern="C:\temp\workspace\recon_results\extracts\*.csv")
Works instantly:
glob(path="C:\temp\workspace\recon_results\extracts", pattern="*.csv")
Impact
This is particularly severe for subagents spawned via the subagent tool. The LLM naturally generates glob calls with the full path in the pattern parameter (since the tool schema doesn't indicate this will hang). Subagents get stuck on their first glob call and time out, returning "No result" to the parent session.
In my testing, 5 out of 6 subagent sessions hung on the exact same call:
{"name": "glob", "input": {"pattern": "C:\\temp\\workspace\\recon_results\\extracts\\*.csv"}}
The one subagent that succeeded was the one that happened to skip glob and use the read tool (Directory mode) instead.
Expected Behavior
The glob tool should either:
- Handle absolute paths in the
pattern parameter correctly (treat the directory portion as the search root), or
- Return an error immediately explaining that
path must be used for the directory
It should never hang indefinitely.
Environment
- OS: Windows 11
- Client: Kiro CLI
- Kiro version: Latest as of 2025-05-31
Workaround
A steering file with inclusion: always that instructs the agent to always separate path from pattern. This works for the main session but subagents don't reliably follow it since the model still tends to generate the natural (broken) form.
glob tool hangs indefinitely on Windows when absolute path is in pattern parameter
Bug
The glob tool hangs indefinitely on Windows when an absolute path is included in the
patternparameter with nopathparameter specified.Steps to Reproduce
In a Kiro CLI session on Windows:
Hangs (must be cancelled):
Works instantly:
Impact
This is particularly severe for subagents spawned via the
subagenttool. The LLM naturally generates glob calls with the full path in the pattern parameter (since the tool schema doesn't indicate this will hang). Subagents get stuck on their first glob call and time out, returning "No result" to the parent session.In my testing, 5 out of 6 subagent sessions hung on the exact same call:
{"name": "glob", "input": {"pattern": "C:\\temp\\workspace\\recon_results\\extracts\\*.csv"}}The one subagent that succeeded was the one that happened to skip glob and use the
readtool (Directory mode) instead.Expected Behavior
The glob tool should either:
patternparameter correctly (treat the directory portion as the search root), orpathmust be used for the directoryIt should never hang indefinitely.
Environment
Workaround
A steering file with
inclusion: alwaysthat instructs the agent to always separate path from pattern. This works for the main session but subagents don't reliably follow it since the model still tends to generate the natural (broken) form.