Skip to content

python3 not found on Windows (Git Bash) — codex skills fail on first run #1303

@alazc

Description

@alazc

Bug

The /codex skill hardcodes python3 in its Bash pipe commands for parsing codex JSON output. On Windows (Git Bash / MSYS2), Python installs as python, not python3, causing:

/usr/bin/bash: line 238: python3: command not found

The skill fails on first invocation, then sometimes works on retry (likely due to shell environment initialization quirks).

Affected files

  • codex/SKILL.md.tmpl — 3 instances (lines ~290, ~434, ~476)

All are the same pattern:

... | PYTHONUNBUFFERED=1 python3 -u -c "

Suggested fix

Replace bare python3 with a cross-platform probe:

PYTHON_CMD=$(command -v python3 2>/dev/null || command -v python 2>/dev/null || echo python)
... | PYTHONUNBUFFERED=1 $PYTHON_CMD -u -c "

This tries python3 first (Linux/macOS), falls back to python (Windows), and fails clearly if neither exists.

Environment

  • Windows 11, Git Bash (MSYS2)
  • Python 3.11.6 installed as python (standard Windows installer)
  • gstack v1.26.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions