5.1 Max | Cannot Find WSL "Sometimes"

So i use codex via extension on VS Code. While debugging and re-scripting i noticed that unless i explicitly tell it to ( and even then it has some problems finding the folder ) it wont remember the folder my env is actually in.

It says “I’m running into quoting/tool limits editing this file directly”. But what makes me wonder if it truly is, is sometimes it doesnt and passes commands through powershell directly into WSL other times it doesnt. From what i noticed so far is that if it wants to “SEE” code it can, if it wants to “EDIT” its about a 50/50 chance it can do it. I attached some photos as well for reference.

However, this time it did exactly what it said it couldnt which is find a location and edit code: