Skip to content

search_files tool fails to find results when using file_pattern with filenames containing Vietnamese Unicode characters and whitespace https://app.roocode.com/share/c8394e00-1506-4167-a0e2-efc25917731e #7508

@markp018

Description

@markp018

App Version

3.26.1

API Provider

Chutes AI

Model Used

Qwen3 Coder

Roo Code Task Links

No response

🔁 Steps to Reproduce

  1. Create a file named Lịch Học LS26HP.md containing the text diễn án.

  2. Run the following tests:

    • Test 1 (No file_pattern) → SUCCESS

      search_files(path=".", regex="diễn án")
    • Test 2 (Exact filename pattern) → FAILURE

      search_files(path=".", regex="diễn án", file_pattern="Lịch Học LS26HP.md")
    • Test 3 (Wildcard pattern) → SUCCESS

      search_files(path=".", regex="diễn án", file_pattern="*.md")

💥 Outcome Summary

  • The regex works correctly when no file_pattern is provided.
  • The regex also works with a wildcard file_pattern (*.md).
  • It fails when using the exact filename pattern (Lịch Học LS26HP.md), even though the file exists and contains multiple matches.

Example matches from Lịch Học LS26HP.md (truncated):

498 | "Thực tập tại Học viện Tư pháp: Diễn án: Hình sự lần 1 (LS.HS16)"
506 | "Thực tập tại Học viện Tư pháp: Diễn án: Hình sự lần 2 (LS.HS21)"
564 | "Diễn án Lần 3 (Hồ sơ vụ án kinh doanh thương mại LS.DS10-11/DA3)"
580 | "Diễn án Lần 4 (Hồ sơ vụ án lao động LS.DS09/DA4)"
644 | "Diễn án Lần 1 (Hồ sơ vụ án hôn nhân gia đình LS.DS07/DA1)"
754 | "Thực tập tại Học viện Tư pháp: Diễn án: Hành chính lần 1 (LS.HC.16)"

📄 Relevant Logs or Errors

No logs produced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs InfoMissing details or unclear. Waiting on author to provide more context.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions