Skip to content

[Bug]: GitHub PR creation fails on Windows v0.0.28 with generic createChangeRequest error despite manual gh pr create working #3694

Description

@codemustflow

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

  1. On Windows, use T3 Code v0.0.28 with GitHub CLI installed and authenticated.
  2. Open a repo with a GitHub SSH remote, for example git@github.com:<owner>/<repo>.git.
  3. Let T3 Code create/use a generated worktree branch, for example t3code/<generated-id>.
  4. Ensure the generated branch is pushed, has commits ahead of main, and has no existing open PR.
  5. Use T3 Code's source-control action to create a change request / PR for that branch.

Additional validation from the same worktree:

gh auth status
gh repo view --json nameWithOwner,url,defaultBranchRef
gh pr list --head t3code/<generated-id> --state open --json number,title,url

Those commands succeed; the PR list is empty.

A manual dry run of the same PR creation shape also succeeds from the same T3 worktree:

gh pr create --base main --head t3code/<generated-id> --title "T3 Code dry run title with spaces" --body-file <temp-body-file> --dry-run

Output:

Would have created a Pull Request with:
title:  T3 Code dry run title with spaces
draft:  false
base:   main
head:   t3code/<generated-id>
maintainerCanModify: true
body:
dry run

Expected behavior

T3 Code should create the PR successfully, or surface the actual gh stderr/stdout/arguments needed to diagnose why gh exited nonzero.

Actual behavior

The T3 Code source-control action fails with only this generic error:

Source control provider github failed in createChangeRequest: GitHub CLI command failed.

The server logs show the wrapper failure, but not the underlying gh stderr/stdout:

SourceControlProviderError: Source control provider github failed in createChangeRequest: GitHub CLI command failed.
[cause]: GitHubCliCommandError: GitHub CLI failed in execute: GitHub CLI command failed.
[cause]: VcsProcessExitError: VCS process failed in GitHubCli.execute: gh (<redacted T3 worktree path>) exited with 1 - Process exited with a non-zero status.

Impact

Major degradation or frequent failure

Version or commit

T3 Code v0.0.28

Environment

  • OS: Windows
  • GitHub CLI: gh version 2.86.0
  • Git remote: GitHub SSH remote, e.g. git@github.com:<owner>/<repo>.git
  • Branch shape: T3-generated branch, e.g. t3code/<generated-id>
  • gh resolves to a real executable: C:\Program Files\GitHub CLI\gh.exe, not a .cmd shim

Logs or stack traces

SourceControlProviderError: Source control provider github failed in createChangeRequest: GitHub CLI command failed.
[cause]: GitHubCliCommandError: GitHub CLI failed in execute: GitHub CLI command failed.
[cause]: VcsProcessExitError: VCS process failed in GitHubCli.execute: gh (<redacted T3 worktree path>) exited with 1 - Process exited with a non-zero status.

Screenshots, recordings, or supporting files

None.

Workaround

Create the PR manually from the generated T3 worktree:

cd <redacted T3 worktree path>
gh pr create --base main --head t3code/<generated-id> --fill

Notes

This does not look like the older Windows title quoting issue from #1672. The manual gh pr create --dry-run succeeds with spaces in the title, and this is on v0.0.28.

One potentially relevant environment detail: the user's shell startup emitted an unrelated vswhere.exe warning to stderr when commands were run interactively. However, the direct gh pr create --dry-run still exited successfully despite that stderr noise, so it may only be incidental. It would still be useful if T3 logged the exact gh stderr/stdout for the failing createChangeRequest call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions