GH-AGENT-TASK-VIEW(1)
π gh-agent-task-view(1) β the GitHub CLI manual, bestie edition π
okay so real talk: this is a page straight out of the GitHub CLI manual (yes, that GitHub CLI, the one you already have open in another tab), and it's about peeking at an agent task session. preview era β¨
β¨ NAME β¨
gh-agent-task-view β view an agent task session (preview) π«Ά
π¦ SYNOPSIS π¦
gh agent-task view [<session-id> | <pr-number> | <pr-url> | <pr-branch>]
[flags]
like, you give it something that points at a session β or honestly nothing at all, the brackets said optional β and then flags on top. iconic behavior.
πΈ DESCRIPTION πΈ
View an agent task session. that's it, that's the whole vibe. you look at the session, you see the session, you move on with your life π
π OPTIONS π
--followβ follow the agent session logs, so you're just sitting there watching them scroll by like a livestream π-q,--jq <expression>β filter the JSON output using a jq expression, because raw JSON is giving a lot and sometimes you just want the one field, iykyk--json <fields>β output JSON with the specified fields (the field names are down in JSON FIELDS, keep scrolling bestie)--logβ show the agent session logs, one and done, no following required π-R,--repo <[HOST/]OWNER/REPO>β select another repository using the[HOST/]OWNER/REPOformat. note the[HOST/]part is optional, so it's eitherOWNER/REPOorHOST/OWNER/REPOπ-t,--template <string>β format the JSON output using a Go template; seegh help formattingfor the lore π-w,--webβ open the agent task in the browser. mouse girlies rise π
π₯ JSON FIELDS π₯
these are the exact field names, no cap, copy them character for character:
completedAt, createdAt, id, name, pullRequestNumber, pullRequestState, pullRequestTitle, pullRequestUrl, repository, state, updatedAt, user
that's twelve fields and we are obsessed with all twelve π
β EXIT CODES β
0: Successful execution π1: Error π2: Command canceled π4: Authentication required π
NOTE: specific commands may have additional exit codes. refer to the command's help for more information β like, actually refer to it, don't guess π
π EXAMPLE π
# View an agent task by session ID
$ gh agent-task view e2fa49d2-f164-4a56-ab99-498090b8fcdf
# View an agent task by pull request number in current repo
$ gh agent-task view 12345
# View an agent task by pull request number
$ gh agent-task view --repo OWNER/REPO 12345
# View an agent task by pull request reference
$ gh agent-task view OWNER/REPO#12345
# View a pull request agents tasks in the browser
$ gh agent-task view 12345 --web
see how it takes a raw session id, a PR number, a full OWNER/REPO#12345 reference, and then just yeets itself into the browser with --web? versatile queen π
π§ SEE ALSO π§
gh-agent-task(1)β the parent command, go say hi π
later bestie πΈ this was GitHub CLI v2.102.0, dated Oct 2026 β mwah π
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms