Windows: Codex repeatedly opens .ps1 scripts in Notepad instead of executing/handling them correctly

Open 💬 0 comments Opened Jun 8, 2026 by Yemvis

Summary

On Windows, Codex has repeatedly opened .ps1 files in Notepad incorrectly during shell/task execution. In one session this happened dozens of times, creating a disruptive loop of Notepad windows instead of handling the PowerShell script as intended.

Environment

  • OS: Windows
  • Shell/context: PowerShell from Codex Desktop
  • Workspace context: local coding workspace
  • File type involved: .ps1

Expected behavior

Codex should execute or inspect PowerShell scripts through the shell/tooling path requested by the task, or otherwise ask for confirmation if opening an editor is intentional.

Actual behavior

Codex repeatedly opened .ps1 files in Notepad without the user requesting that behavior. This happened many times in a row and interrupted the workflow.

Impact

  • Spawns many unwanted Notepad windows
  • Interrupts the user repeatedly
  • Makes Windows PowerShell/script workflows feel unreliable
  • Can make the user lose confidence that Codex is controlling the environment safely

Notes

This may be related to how Codex Desktop routes .ps1 files or handles PowerShell script invocation/opening on Windows. The desired fix is to avoid launching Notepad for .ps1 files unless the user explicitly asks to open the script in an editor.

View original on GitHub ↗