Claude misinterprets ADO PR status enum (1=Active read as "merged")
Problem
The Microsoft azure-devops MCP server (mcp__azure-devops__repo_get_pull_request_by_id) returns ADO PR state as raw numeric enums:
status: 1— Active (open)status: 2— Abandonedstatus: 3— Completed (merged)mergeStatus: 3— Succeeded (the preview merge computed cleanly, NOT that the PR has merged)lastMergeCommit— present on open PRs too; it's the preview commit, not a record of an actual merge
In practice Claude (Opus, Sonnet) repeatedly reads status: 1 as "completed/merged" — probably because 1 reads like "true/first state" without enum context, and the adjacent mergeStatus: 3 + populated lastMergeCommit reinforce the wrong conclusion.
Impact
Claude confidently tells the user "this PR is merged" when it is open and awaiting review. This is not a one-off; it has happened multiple times in a single day for this user, and any ADO MCP user is exposed to the same defect.
Suggested fixes (any of)
- Translate enums in the MCP response. Return
"status": "active"(string) or add"statusName": "Active"alongside the integer. - System-prompt guidance in Claude Code when the ADO MCP server is configured — inline the enum tables for
PullRequestStatusandPullRequestAsyncStatusso the model has the mapping in context. - Document the gotcha in the ADO MCP server README so wrappers/users can normalize on their side.
Option 1 is the durable fix and applies to every model/host calling the server.
Reference
ADO REST API enum reference: Microsoft.TeamFoundation.SourceControl.WebApi.PullRequestStatus and PullRequestAsyncStatus.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗