Facing itermittent issue with copilot review feature in azure devops

Abhiram PADYANA 20 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

1 answer

Sort by: Oldest
  1. Hassan Mohammad Hassan Sharahili 80 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.