[BUG] Glob tool cannot find files under .claude/ directory (regression 2.1.81 → 2.1.92)

Resolved 💬 4 comments Opened Apr 7, 2026 by kevinprec Closed May 19, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The Glob tool cannot find files inside .claude/skills/ when searching from a parent directory. Files exist on disk and are accessible via Bash find and Read — only Glob is affected.

This is the same root cause as #33999 (Bun.Glob.scan() defaults dot: false, skipping .claude/ during traversal), but manifesting specifically in the Agent SDK skill workflow: a skill's SKILL.md tells the agent to read reference files under .claude/skills/<name>/references/, and the agent's Glob calls silently return nothing.

This broke between CLI 2.1.81 and 2.1.92. We have 5 agent runs on 2.1.81 where Glob finds the files, and 1 run on 2.1.92 where it cannot.

What Should Happen?

Glob(pattern="**/decision-patterns.md") from cwd /app should find /app/.claude/skills/medicals-dedup-review/references/decision-patterns.md. The .claude/ directory is the standard skill layout — Glob must be able to find files there.

Steps to Reproduce

Docker image layout:

/app/                              (cwd)
  .claude/
    skills/
      my-skill/
        SKILL.md
        scripts/
          my_script.py
        references/
          decision-patterns.md     ← this file exists but Glob can't find it

Agent SDK runner invokes a skill via /my-skill <args>. The SKILL.md instructs the agent to read references/decision-patterns.md. The agent tries:

Glob(pattern="**/decision-patterns.md")              → No files found
Glob(pattern="**/references/*.md")                   → No files found
Glob(pattern="**/references/*")                      → No files found

But Bash find works from the same cwd:

Bash: find /app -path '*/my-skill/scripts/my_script.py'
→ /app/.claude/skills/my-skill/scripts/my_script.py   ✅

And on CLI 2.1.81, the same Glob call succeeds:

Glob(pattern="**/decision-patterns.md", path="/app/.claude/skills/my-skill")
→ /app/.claude/skills/my-skill/references/decision-patterns.md   ✅ (41ms)

Is this a regression?

Yes, this worked in a previous version.

Claude Code Version

2.1.92 (bundled with claude-agent-sdk 0.1.56). Previously working: 2.1.81 (bundled with claude-agent-sdk 0.1.50).

Platform

Anthropic API

Operating System

Other Linux (Docker, python:3.14-slim, headless ECS)

Terminal/Shell

Other (headless ECS via Claude Agent SDK)

Error Messages/Logs

No error — Glob silently returns "No files found." Conversation logs from 5 successful runs (CLI 2.1.81) and 1 failing run (CLI 2.1.92) are available.

Claude Model

Opus 4.6

Last Working Version

2.1.81 (claude-agent-sdk 0.1.50)

Additional Information

Evidence table:

| Run | SDK | CLI | Glob found files under .claude/? |
|-----|-----|-----|----------------------------------|
| Run A (envelope 1d9e08de) | 0.1.50 | 2.1.81 | ✅ Yes (Bash ls) |
| Run B (envelope 1d9e08de) | 0.1.50 | 2.1.81 | ✅ Yes (Glob) |
| Run C (envelope ed0b7627) | 0.1.50 | 2.1.81 | ✅ Yes (Bash ls) |
| Run D (envelope ed0b7627) | 0.1.50 | 2.1.81 | ✅ Yes (Glob) |
| Run E (envelope ed0b7627) | 0.1.56 | 2.1.92 | ❌ 3 Glob attempts, all failed |

Root cause: Same as #33999 — Bun.Glob.scan() with dot: false (default) skips .claude/ during directory traversal. Also related to #43178 (Glob fails with explicit directory prefixes) and #40640 (nested .claude/skills/ discovery broken).

Impact: Breaks any Agent SDK skill that includes reference files in the standard .claude/skills/<name>/references/ layout. The skill itself loads via slash command, but the agent cannot discover supporting files via Glob.

Workaround: Use Bash find instead of Glob to locate skill reference files:

SKILL_ROOT=$(dirname "$(find /app -path '*/my-skill/scripts/my_script.py' 2>/dev/null | head -1)")/..
REFS="$SKILL_ROOT/references"

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗