Codex PR integration fails in WSL with gh: Expected VAR_SIGN, actual: COLON

Open 💬 5 comments Opened Jul 11, 2026 by sugymt

What version of the Codex App are you using (From “About Codex” dialog)?

26.707.31428

What subscription do you have?

Free

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

When using the ChatGPT Desktop app (latest version) with the agent execution location set to WSL, the Pull Request integration consistently fails with the following error:

gh: Expected VAR_SIGN, actual: COLON (":") at [2, 9]

The error occurs only when Codex attempts to access Pull Request information. Other GitHub operations work normally.

Feedback ID:

no-active-thread-019f4f19-15c6-7051-bcde-62fb78cfee7c

<img width="778" height="586" alt="Image" src="https://github.com/user-attachments/assets/fb33bd25-8793-45de-8084-a34cacb56414" />

What steps can reproduce the bug?

Environment:

  • Windows 11
  • ChatGPT Desktop (latest version)
  • Agent execution location: WSL
  • WSL2 Ubuntu
  • Repository located inside WSL
  • GitHub.com
  • GitHub CLI 2.96.0 (/usr/bin/gh)
  • Windows does not have gh installed

Steps:

  1. Configure the agent execution location to WSL.
  2. Open a Git repository located inside WSL.
  3. Use the Pull Request integration (or ask Codex to access PR information).
  4. The operation immediately fails with:
gh: Expected VAR_SIGN, actual: COLON (":") at [2, 9]

Verification performed:

The same WSL environment works correctly with GitHub CLI.

gh version

returns

gh version 2.96.0

Authentication is valid:

gh auth status

Repository operations succeed:

gh repo view

GraphQL also works correctly, including variable definitions:

gh api graphql -f query='query { viewer { login } }'

and

gh api graphql \
  -f query='query($login:String!){ user(login:$login){ login } }' \
  -F login=<username>

Both commands execute successfully.

Changing the agent execution location to Windows produces a different error (gh not found), confirming that the WSL configuration is actually using the WSL installation of gh.

What is the expected behavior?

The Pull Request integration should successfully retrieve Pull Request information using the WSL installation of GitHub CLI, just as manual gh api graphql commands do.

No GraphQL parsing error should occur.

Additional information

The problem appears to be specific to the PR integration.

Since:

  • gh is functioning correctly,
  • authentication is valid,
  • GraphQL queries (including variable definitions) execute successfully when run manually,
  • repository operations succeed,

the issue appears to be within the Desktop application's PR integration rather than GitHub CLI or the GitHub API.

The error message:

Expected VAR_SIGN, actual: COLON

suggests that the GraphQL query passed to gh api graphql is malformed before execution (for example, a variable declaration such as $owner may be lost before reaching gh). This is only a hypothesis based on the parser error—the exact internal command executed by the application is not visible to the user.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗