{
  "slug": "github-graphql-issue-mutations-accept-agentassignment-a812dde3deae",
  "title": "GitHub GraphQL issue mutations accept agentAssignment",
  "tools": [
    "github-graphql-api"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-07T00:00:00.000Z",
  "announced_at": "2026-02-07T00:00:00.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When creating or assigning an issue to Copilot with a listed GraphQL mutation, include `agentAssignment` in its input to configure the assignment.",
    "examples": [
      "gh api graphql -f query='mutation { createIssue(input: { repositoryId: \"<REPOSITORY_ID>\", title: \"<TITLE>\", body: \"<DETAILS>\", assigneeIds: [\"<BOT_ID>\"], agentAssignment: { targetRepositoryId: \"<REPOSITORY_ID>\", baseRef: \"<BRANCH>\", customInstructions: \"<INSTRUCTIONS>\", customAgent: \"<CUSTOM_AGENT>\" } }) { issue { id title } } }' -H 'GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection'",
      "gh api graphql -f query='mutation { addAssigneesToAssignable(input: { assignableId: \"<ISSUE_ID>\", assigneeIds: [\"<BOT_ID>\"], agentAssignment: { targetRepositoryId: \"<REPOSITORY_ID>\", baseRef: \"<BRANCH>\", customInstructions: \"<INSTRUCTIONS>\", customAgent: \"<CUSTOM_AGENT>\" } }) { assignable { ... on Issue { id title } } } }' -H 'GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection'",
      "gh api graphql -f query='mutation { updateIssue(input: { id: \"<ISSUE_ID>\", assigneeIds: [\"<BOT_ID>\"], agentAssignment: { targetRepositoryId: \"<REPOSITORY_ID>\", baseRef: \"<BRANCH>\", customInstructions: \"<INSTRUCTIONS>\", customAgent: \"<CUSTOM_AGENT>\" } }) { issue { id title } } }' -H 'GraphQL-Features: issues_copilot_assignment_api_support,coding_agent_model_selection'"
    ],
    "gotchas": [
      "Version: 2026-02-07",
      "agentAssignment: Optional configuration for assigning Copilot or an AI agent; accepted by the four mutation input objects named in the release note.",
      "baseRef: String branch reference. Example uses `main`.",
      "customAgent: String custom agent value; example uses an empty string.",
      "customInstructions: String instructions customizing the task.",
      "targetRepositoryId: ID of the target repository.",
      "Prerequisite: Include the `GraphQL-Features` header with `issues_copilot_assignment_api_support` and `coding_agent_model_selection`.",
      "Prerequisite: For Copilot assignment, authenticate with a user token and ensure Copilot cloud agent is enabled for the user and repository. The docs demonstrate checking `suggestedActors` for Copilot."
    ]
  },
  "why_it_matters": "Create or update an issue, or change its assignees, with agent assignment details through the GitHub GraphQL API.",
  "sources": [
    "https://docs.github.com/en/graphql/overview/changelog#schema-changes-for-2026-02-07",
    "https://docs.github.com/en/enterprise-cloud@latest/copilot/how-tos/use-copilot-agents/cloud-agent/use-cloud-agent-via-the-api",
    "https://docs.github.com/en/graphql/reference/issues"
  ],
  "rank": 0.92023,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave1b-tools-20261017",
    "verdict_id": "wave1b-tools-20261017:wave1b-tools-20261017-1589d4dd78b0e8a9-0:gate",
    "evidence_hash": "b7df62c4f6a950b5ca940ecdd15e09c7f429f427da7f6874afa6a310fbae4466"
  },
  "review": {
    "draft_hash": "83fe07a88f623d5fce51cd47b111e1b10c359bb83b632a237e0d4e4ae3264f44",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave1b-tools-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.65 (>= 0.6 needed)."
  }
}
