PowerShell -EncodedCommand: Why Codex CLI Is Getting Quarantined by Enterprise Security Tools

A thread on the Codex CLI GitHub issues tracker, currently sitting at 670 views with just one reply, is quietly documenting one of the most damaging enterprise adoption blockers the tool has seen: corporate endpoint detection and response (EDR) tools are flagging and quarantining Codex CLI on Windows because of how it triggers Windows toast notifications.

The root cause is a single flag: PowerShell -EncodedCommand.

What Is Happening

Codex CLI on Windows uses PowerShell’s -EncodedCommand flag to dispatch native Windows toast notifications. The flag accepts a Base64-encoded command string, allowing arbitrary PowerShell to be passed as a single argument without shell quoting or escaping complications. It is a legitimate and convenient technique — but it is also one of the most reliably flagged indicators of compromise in enterprise threat detection rules.

The reason is well-documented in the security community. Attackers have used -EncodedCommand extensively to execute obfuscated payloads that bypass naive string-matching defences. As a result, nearly every major EDR platform — CrowdStrike Falcon, Microsoft Defender for Endpoint, SentinelOne, Carbon Black — treats powershell.exe -EncodedCommand as a medium-to-high severity alert, often triggering automatic quarantine or process termination without user interaction.

When Codex CLI triggers a toast notification — after a long-running task completes, for example — Windows launches PowerShell with -EncodedCommand. The EDR intercepts the process spawn. Codex CLI gets flagged. In some configurations the entire Node.js process is terminated.

The developer affected does not always see an error. Codex simply stops working.

Why This Is an Enterprise Problem

Codex CLI is positioned as an AI-native tool for professional software engineers. OpenAI has invested significantly in enterprise integrations: Azure OpenAI Service support, Single Sign-On flows, and Vertex AI backend compatibility. The tool’s changelog shows sustained work on features that only matter at scale — MCP OAuth token lifecycle management, concurrent session handling, cloud conversation reconnection.

None of that matters if the binary gets quarantined on the developer’s first use.

The pattern here is structurally different from bugs. Bugs can be fixed silently. This is a security policy conflict: the EDR is doing exactly what it is configured to do, correctly. Codex CLI is the thing that needs to change. And the change requires deciding how toast notifications should work on Windows without triggering known malicious-behaviour signatures.

The affected developers — those in highly regulated industries, financial services, healthcare, government contractors — are precisely the enterprise segment OpenAI is targeting with the Azure and GCP integrations now shipping. They are also the developers least able to disable or whitelist their EDR policies without change management processes that can take weeks.

Three Technical Paths Forward

There are three plausible fixes, each with different trade-offs.

Option 1: Drop the -EncodedCommand flag. Refactor the notification dispatch to pass a plain PowerShell command string instead of a Base64-encoded one. This requires careful escaping of any dynamic content (notification title, body) but removes the primary IOC trigger. It is the fastest path to a fix and the most defensible from a security hygiene standpoint — encoded commands are harder to audit, and there is no strong reason to use them for toast notifications.

Option 2: Use the Windows Runtime API directly. Node.js can invoke native Windows APIs via N-API or FFI bindings. The windows-notification and node-notifier ecosystems offer wrappers over ToastNotificationManager that do not invoke PowerShell at all. This is a heavier change but eliminates the entire class of PowerShell-related EDR conflicts.

Option 3: Use a precompiled notification binary. Ship a small, signed .exe stub that calls the Windows Runtime toast API directly. EDRs trust signed binaries from known publishers — if OpenAI signs the binary, the quarantine risk drops to near zero. This also enables richer notification capabilities (actions, progress bars) that PowerShell toast calls do not easily support.

Options 2 and 3 require more investment. Option 1 can likely ship in a patch release.

What OpenAI Has Said

As of the time of writing: nothing publicly. OpenAI Support has been engaged in the GitHub thread but has not responded with a workaround, a timeline, or even an acknowledgement that a fix is planned. The thread has sat with 670 views and one community reply.

For context, this is happening while Codex CLI is simultaneously managing 1,044-reply threads about the ChatGPT/Codex usage limits merger, a cluster of seven new Windows/WSL issues in a 24-hour period, and persistent Pro model capacity errors now entering their third week. The engineering team is visibly stretched.

The EDR thread’s low reply count belies its importance. Developers who hit enterprise security quarantine do not post detailed bug reports — they quietly switch tools.

The Trust Cost

The ChatGPT/Codex limits merger backlash has shown that community trust in OpenAI’s platform decisions is under strain. The EDR quarantine issue adds a different dimension: not resentment about pricing, but doubt about whether OpenAI understands its enterprise users at all.

A developer advocate for a Fortune 500 engineering team cannot sponsor Codex CLI adoption if the tool gets quarantined on first launch. They will not file a support ticket. They will recommend Claude Code instead, noting that Anthropic’s desktop tools do not have this problem.

This is a small fix with a large impact surface. The -EncodedCommand flag should be removed before it costs OpenAI the enterprise Windows developer segment it has spent a year trying to reach.


References:

  • GitHub issue: Windows EDR security alert — Codex CLI quarantined by enterprise security tools (670 views)1
  • Codex CLI Windows/WSL platform issue cluster, November 20262
  • PowerShell -EncodedCommand flag documentation3
  1. https://github.com/openai/codex/issues — Windows EDR PowerShell -EncodedCommand thread (Nov 2026) ↩

  2. https://github.com/openai/codex/issues — Windows/WSL platform cluster: #60793, #60723, #60874, #60801 (Nov 2026) ↩

  3. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe ↩