Description
assign-to-agent's model, custom-agent, custom-instructions, and base-branch configuration values are accepted and logged, but never actually sent to GitHub's API. The Copilot coding agent is assigned with a bare { assignees: [...] } payload only, so it never receives the custom agent/instructions and silently falls back to default behavior.
Where
actions/setup/js/assign_agent_helpers.cjs, function assignAgentToIssue (confirmed present at v0.81.6 and current main, commit b194e15):
async function assignAgentToIssue(
assignableId, agentLogin, currentAssignees, agentName,
allowedAgents = null, model = null, customAgent = null,
customInstructions = null, baseBranch = null, ...
) {
...
const assignParams = {
owner: targetOwner,
repo: targetRepo,
issue_number: issueNumber,
assignees: [agentLogin],
};
// model / customAgent / customInstructions / baseBranch are never added here
await githubClient.request("POST /repos/{owner}/{repo}/issues/{issue_number}/assignees", assignParams);
assign_to_agent.cjs logs the values right before calling this function (Using custom agent: coding, Using custom instructions: ...), giving the impression they were applied, but they are dropped before the request is built.
Expected behavior
Per GitHub's own docs (Using cloud agent via the API), the REST assignees endpoint supports an agent_assignment object:
POST /repos/{owner}/{repo}/issues/{issue_number}/assignees
{
"assignees": ["copilot-swe-agent[bot]"],
"agent_assignment": {
"target_repo": "owner/repo",
"base_branch": "main",
"custom_instructions": "...",
"custom_agent": "my-agent",
"model": ""
}
}
assignAgentToIssue should build and send this agent_assignment object whenever model, customAgent, customInstructions, or baseBranch are non-null.
Impact
Any workflow using safe-outputs.assign-to-agent with custom-agent: and/or custom-instructions: (as documented in Copilot Cloud Agent) silently loses that configuration. The Copilot coding agent runs with no custom instructions and ignores any referenced .github/agents/*.agent.md custom agent profile, even though the docs and workflow logs both suggest it was applied.
Repro
- Configure a workflow with:
safe-outputs:
assign-to-agent:
custom-agent: my-agent
custom-instructions: "Follow .github/agents/my-agent.agent.md exactly."
allowed: [copilot]
- Trigger the workflow against an issue.
- Observe the run log shows
Using custom agent: my-agent / Using custom instructions: ... followed by Assigning via issues assignees REST API with login: copilot-swe-agent[bot].
- Inspect the resulting Copilot session / PR — it has no awareness of the custom agent or instructions, because the REST request body never included
agent_assignment.
Suggested fix
In assignAgentToIssue (actions/setup/js/assign_agent_helpers.cjs), build an agent_assignment object from the existing model/customAgent/customInstructions/baseBranch parameters (already passed into the function) and include it in assignParams when any of them are set.
Description
assign-to-agent'smodel,custom-agent,custom-instructions, andbase-branchconfiguration values are accepted and logged, but never actually sent to GitHub's API. The Copilot coding agent is assigned with a bare{ assignees: [...] }payload only, so it never receives the custom agent/instructions and silently falls back to default behavior.Where
actions/setup/js/assign_agent_helpers.cjs, functionassignAgentToIssue(confirmed present atv0.81.6and currentmain, commitb194e15):assign_to_agent.cjslogs the values right before calling this function (Using custom agent: coding,Using custom instructions: ...), giving the impression they were applied, but they are dropped before the request is built.Expected behavior
Per GitHub's own docs (Using cloud agent via the API), the REST assignees endpoint supports an
agent_assignmentobject:assignAgentToIssueshould build and send thisagent_assignmentobject whenevermodel,customAgent,customInstructions, orbaseBranchare non-null.Impact
Any workflow using
safe-outputs.assign-to-agentwithcustom-agent:and/orcustom-instructions:(as documented in Copilot Cloud Agent) silently loses that configuration. The Copilot coding agent runs with no custom instructions and ignores any referenced.github/agents/*.agent.mdcustom agent profile, even though the docs and workflow logs both suggest it was applied.Repro
Using custom agent: my-agent/Using custom instructions: ...followed byAssigning via issues assignees REST API with login: copilot-swe-agent[bot].agent_assignment.Suggested fix
In
assignAgentToIssue(actions/setup/js/assign_agent_helpers.cjs), build anagent_assignmentobject from the existingmodel/customAgent/customInstructions/baseBranchparameters (already passed into the function) and include it inassignParamswhen any of them are set.