Facing itermittent issue with copilot review feature in azure devops

Abhiram PADYANA 0 Reputation points
2026-09-08T14:06:18.66+00:00

Copilot Functionality has been activated for all repos in the our Azure Devops organization .It seems working well for all repos except for one of the repos

error :

User's image

Sometimes (rare case when you click 20x in a row) we can get the Copilot Code Review:

This issue seems to happen only for one of the git repository.

tried what is suggested on the error message:

I tried to deactivate and re-activate at repo level:

I tried also at org level

I tried also to "Disable all" and then "Enable all" back.

None of those workaround worked.

Can you please advise on the way to proceed to successfully activate Copilot Code Review on git repository ?

Azure DevOps

3 answers

Sort by: Most helpful
  1. Tejaswini Billakurthi 760 Reputation points Microsoft External Staff Moderator
    2026-09-11T11:08:22.5666667+00:00

    Hi @Abhiram PADYANA ,

    Thanks for testing and confirming that the same error occurs with a minimal PR.

    Since the review is skipped with the message that the Copilot code review identity does not have sufficient permissions on the repository, and no Copilot review job is created, this points more toward a repository authorization issue than a PR size, prompt budget, indexing, or agent-capacity problem.

    One final area worth validating is the permission inheritance path:

    1. Open Project Settings > Repos > Repositories, select the affected repository, and open Security.
    2. Select the GitHub Copilot [Organization Name] identity and review the effective values for Read and Contribute to pull requests.
    3. Hover over each permission and select Why? to see the inheritance path and where the effective value comes from.
    4. On the same Repositories page, open the top-level Git Repositories (All Repositories) entry and compare its Security settings with the affected repository.
    5. Confirm that permission inheritance has not been disabled or configured differently for this repository.
    6. Verify that Enable Copilot code review for pull requests in repository remains enabled after the earlier Disable all / Enable all cycle.

    Because Deny permissions generally override Allow, an inherited or group-level Deny could explain why only this repository is affected even when the repository-level permissions appear as Allow.

    If the Copilot identity still shows effective Allow permissions, no inherited Deny entries exist, inheritance is configured correctly, and the repository-level toggle remains enabled, then a repository-specific provisioning or authorization issue with the Copilot review identity becomes the most likely explanation.

    As Copilot code review is currently a preview feature, I recommend reporting the issue through the Azure DevOps Developer Community and including:

    • Azure DevOps organization, project, and repository name/ID
    • Affected Pull Request ID or URL
    • Exact authorization error message
    • Screenshot showing the effective permissions for the GitHub Copilot identity
    • Approximate UTC timestamp of the latest failed attempt
    • Confirmation that Copilot code reviews work correctly in other repositories within the same organization

    This information should help the product team trace any repository-specific authorization or provisioning issue affecting the Copilot review service.

    References:

    Developer Community:

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Asger Nielsen 0 Reputation points
    2026-10-09T11:06:18.4433333+00:00

    We have the same issue. Disabling and re-enabling does nothing to our main repo.
    However it works on every PR i have done in our secondary repo.

    The repo settings in Azure DevOps are identical, so quite strange why one will work and the other wont.

    Was this answer helpful?

    0 comments No comments

  3. Hassan Mohammad Hassan Sharahili 0 Reputation points
    2026-09-08T15:00:31.5833333+00:00

    When Copilot Code Review works across all repositories except one—and intermittently works only after repeatedly clicking—the problem is typically tied to that specific repository's characteristics, Azure DevOps Code Search indexing, or service account permissions rather than the global toggle.

    Inspect and resolve the issue through the following troubleshooting steps:

    1.Check Repository Size and PR Limits:Preview limits.Copilot Code Review in Azure Repos enforces strict size and file limits:

    Total repository size must not exceed 10 GB.

    Pull requests must change 100 files or fewer and have no active merge conflicts.

    Repositories with large binary assets, deep submodule nesting, or large files (e.g., node_modules or unignored build artifacts committed to the tree) often cause background git-traversal timeouts.

    Verification: Test with a minimal PR in this repository (modifying a single Markdown or text file). If that PR reviews immediately, the failure is linked to diff/tree size constraints.

    2.Verify Searchable Branches and Code Search Indexing:Azure Repos Code Search.Azure DevOps Copilot Code Review relies on Azure DevOps Code Search to build context. If the target branch of the PR is not indexed, Copilot falls back to a deep filesystem/git walk that frequently hangs or gets canceled by the internal agent:

    Go to Project Settings > Repositories > select the affected repository.

    Check the Searchable branches tab.

    Ensure the PR target branch (e.g., main, develop, or release branch) is listed as an indexed searchable branch.

    Verification: Perform a manual search query across this repo using the top search bar. If search results return immediately for the target branch, indexing is healthy.

    3.Inspect Backend Agent Pool Logs:Failure diagnostics.Copilot code reviews execute as background jobs on your hosted pipeline agent pool:

    Go to Organization Settings > Agent Pools.

    Open the pool designated for Copilot compute (by default, Azure Pipelines).

    Locate the failing code review job and inspect the raw JSON logs to see the exact terminating exception (e.g., checkout lock, token budget exceeded, or directory traversal timeout).

    Verification: The log entries will display whether the job hit an agent cancellation (exit code 128 / timeout) or an API authorization error.

    4.Validate Project-Level Build Service Permissions:Permissions check.The backend review agent requires read permissions to the Git repository to checkout and post annotations:

    Go to Project Settings > Repositories > select the affected repository.

    Under the Security tab, locate Project Collection Build Service ([OrgName]) and [ProjectName] Build Service.

    Confirm both accounts have Read and Contribute to pull requests set to Allow (not inherited Deny).

    Verification: Ensure neither service account is set to explicit Deny anywhere in the inheritance tree.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.