Lesstep
Azure DevOps Services · REST API, web and Azure CLI · Checked November 2, 2026

Azure DevOps: "TF400898: An Internal Error Occurred. Activity Id: …"

Azure DevOps failed on its own side and did not say why. TF400898 is its message for an HTTP 500, and it reads the same whatever went wrong. The Activity Id is your request's number in Microsoft's logs; each try gets a new one. Two different things end in this message: a service problem that passes, and a request the service cannot handle, which fails every time you send it.

What comes back

From a public Dependabot for Azure DevOps issue (2024), where a pull request was created through the REST API:

POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repository}/pullrequests
500 Internal Server Error
{"$id":"1","innerException":null,"message":"TF400898: An Internal Error Occurred. Activity Id: b7ecf655-….","typeName":"Microsoft.Data.SqlClient.SqlException, Microsoft.Data.SqlClient","typeKey":"SqlException","errorCode":0,"eventId":0}

The typeKey shows where it broke inside Azure DevOps (here its database), not what in the request caused it.

First: does it happen every time?

A pull request with the same reviewer twice

Two public reports found the same cause. In the Azure CLI (issue 29914, 2024), az repos pr create failed with TF400898 whenever one email address was in both --required-reviewers and --optional-reviewers. In Dependabot for Azure DevOps (the issue above), a team was listed both as an assignee and as a reviewer. Azure DevOps has no assignees, so the extension put both lists into one reviewer list, with the team in it twice. Taking the duplicate out made the pull request go through, and the extension now filters duplicates out itself.

Put each person or team in the reviewer list once. In the web, a reviewer is either required or optional, not both:

az repos pr create --source-branch feature/login --target-branch main --title "Login page" \
  --required-reviewers alice@contoso.com --optional-reviewers bob@contoso.com

Long file paths

In February 2026, a team on Microsoft Q&A pushed files with paths over 500 characters to their develop branch. The repository's Maximum path length policy was off, so the push went through, and so did the pull request that brought the files in. After that, every pull request that changed one of those files failed with TF400898. They saw it above about 400 characters. An answer on the thread said that pushes accept long paths when the policy is off, but the services behind pull requests (the diff, the merge preview) have stricter limits that are not documented and that the policy does not change.

The longest paths in a branch:

git ls-files | awk '{ print length($0), $0 }' | sort -rn | head

Shorten them with git mv. The thread does not say whether a pull request that renames such files goes through. To keep new ones out, turn on Maximum path length under Project settings → Repositories → Policies. With it on, the default limit is 248, according to Microsoft's repository settings page.

Other places it shows up

Whatever you report to Microsoft, include the Activity Id and the time with its time zone.

Creating Azure DevOps pull requests from IntelliJ IDEA or Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, adds Git → Create Azure DevOps Pull Request…. Its reviewer list offers each person or team once, from the repository's recent pull requests, so it never sends the same reviewer twice. When Azure DevOps answers with an error like this one, the plugin shows the message as Azure DevOps wrote it, Activity Id included. Creating pull requests is Pro (US$1 a month, with a 30-day free trial); the review inbox is free.

Get it on JetBrains Marketplace

Azure DevOps and Azure Repos are trademarks of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: "TF401179: An active pull request for the source and target branch already exists" · "TF401028: The reference … has already been updated by another client" · 日本語