Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

Summary

Export WithGraphQLFeatures to allow remote server (which uses this repo as a library) to set GraphQL feature flags in context, fixing assign_copilot_to_issue failures.

Why

The remote server couldn't set the issues_copilot_assignment_api_support feature flag because withGraphQLFeatures was unexported. This caused GraphQL schema errors: Field is not defined on UpdateIssueInput.

What changed

  • Renamed withGraphQLFeaturesWithGraphQLFeatures (exported)
  • Updated call site in assign_copilot_to_issue
  • Added tests for context feature flag functions

MCP impact

  • No tool or API changes — Pure library export for downstream consumers

Prompts tested (tool changes only)

N/A

Security / limits

  • No security or limits impact

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
Original prompt

This section details on the original issue you should resolve

<issue_title>assign_copilot_to_issue fails with GraphQL schema error: agentAssignment field not defined on UpdateIssueInput</issue_title>
<issue_description>### Describe the bug

The assign_copilot_to_issue tool fails with a GraphQL schema validation error when attempting to assign Copilot to an issue. The error indicates that the agentAssignment field is not defined on the UpdateIssueInput type.

Affected version

Using the MCP server integrated with VS Code Copilot (remote MCP).

Steps to reproduce the behavior

  1. Enable the GitHub MCP server in VS Code
  2. Create an issue in a repository that has Copilot coding agent enabled
  3. Attempt to assign Copilot to the issue using the assign_copilot_to_issue tool with valid owner, repo, and issue_number parameters

Expected vs actual behavior

Expected: Copilot should be assigned to the issue.

Actual: The tool returns an error:

failed to update issue with agent assignment: Variable $input of type UpdateIssueInput! was provided invalid value for agentAssignment (Field is not defined on UpdateIssueInput)

Logs

ERROR while calling tool: MPC 0: failed to update issue with agent assignment: Variable $input of type UpdateIssueInput! was provided invalid value for agentAssignment (Field is not defined on UpdateIssueInput)

Created with GitHub Copilot. This issue was written with AI assistance.</issue_description>

Comments on the Issue (you are @copilot in this section)

@SamMorrowDrums https://github.com//pull/1779 This is the code that introduced it, and this is the documentation: https://github.blog/changelog/2025-12-03-assign-issues-to-copilot-using-the-api/ are you perhaps opted out of some behaviour that would prevent this explicitly? @SamMorrowDrums I can reporoduce though `Error: MPC 0: failed to update issue with agent assignment: Variable $input of type UpdateIssueInput! was provided invalid value for agentAssignment (Field is not defined on UpdateIssueInput)`

So I need to investigate.</comment_new>
<comment_new>@TylerDixon
👋 @C-Ross Did this happen to be from a personal, non-staff account?</comment_new>
<comment_new>@C-Ross
@TylerDixon No, this is my primary staff enabled account (frankly I don't have any others). I was actively using the same account to interact with GitHub repos and used the same account to successfully assign copilot from the UI.</comment_new>
<comment_new>@SamMorrowDrums
We confirmed that this is isolated to the remote server, due to a minor difference in the GraphQL http roundtripper that means the required feature flag is not being set on the remote server only. A fix is ready and will be deployed once reviewed.</comment_new>
<comment_new>@SamMorrowDrums
All working, thanks for report!</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Rename withGraphQLFeatures to WithGraphQLFeatures (export it)
- Update call site in assign_copilot_to_issue
- Add comprehensive tests for WithGraphQLFeatures and GetGraphQLFeatures

This allows the remote server, which uses this repo as a library, to set
GraphQL feature flags in the context. The feature flag is required for the
issues_copilot_assignment_api_support API.

Fixes issue where assign_copilot_to_issue fails on remote server with:
"Field is not defined on UpdateIssueInput"

Co-authored-by: SamMorrowDrums <[email protected]>
Copilot AI changed the title [WIP] Fix GraphQL schema error in assign_copilot_to_issue Export WithGraphQLFeatures for remote server library usage Jan 14, 2026
Copilot AI requested a review from SamMorrowDrums January 14, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assign_copilot_to_issue fails with GraphQL schema error: agentAssignment field not defined on UpdateIssueInput

2 participants