rtk-ai/rtk

`gh run view --job <id>` rejected with "Run ID required"

Open

#1568 opened on Apr 28, 2026

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Rust (48,085 stars) (2,914 forks)batch import
bugeffort-smallfilter-qualitygood first issue

Description

gh run view accepts --job <id> as an alternative to a positional run ID, but rtk rejects this form with rtk: Run ID required.

Reproduction:

$ gh run view --job 72893237475 --repo owner/repo --log
rtk: Run ID required

The same command works with RTK_DISABLED=1.

Per the gh CLI, the signature is gh run view [<run-id>] [flags] and --job is documented as a way to view a specific job — the positional run ID becomes optional in that case.

view_run requires a positional identifier and errors when none is found, even though --job and its value are correctly consumed into extra_args:

https://github.com/rtk-ai/rtk/blob/e1f2845df06a8d8b8325945dc4940ec5f530e4cc/src/cmds/git/gh_cmd.rs#L745-L749

--job is already listed in flags_with_value so its value is not mistaken for the run ID, but the --job-only invocation path was not handled:

https://github.com/rtk-ai/rtk/blob/e1f2845df06a8d8b8325945dc4940ec5f530e4cc/src/cmds/git/gh_cmd.rs#L124-L133

Environment: rtk 0.37.2, Windows 11, Git Bash.

Related: #416 / #477 fixed the case where --job's value was being eaten as the run ID, but did not cover the case where --job is the sole identifier.

Contributor guide