codex icon indicating copy to clipboard operation
codex copied to clipboard

[Windows][ChatGPT Work] Local PowerShell fails to start with registry access error (exit 70)

Open minjoon-creator opened this issue 1 week ago • 4 comments

Summary

After Windows and ChatGPT desktop updates in late November 2026, local PowerShell commands in affected ChatGPT Work conversations fail before the command runs. This blocks ordinary local work, including read-only commands.

Environment

  • ChatGPT desktop app in Work mode, using a local Windows folder
  • Windows 11 Pro 26H2, build 26300.9974
  • Exact ChatGPT desktop app version is unconfirmed

Steps to reproduce

  1. Open a ChatGPT Work conversation connected to a local Windows folder.
  2. Ask Work to execute Get-Location using its local command runner.
  3. In an affected conversation, PowerShell exits during initialization with code 70 and this output:
The shell cannot be started. A failure occurred during initialization:
Requested registry access is not allowed.

Expected behavior

PowerShell should initialize and Get-Location should return the current working directory.

Observations

  • The same command works in a manually opened PowerShell window and in the VS Code terminal.
  • Running without loading the login profile, fully restarting the app, rebooting Windows, and using Windows App Repair did not resolve the issue.
  • One existing Work conversation still runs local commands on the same machine. The affected conversation consistently fails this minimal test.
  • A comment on #22428 reports the same startup error and exit code in a different setup. Whether the underlying cause is shared is unknown.

Could you triage this as a local execution regression and share a supported workaround or the desktop build that contains a fix?

minjoon-creator avatar Nov 25 '26 09:11 minjoon-creator

Update: The previously working Work conversation now also fails to read a local file with Get-Content. In the affected conversation tested directly, PowerShell still exits with code 70 before Get-Location runs. On the same PC, both bundled PowerShell and Windows PowerShell successfully read the same project file through the Codex CLI sandbox after setting TEMP and TMP to a user-writable directory.

minjoon-creator avatar Nov 25 '26 12:11 minjoon-creator

A comparison from a different Windows build. On Windows 11 26H2 26300.10075 with desktop MSIX 26.1120.6357.0, my local Codex diagnostic could start the Primary Runtime PowerShell 7.6.9. The separate System32 PowerShell 5.1.26100.10068 also started. I did not reproduce the Work-only exit 70, and a successful Codex test does not settle the Work executor failure.

One pitfall when comparing results: on my build, specifying powershell.exe via the Codex shell argument still ran the managed pwsh.exe under WindowsApps. I verified this by printing the process path, then invoked the System32 binary as an explicit child for the control test. Details in #60573. For the affected Work turn, it would help if the desktop log names the actual executable, package revision and executor, while keeping the full local registry path out of public logs.

mdruy avatar Nov 25 '26 18:11 mdruy

Thanks, @mdruy. I checked the desktop logs and the PowerShell events available to me for a Work invocation that exited with code 70 before Get-Location ran. The desktop logs for that window were empty, and I couldn’t tie any of the PowerShell events to that invocation. The executable name, whether it came from Windows or the bundled runtime, the package version, and the executor are still unknown.

Is there a supported way to capture those details for a single failing Work invocation? If there’s a workaround that restores local commands while preserving existing Work conversations, I’d appreciate the steps.

minjoon-creator avatar Nov 26 '26 04:11 minjoon-creator

@mdruy this worked for me. https://github.com/openai/codex/issues/62907#issuecomment-7080656969

minjoon-creator avatar Nov 26 '26 05:11 minjoon-creator