Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate of this cross-host routing failure.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Repository names, hosts and MR numbers below are anonymised placeholders.
- Register a parent project whose Git remote is on GitHub, for example
github.com/example-org/workspace. - Include an independent GitLab repository as a tracked folder, for example
gitlab.example.com/example-team/service. Also register that folder as its own T3 project. Confirm that T3 recognises the parent project's provider as GitHub and the nested repository's provider as GitLab. - In a thread belonging to the parent project, ask the agent to read a merge request in the GitLab repository.
- Call
pull_request_readwith a repository override:
{"number":123,"repository":"example-team/service"}- Try supplying the full repository URL instead:
{"number":123,"repository":"https://gitlab.example.com/example-team/service"}Expected behavior
The agent should be able to identify the GitLab MR unambiguously and read it through GitLab, even though the calling thread belongs to a GitHub project. An explicit MR URL or host override would provide that information.
Actual behavior
The owner/repo call is routed to GitHub using the parent project's host. It fails with a GitHub repository lookup error. An anonymised version of the observed error is:
Pull request operation detail failed: GitHub could not find the requested resource, or the credential cannot see it. GitHub said: Could not resolve to a Repository with the name 'example-team/service'. (at repository)
Passing the full repository URL fails before the read:
Pass repository as owner/repo, without the host.
The exposed tool schema has no host or url parameter, so the agent cannot specify the intended forge through this tool. GitLab CLI reads succeed with the existing authentication.
Source investigation
In the installed build:
ThreadPullRequestInputexposesenvironmentId,numberandrepository, but nohostorurl.locate()passes the requested number and repository toresolveTarget(named, project), whereprojectis the calling thread's parent project.resolveTarget()takes the host from that project when no explicit host is supplied. Changingrepositorydoes not change the host.
Relevant source:
- https://github.com/pingdotgg/t3code/blob/main/apps/server/src/mcp/toolkits/pullRequests/tools.ts
- https://github.com/pingdotgg/t3code/blob/main/apps/server/src/mcp/toolkits/pullRequests/handlers.ts
- https://github.com/pingdotgg/t3code/blob/main/apps/server/src/pullRequest/pullRequestTarget.ts
Related: #41394 and #41396 cover unsupported parameter advice and repository-format errors. This report concerns an explicit repository override being sent to the wrong forge in a mixed GitHub/GitLab workspace.
Impact
Minor bug or occasional failure
MR inspection through the PR tool is blocked in this workspace setup; the existing GitLab CLI remains usable. Only read operations were tested.
Version or commit
T3 Code 0.1.12, bundled commit ca81b7b97a1c.
Environment
macOS desktop app, Codex harness, GitHub parent project and a separate self-managed GitLab repository.
Workaround
Use the existing GitLab CLI with the correct host and repository explicitly selected.
Activity
fix(server): PR tools accept a repository named by its forge URL