Skip to content

glob tool hangs indefinitely on Windows when absolute path is in pattern parameter #9020

@bewernick

Description

@bewernick

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:

  1. Handle absolute paths in the pattern parameter correctly (treat the directory portion as the search root), or
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions