[BUG] Search escapes "entities" like < > and then fails to find anything

Resolved 💬 4 comments Opened Oct 13, 2025 by myarcana Closed Jan 9, 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?

> Claude, replace all <div> with <div class="blue"> in the src directory
Search(pattern: "&lt;div", path: "src")
  ⎿  Found 0 files
...
Interrupted, tell claude what to do instead:
> Search(pattern: "<div", path: "src")
Search(pattern: "&lt;div", path: "src")
  ⎿  Found 0 files
% rg '<div' | wc -l
      19

What Should Happen?

Obviously claude should search for <div not &lt;div

Error Messages/Logs

Steps to Reproduce

> Claude, replace all <div> with <div class="blue"> in the src directory
Search(pattern: "&lt;div", path: "src")
  ⎿  Found 0 files

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.14

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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