Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 14, 2026

Summary

Exports WithGraphQLFeatures for library usage and adds transport layer tests to validate the GraphQL-Features header mechanism required by assign_copilot_to_issue.

Why

The remote server (which uses this repo as a library) experienced failures because the GraphQL-Features: issues_copilot_assignment_api_support header wasn't being set correctly. While that issue is now fixed, this PR:

  1. Makes WithGraphQLFeatures available for external use
  2. Adds test coverage to prevent regressions in the stdio server

What changed

  • Exported WithGraphQLFeatures (renamed from withGraphQLFeatures)
  • Added TestBearerAuthTransport_AddsGraphQLFeaturesHeader to verify header injection from context
  • Added TestUserAgentTransport_PreservesGraphQLFeatures to verify transport chain integrity

MCP impact

  • No tool or API changes — Internal refactoring only. The assign_copilot_to_issue tool behavior is unchanged.

Security / limits

  • No security or limits impact — Test additions only, no runtime behavior changes.

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 — Function export doesn't require documentation updates.
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.

- Export WithGraphQLFeatures function to make it available for external use (including remote server)
- Add test to verify bearerAuthTransport correctly adds GraphQL-Features header from context
- Add test to verify userAgentTransport preserves GraphQL-Features through transport chain
- Tests ensure the feature flag required for assign_copilot_to_issue is properly set

Co-authored-by: SamMorrowDrums <[email protected]>
Copilot AI changed the title [WIP] Fix GraphQL schema error for assign_copilot_to_issue Export WithGraphQLFeatures and add transport layer tests Jan 14, 2026
Copilot AI requested a review from SamMorrowDrums January 14, 2026 14:49
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