Skip to content

gh agent-task create: swallows API errors #12069

Description

@BagToad

Describe the bug

gh agent-task create swallows API errors.

Steps to reproduce the behavior

Run a gh agent-task create command that fails, for example for permission reasons.

Expected vs actual behavior

We should show this error

Logs

API debug enabled

Creating agent task in owner/repo... ⣷< HTTP/2.0 404 Not Found
<snip>

{"message":"specified custom agent not found","errors":null}

* Request took 1.810757644s
failed to create job: 404 Not Found

As you can see, we only print the status text. We should print the helpful API error.

Activity

  1. self-assigned this
    on Oct 31, 2025
  2. added
    gh-agent-taskRelated to gh agent-task command set
    priority-3Affects a small number of users or is largely cosmetic
    on Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggh-agent-taskRelated to gh agent-task command setpriority-3Affects a small number of users or is largely cosmetic

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions