Before submitting#
Area#
apps/server
Steps to reproduce#
- Have several projects in T3 Code. Project X is a plain folder (not a git repository) that holds a few GitHub checkouts as tracked folders, so its
repositoryIdentity is null. Project Y is an unrelated single-repo project on github.com, listed earlier in the project list.
- From a thread in project X, file an issue with
gh issue create in one of X's tracked repos (<owner>/<repo-a>).
- Call
link_issue with url: https://github.com/<owner>/<repo-a>/issues/<n>, with no projectId.
- Call
unlink_issue, then link_issue again with the same URL and projectId set to project X's id.
Expected behavior#
The link is stored against project X (the thread's project, or the one passed in projectId). If T3 cannot serve that repo from project X, link_issue should fail with a clear error, not succeed against another project.
Actual behavior#
Both calls succeed, but the result has projectId set to project Y, an unrelated project whose repo has nothing to do with the issue. The explicit projectId is ignored. Y seems to be the first project in the list with a github.com identity.
The issue shows beside the thread, but:
list_issues on project Y does not include it (Y's tracker is a different repo).
list_issues on project X fails with Project <X id> was not found or has no issue tracker.
So the link is stored under a project that has nothing to do with it, and the issue appears on no project's issues page.
link_issue { url, projectId: "<X id>" }
-> { "projectId": "<Y id>", "scope": "<owner>/<repo-a>", "key": "<n>", "alreadyLinked": false }
Impact#
Minor bug or occasional failure
Version or commit#
0.1.13 (Beta desktop)
Environment#
macOS 26.4.1, Claude Code harness
Notes#
Related: #45382 (the same project setup made link_issue fail outright; it now succeeds, but against the wrong project) and #48643.