Windows PowerShell here-string parsing falsely identifies embedded C++ Format as blocked shell command format
Summary
Desktop Commander 0.2.51 rejects a source-preparation command because command extraction treats the C++ identifier Format, embedded as literal source text inside a PowerShell here-string, as the blocked shell command format.
This is a request for a supported parsing correction or narrowly scoped, documented approval mechanism—not removal of the command blocklist.
Environment
- Desktop Commander 0.2.51
- Windows
powershell.exethrough the remotestart_processinterfaceformatpresent inblockedCommands
Observed behavior
The rejected operation is a development-only file preparation. It contains Python source inside a single-quoted PowerShell here-string; that Python source derives C++ inspector code and records a diff. The embedded C++ includes int32(Format).
The remote call returns Command not allowed, with INVALID_ARGUMENT in the surrounding response. The requested process does not launch. A separately approved second submission of the unchanged command was rejected identically, and further retries were stopped.
The listed C++ fragment is illustrative, not a claimed independently verified minimal reproduction. The original full command contains private project paths and has intentionally not been published.
Read-only diagnostic evidence
The installed dist/command-manager.js extraction logic was applied to the preserved full command as text data only, without executing that command or altering configuration.
Observed output:
fragment interpreted as a command: Format
extracted blocked token: format
blocked matches: ["format"]
parser diagnostics: noneInspection of the installed start_process handler showed that it calls validateCommand and returns Command not allowed when validation is false, before launching the requested process.
This reproduces the local rejection trigger. It does not prove that all subsequent permission checks would pass after a parser fix.
Relevant upstream source reference from the investigation: https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/092ce0b841e86455f12e41f4dc36399a7522ecb5/src/command-manager.ts
Expected behavior and requested resolution
Please distinguish literal source text in a PowerShell here-string from commands that PowerShell would actually execute. A fix should be shell-aware and preserve filtering of genuinely executable blocked commands, including applicable chaining, invocation, and substitution cases.
A supported fix or exact-command approval mechanism should come with regression evidence demonstrating both:
- Literal embedded source such as this case no longer produces a false
formatcommand classification. - Actual executable
formatcommands remain blocked.
Please do not treat all quoted content as automatically safe; literal single-quoted here-strings and expandable/evaluated contexts have different semantics.
Scope and impact
A development workflow is paused at a preserved checkpoint. No blocklist removal, parser patch, connector replacement, alternate execution route, or rejected-command execution was used to work around the denial.
This report omits local usernames, project directories, device identifiers, credentials, and project source files. A privacy-sanitized reproduction can be prepared; any reduced example should remain labeled unverified until independently tested as parser input only.
Source: wonderwhy-er/DesktopCommanderMCP