v0.14.12 - Fix relative path resolution in recon/acting agent
π Bug fix β relative path resolution
Symptom
Recon/acting agent calling copilot_readFile with relative paths like GSEAlens/man/build_gsea_pathways.Rd failed uniformly with ENOENT. The error revealed the path was being resolved against D:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\ (the VSCode executable directory) instead of the workspace root.
Root cause
VSCode's copilot_* built-in tools resolve relative paths via process.cwd(), which for an extension host process is the VSCode executable directory β NOT the workspace root. The LLM has no way to know this and routinely emits relative paths.
Fix β two layers of defense
-
Tool-input normalization layer (
actingAgent.ts):- New
normalizeToolInput()+resolveRelativeToWorkspace()+isAbsolutePath()helpers (~100 LOC) - Intercepts every
invokeToolcall BEFORE dispatch - Rewrites relative path fields (
filePath,path,file,includePattern,folder,query,pattern, etc. β 10 fields) to absolute paths - Multi-workspace smart matching: if the path's first segment matches a workspace folder name (case-insensitive), resolve against THAT folder. E.g.
GSEAlens/man/foo.Rdwith a workspace folder namedGSEAlensβ<workspaceRoot>/GSEAlens/man/foo.Rd - Skips glob patterns (
*,?,[,]) - Progress log shows every rewrite:
[MoA] recon path normalization: filePath: "X" β "Y"
- New
-
Recon system prompt update: added "Path handling (v0.14.12+)" section encouraging the LLM to prefer absolute paths. Defense in depth.
Why this matters
Without this fix, recon against any multi-folder workspace (very common setup) is effectively broken. The LLM has no signal that paths are wrong until ENOENT errors pile up.
Install
code --install-extension dudali095.moa-bridgeOr update from the Extensions panel β v0.14.12 is live on Marketplace.
Full changelog: CHANGELOG.md