Describe the bug
When trying to contribute to an open source repo, it's likely that you've forked it. In this case however, the GH agent task creation sends out the request against the forked upstream, not against your origin repo, resulting in an HTTP 401 unauthorized error.
Affected version
gh version 2.81.0 (2025-10-01)
Steps to reproduce the behavior
- Type this 'gh fork somerepo'
- cd into this repo and run 'GH_DEBUG=api gh agent-task create'
- See the POST request not targeting your origin, but forked upstream
- Get an HTTP 401 unauthorized error
Expected vs actual behavior
Even in forked repos, agent tasks should target the repo of the owner sending out the Copilot request, not another remote.
Describe the bug
When trying to contribute to an open source repo, it's likely that you've forked it. In this case however, the GH agent task creation sends out the request against the forked upstream, not against your origin repo, resulting in an HTTP 401 unauthorized error.
Affected version
gh version 2.81.0 (2025-10-01)
Steps to reproduce the behavior
Expected vs actual behavior
Even in forked repos, agent tasks should target the repo of the owner sending out the Copilot request, not another remote.