Skip to content

get_copilot_job_status fails with JSON unmarshal error for response_status_code #1818

@C-Ross

Description

@C-Ross

Description:

When calling get_copilot_job_status for certain pull requests, the tool fails with a JSON parsing error:

Failed to parse response: json: cannot unmarshal string into Go struct field JobError.error.response_status_code of type int

Steps to Reproduce:

  1. Call get_copilot_job_status with a valid pull request number that has Copilot agent activity
  2. Observe the parsing error

Expected Behavior:

The tool should return the Copilot job status information or handle the error response gracefully.

Actual Behavior:

The tool fails to parse the API response because response_status_code in the JobError.error struct is defined as int, but the API returns it as a string.

Additional Context:

  • The error is reproducible across multiple PRs in one repository but works correctly for PRs in other repositories
  • Other get_copilot_job_status calls succeed and return expected results (status, workflow run URL, timestamps, etc.)
  • This suggests the error may occur when the API returns an error response with a different schema than expected
  • Note: I can provide full reproduction details including specific repository/PR information privately. Please reach out to @C-Ross directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions