Skip to content

[Bug]: Pull requests ignore gh's http_unix_socket since the GitHub API transport #24958

Closed

Description

@AI-JamesHenry

Before submitting

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

Area

apps/server

Steps to reproduce

I route gh through a local credential proxy so the GitHub token never sits on the machine where coding agents run. gh only holds a placeholder, and the proxy on the other end of the socket adds the real token.

  1. Run a proxy that accepts plain HTTP for api.github.com on a Unix socket and adds the token itself.
  2. Point gh at it and log in with a placeholder:
    gh config set http_unix_socket /path/to/gh.sock
    echo placeholder | gh auth login --with-token
  3. gh api user and gh pr list work, going through the socket.
  4. Open the Pull Requests view in T3 Code for a github.com project.

Expected behavior

T3's GitHub requests use the socket gh is configured with, the same way gh's own requests do. go-gh reads http_unix_socket and dials that socket for both plain and TLS connections (newUnixDomainSocketRoundTripper in pkg/api/http_client.go), so each request reaches the socket as plain HTTP with Host: api.github.com.

This worked before #16320, when the pull request features ran gh subcommands.

Actual behavior

The Pull Requests view, and the PR panel of a thread with a linked PR, show "Could not load pull requests: GitHub has no working credential for this host."

T3 takes the token from gh auth token (GitHubCredentials.ts) but sends requests straight to https://api.github.com (gitHubApiUrls in GitHubRequestPolicy.ts) and never reads gh's http_unix_socket. The placeholder goes to GitHub, which rejects it with 401.

Related: #16703 is the same kind of break: the in-process transport stopped following network setup that worked through gh. #21961 (HTTPS_PROXY) doesn't cover this case, because an HTTPS proxy only passes TLS through and can't add the credential.

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Beta) desktop 0.1.1 (bundle version 0.1.2)

Environment

macOS 26.7.1 (arm64), desktop app with its bundled server, gh 2.102.0

Logs or stack traces

Could not load pull requests
GitHub has no working credential for this host. Run `gh auth login`, or check the account and hosts in Settings → Source Control.

Screenshots, recordings, or supporting files

Image

Workaround

No response

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 25, 2026
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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions