---
title: "Disable Agent Merge for a pull request"
method: DELETE
path: "/agents/repos/{owner}/{repo}/pulls/{pull_number}/agent-merge"
tags: ["agent-merge"]
---

# Disable Agent Merge for a pull request

`DELETE /agents/repos/{owner}/{repo}/pulls/{pull_number}/agent-merge`

## Request

- Base URL: `https://api.github.com`
- URL: `https://api.github.com/agents/repos/{owner}/{repo}/pulls/{pull_number}/agent-merge`
- Auth: none declared

Disables Agent Merge for a pull request.

You must have write access to the repository. Disabling does not require
enrollment eligibility: your Copilot subscription, coding-agent and Automations
policies, the Agent Merge execution flag, pull request state, stack membership,
and repository archive state do not prevent cleanup. Authentication, token
repository selection, and "Agent tasks" write permission remain required.

OAuth app tokens and personal access tokens (classic) need the repo scope for private or internal repositories, or the public_repo scope for public repositories.

## Path parameters

- `owner` string, required
- `repo` string, required
- `pull_number` integer, required

## Response `204`

Agent Merge successfully disabled for the pull request

## Other responses

- `401`: Authentication required
- `403`: Caller lacks write permission
- `404`: Resource or enrollment is absent or masked as not found
- `409`: Enrollment changed during the write; no replacement was committed
- `422`: Invalid request parameters
- `429`: Rate limit exceeded
- `503`: Enrollment storage, authorization, or required publication is unavailable

## Changes

- **2026-10-28** `40ffa0de0018`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/github/apis/enterprise-cloud/changes/agents/repos/:owner/:repo/pulls/:pull_number/agent-merge/delete.md)

---

[API](https://skmtc.dev/github/apis/enterprise-cloud.md) - [All operations](https://skmtc.dev/github/apis/enterprise-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/github/apis/enterprise-cloud/revisions/3b55ce443f5c?raw)
