-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Describe the bug
When using gh agent-task create with the --custom-agent flag, the request fails with 400 Bad Request: invalid apiVersion.
Steps to reproduce
gh agent-task create "Test task" --repo my-org/my-repo --custom-agent my-custom-agent --base mainExpected behavior
Agent task should be created successfully.
Actual behavior
bad request: error: invalid apiVersion
failed to create job: 400 Bad Request
Debug output
With GH_DEBUG=api, the request body sent by gh CLI doesn't include an apiVersion field:
{
"problem_statement": "Test task",
"custom_agent": "my-custom-agent",
"event_type": "gh_cli",
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z",
"pull_request": {
"id": 0,
"number": 0,
"base_ref": "refs/heads/main"
}
}The API endpoint api.githubcopilot.com responds with:
HTTP/2.0 400 Bad Request
bad request: error: invalid apiVersion
Environment
gh version: 2.87.0 (2026-02-18)- OS: Linux
- Custom agent location: Organization-level agent in
.github-private/agents/
Additional context
- The same error occurs even without the
--custom-agentflag - Custom agent YAML frontmatter does not contain an apiVersion field (correctly following the docs)
- This may be related to recent Copilot API changes or the upcoming network configuration changes mentioned for Feb 27, 2026
- Recent Copilot API outages on Feb 9-10 affected the same
/agents/swe/*endpoint
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions