v2.99.0
GitHub CLI 2.99.0
Added 4
- Add repeatable `--attach` flag to upload local images and videos to issue, pull request, and comment bodies
- Add worktree checkout support to `gh issue develop` with `--checkout` and `--worktree` flags
- Use text-only spinner output when `gh` is invoked by a coding agent
- Honor `PI_CODING_AGENT_DIR` for Pi user skills
Fixed 9
- Explain when the target branch is checked out in another worktree in `gh repo sync`
- Safely handle `--delete-branch` with linked worktrees in `gh pr merge`
- End the declined-install warning with a newline in copilot
- Clarify retry windows and attachment path resolution
- Reject non-empty worktree targets before creating a branch in `gh issue develop`
- Prevent linked-worktree corruption in `gh repo sync`
- Reject `--comments` with `--json` in `gh view`
- Limit attachment batches to 50 files
- Install Codex user skills to `~/.agents/skills`
From GitHub CLI
Attach images and videos to issues and pull requests
The repeatable --attach flag uploads local images and videos and adds them to issue, pull request, or comment bodies. If a body already references the local path, gh replaces it with the uploaded URL; otherwise it appends the attachment:
# Attach files when creating or editing an issue
gh issue create --attach './repro.png#The error state'
gh issue edit 123 --attach ./walkthrough.mp4
# Attach files when creating or editing a pull request
gh pr create --attach ./before.png
gh pr edit 456 --attach ./after.png
# Attach files to comments
gh issue comment 123 --attach ./repro.png
gh pr comment 456 --attach ./result.mp4
Repeat the flag to attach multiple files in a single invocation. Attachments are available on GitHub.com and GitHub Enterprise Cloud.
For more information see https://gh.io/gh-attach and https://github.blog/changelog/2026-09-01-github-cli-media-in-issues-pull-requests-and-comments/
Worktree support extended to gh issue develop
gh issue develop can now create a linked branch and check it out in a new Git worktree, leaving your current working copy unchanged:
# Create a linked branch for an issue and check it out in a worktree
gh issue develop 123 --checkout --worktree /path/to/wt-feature
What's Changed
✨ Features
- Add token and repository metadata required for attachment uploads by @BagToad in #14177
- Add validation for attachable image and video files by @BagToad in #14178
- Rewrite local Markdown references to uploaded attachment URLs by @BagToad in #14179
- Add attachment uploads to GitHub by @BagToad in #14180
- Add repeatable
--attachflag parsing and upload orchestration by @BagToad in #14181 - Add
--attachtogh pr commentandgh issue commentby @BagToad in #14182 - Add
--attachtogh pr createandgh pr editby @BagToad in #14183 - Add
--attachtogh issue createandgh issue editby @BagToad in #14184 - Add worktree checkout to
gh issue developby @sergiou87 in #14136 - Use text-only spinner output when
ghis invoked by a coding agent by @niik in #14191 - Honor
PI_CODING_AGENT_DIRfor Pi user skills by @tommaso-moro in #14260
🐛 Fixes
- fix(repo sync): explain when the target branch is checked out in another worktree by @williammartin in #14076
- fix(pr merge): safely handle
--delete-branchwith linked worktrees by @tidy-dev in #14007 - fix(copilot): end the declined-install warning with a newline by @BagToad in #14222
- fix(attach): clarify retry windows and attachment path resolution by @BagToad in #14262
- fix(issue develop): reject non-empty worktree targets before creating a branch by @tidy-dev in #14244
- fix(repo sync): prevent linked-worktree corruption by @sergiou87 in #14060
- fix(view): reject
--commentswith--jsonby @BagToad in #14215 - fix(attach): limit batches to 50 files by @BagToad in #14289
- fix(skills): install Codex user skills to
~/.agents/skillsby @scarletkc in #14154
📚 Docs & Chores
- Address review feedback across the
--attachstack by @BagToad in #14200 - Refactor commands to own attachment flag policy by @BagToad in #14255
- Document attachment support in the
ghskill by @BagToad in #14261 - Document
gh issue develop --checkout --worktreein theghskill by @babakks in #14265 - Clarify pull request testing guidance by @williammartin in #14272
- Fix issue triage to apply suspected-spam labels directly by @williammartin in #14271
- Prevent Dependabot from updating agentic-workflow dependencies by @williammartin in #14274
- Modernize Go code with
go fixby @BagToad in #14278
:dependabot: Dependencies
- chore(deps): bump google.golang.org/grpc from 1.83.0 to 1.83.1 by @dependabot in #14247
- chore(deps): bump charm.land/bubbletea/v2 from 2.0.8 to 2.0.9 by @dependabot in #14248
- chore(deps): bump the codeql-actions group across 1 directory with 3 updates by @dependabot in #14250
- chore(deps): bump charm.land/bubbles/v2 from 2.1.1 to 2.2.0 by @dependabot in #14249
- chore(deps): bump agentic-workflows to 0.87.5 by @williammartin in #14273
- chore(deps): bump charm.land/bubbles/v2 from 2.2.0 to 2.2.1 by @dependabot in #14275
- chore(deps): bump https://github.com/sigstore/protobuf-specs from 0.5.1 to 0.5.2 by @dependabot in #14258
- chore(deps): bump https://github.com/google/go-containerregistry from 0.21.9 to 0.22.0 by @dependabot in #14267
- chore(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 by @dependabot in #14299
- chore(deps): bump azure/login from 3.0.1 to 3.0.2 by @dependabot in #14301
- chore(deps): bump the codeql-actions group with 3 updates by @dependabot in #14300
New Contributors
- @scarletkc made their first contribution in https://github.com/cli/cli/pull/14154
Full Changelog: https://github.com/cli/cli/compare/v2.98.0...v2.99.0