Skip to content

Change role from "system" to "user" in prompt messages for AssignCodingAgentPrompt and IssueToFixWorkflowPrompt #897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xGosu
Copy link

@0xGosu 0xGosu commented Aug 16, 2025

Issue Description

Role "system" is not allowed by Claude Code in MCP provided prompts (they allow only role "user" and "assistant").
In Claude Code terminal, when user try to use /gh:AssignCodingAgent (MCP) or /gh:IssueToFixWorkflow (MCP) provided by Github MCP server, they will face the below error:
Screenshot 2025-08-16 at 4 37 12 PM

Solution

Simply change the role from "system" to "user" fix this issue without impacting the functionality of the features: /gh:AssignCodingAgent and /gh:IssueToFixWorkflow.
Claude Code now accept the prompt from Github MCP server and proceed as expected.
Screenshot 2025-08-16 at 4 41 46 PM

Remark:

I couldn't find any existing issue on Github Repo for this yet. If an issue is required to merge this changes. Let me know i will create a new one.

…ingAgentPrompt` and `IssueToFixWorkflowPrompt`. Role "system" is not allowed by Claude Code in MCP provided prompt (allowed only role "user" and "assistant")
@0xGosu 0xGosu requested a review from a team as a code owner August 16, 2025 08:48
@Copilot Copilot AI review requested due to automatic review settings August 16, 2025 08:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a compatibility issue with Claude Code in MCP by changing the role from "system" to "user" in prompt messages for two GitHub MCP server features.

  • Changes the role field from "system" to "user" in AssignCodingAgentPrompt and IssueToFixWorkflowPrompt
  • Enables Claude Code compatibility without affecting functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/github/workflow_prompts.go Updates role from "system" to "user" in IssueToFixWorkflowPrompt
pkg/github/issues.go Updates role from "system" to "user" in AssignCodingAgentPrompt

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

1 participant