From d4eaf052b25ee6fd28985e0b8a408eab16e3afba Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 5 Aug 2026 21:56:27 +0200 Subject: [PATCH] fix(coding-agent): support path globs on Windows --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/core/tools/find.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 914bcc898..2a6cfa4de 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -86,6 +86,7 @@ ### Fixed +- Fixed path-containing `find` globs returning no results on Windows ([#6817](https://github.com/earendil-works/pi/issues/6817)). - Fixed messages queued during manual `/compact` failing instead of being sent after compaction completes. - Fixed Git Bash, MSYS, Cygwin, and WSL drive paths passed to built-in file tools resolving against the current Windows drive instead of their native drive ([#7064](https://github.com/earendil-works/pi/issues/7064), [#7547](https://github.com/earendil-works/pi/issues/7547)). - Fixed project-level nested provider retry settings replacing unmodified global provider retry settings ([#7572](https://github.com/earendil-works/pi/issues/7572)). diff --git a/packages/coding-agent/src/core/tools/find.ts b/packages/coding-agent/src/core/tools/find.ts index b61bfbf73..ce6caf672 100644 --- a/packages/coding-agent/src/core/tools/find.ts +++ b/packages/coding-agent/src/core/tools/find.ts @@ -255,6 +255,9 @@ export function createFindToolDefinition( if (!pattern.startsWith("/") && !pattern.startsWith("**/") && pattern !== "**") { effectivePattern = `**/${pattern}`; } + // fd matches full paths using native separators on Windows. + if (process.platform === "win32") + effectivePattern = effectivePattern.replaceAll("/", String.raw`[/\\]`); } args.push("--", effectivePattern, searchPath);