gh agent-task view
gh agent-task view [<session-id> | <pr-number> | <pr-url> | <pr-branch>] [flags]
View an agent task session.
Options
-
--follow - Follow agent session logs
-q,--jq <expression>- Filter JSON output using a jq expression
-
--json <fields> - Output JSON with the specified fields
-
--log - Show agent session logs
-R,--repo <[HOST/]OWNER/REPO>- Select another repository using the [HOST/]OWNER/REPO format
-t,--template <string>- Format JSON output using a Go template; see "gh help formatting"
-w,--web- Open agent task in the browser
JSON Fields
completedAt, createdAt, id, name, pullRequestNumber, pullRequestState, pullRequestTitle, pullRequestUrl, repository, state, updatedAt, user
Examples
# 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