Skip to content

gh agent list --help should not display redundant default for --limit flag #12153

@andyfeller

Description

@andyfeller

Describe the bug

When displaying help usage for gh agent list command, the -L, --limit command line flag has its default value information shown twice:

$ gh agent list --help
List agent tasks (preview)

USAGE
  gh agent-task list [flags]

FLAGS
  -L, --limit int   Maximum number of agent tasks to fetch (default 30) (default 30)
  -w, --web         Open agent tasks in the browser

INHERITED FLAGS
  --help   Show help for command

LEARN MORE
  Use `gh <command> <subcommand> --help` for more information about a command.
  Read the manual at https://cli.github.com/manual
  Learn about exit codes using `gh help exit-codes`
  Learn about accessibility experiences using `gh help accessibility`

Affected version

$ gh version
gh version 2.83.1 (2025-11-13)
https://github.com/cli/cli/releases/tag/v2.83.1

Steps to reproduce the behavior

  1. Type this 'gh agent list --help'
  2. View the output
  3. See error

Expected vs actual behavior

  -L, --limit int   Maximum number of agent tasks to fetch (default 30)

Logs

Paste the activity from your command line. Redact if needed.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocsgh-agent-taskRelated to gh agent-task command set

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions