GH-AGENT-TASK-CREATE(1)

GH-AGENT-TASK-CREATE(1) πŸ¦‹

✨ NAME ✨

gh-agent-task-create β€” create an agent task (preview). This page is from the GitHub CLI manual, bestie, and yes it's giving preview energy, so keep that in mind. πŸ’…

🌸 SYNOPSIS 🌸

gh agent-task create [<task description>] [flags]

okay so you can hand over a <task description> if you want, or not β€” it's optional, no pressure β€” and then the [flags] do their little thing. πŸŽ€

πŸ’… OPTIONS πŸ’…

  • -b, --base <string> β€” base branch for the pull request. If you don't provide one, it uses the default branch, periodt.
  • -a, --custom-agent <string> β€” use a custom agent for the task. e.g., use 'my-agent' for the 'my-agent.md' agent. iykyk.
  • --follow β€” follow agent session logs. lowkey useful.
  • -F, --from-file <file> β€” read the task description from a file. Use "-" to read from standard input β€” yes, the dash is doing main character work.
  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. slay.

πŸ’– 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.

πŸ”₯ EXAMPLE πŸ”₯

okay bestie, here are all the examples exactly as the manual gives them β€” copy-paste energy only:

# Create a task from an inline description
$ gh agent-task create "build me a new app"

# Create a task from an inline description and follow logs
$ gh agent-task create "build me a new app" --follow

# Create a task from a file
$ gh agent-task create -F task-desc.md

# Create a task with problem statement from stdin
$ echo "build me a new app" | gh agent-task create -F -

# Create a task with an editor
$ gh agent-task create

# Create a task with an editor and a file as a template
$ gh agent-task create -F task-desc.md

# Select a different base branch for the PR
$ gh agent-task create "fix errors" --base branch

# Create a task using the custom agent defined in '.github/agents/my-agent.md'
$ gh agent-task create "build me a new app" --custom-agent my-agent

🌈 SEE ALSO 🌈


stay iconic, bestie πŸ’– β€” GitHub CLI v2.102.0, Oct 2026 πŸŽ€

πŸ“¦ where this page comes from