Obsidian CLI unable to find Obsidian from Codex on Windows 11

Steps to reproduce

  1. Open Obsidian app and enable CLI
  2. Run obsidian commands manually in Powershell and it does work
  3. Open Codex app (or Codex cli) and ensure the agent runs in Windows native (not in WSL)
  4. Ask codex to run obsidian cli

Did you follow the troubleshooting guide? [Y/N]

Y

Tried obsidian sandbox and still hit the same errror.

Expected result

Codex successfully executes obsidian commands and receives the result.

Actual result

Any obsidian commands run by Codex hit the error “The CLI is unable to find Obsidian”

Environment

SYSTEM INFO:
Obsidian version: 1.12.7
Installer version: 1.12.7
Operating system: Windows 11 Home 10.0.26200
Login status: logged in


Additional information

I suspect it has something to do with the codex sandbox on windows.
There is a similar bug on MacOS, though in my case it doesn’t launch a second obsidian app.