Skip to content

Windows exec_command: requesting Windows PowerShell 5.1 runs PowerShell 7.6.6 #56169

Open

Description

@DoomLxxp

What issue are you seeing?

In a local Windows desktop Codex task, an exec_command invocation set the shell field to the Windows PowerShell 5.1 executable. A harmless read-only identity diagnostic inside that invocation reported PowerShell 7.6.6 instead. The invocation returned terminal exit code 0.

This is one observed request/effective-shell mismatch, not a claim that every Windows invocation behaves this way.

What steps can reproduce the bug?

  1. Through the exposed exec_command tool, select the Windows PowerShell 5.1 executable using shell, with login: false.
  2. Run a read-only identity diagnostic containing $PSVersionTable.PSVersion.ToString().
  3. Observed version in this instance: 7.6.6, rather than 5.1.

What is the expected behavior?

Honor the requested shell, or explicitly reject an unsupported shell selection rather than silently use a different runtime.

Additional information

A separate earlier invocation returned only a generic CreateProcess rejection containing blocked by policy, without a specific rule or reason. I have not established that this rejection and the shell mismatch share a cause.

Please clarify the supported shell-selection contract on Windows and the supported diagnostic route for the generic rejection. This is not a request to bypass or disable safeguards.

This minimal report intentionally contains no project source, filesystem paths, session identifiers or logs. The desktop app version was not captured for this report.

Activity

  1. added
    bug
    app
    windows-os
    tool-calls
    on Oct 22, 2026
  2. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions