You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add gh issue support for parent issues / sub-tasks #10298
changed the title [-]Ass `gh issue` support for specifying a parent issue (or sub-task)[/-][+]Add `gh issue` support for specifying a parent issue (or sub-task)[/+]on Jan 23, 2025
changed the title [-]Add `gh issue` support for specifying a parent issue (or sub-task)[/-][+]Add `gh issue` support for parent issues / sub-tasks[/+]on Jan 23, 2025
Hey @premun, thanks for the request! We are currently chatting internally about how we want to approach this. We'll try to provide an update when we have one 🙂
Reacted by Přemek Vysoký, Tom Readings, KodywithaK, Philippe Le Hegaret, mmast-watchtower, aRustyDev, Ryosuke Miyamoto, Mark Han, Ru Chern Chong and jon-mezz
@aRustyDev Not yet because we've had some competing priorities. I also think there might be more to fully supporting sub-issues than this - like issue view probably needs to be updated as well.
However, if you are comfortable sharing more information about your CLI specific use cases, we can make sure that feedback is heard in our prioritization discussions and taken into account when we start working on this from a design standpoint.
Hi, tools like the just released OpenAI Codex (the cloud product) are very good at tackling small tasks autonomously. It would be a huge productivity boost to be able to use Codex to break down high-effort issues into smaller sub-issues and conveniently track progress.
You can configure the Codex environment and AGENTS.md to use gh CLI...
Reacted by aRustyDev, AlchimiaAI and ShaneCastle-CL
@aRustyDev Not yet because we've had some competing priorities. I also think there might be more to fully supporting sub-issues than this - like issue view probably needs to be updated as well.
However, if you are comfortable sharing more information about your CLI specific use cases, we can make sure that feedback is heard in our prioritization discussions and taken into account when we start working on this from a design standpoint.
I'm trying to be able to automate breaking up bigger issues, as well as trying to make some repos declarative in nature. I have some template repositories that I want to be able to quickly deploy a set of simple issues on creation (manually via the CLI if need be). Think like having a template for a rust repo, but needing to change out a few things depending if the repo is intended for a desktop app vs a web app vs a cli executable etc. So I might need to add configuration for homebrew cask or remove a dockerfile or something simple, but these would all roll up under one parent issue ("cleanup repo" or something).
This would help alot with documenting what I'm doing, quickly building out a list of small changes that need to be verified and helping to keep my issues cleaner.
pkg/cmd/issue/addsub/addsub.go - Main command implementation
pkg/cmd/issue/addsub/addsub_test.go - Unit tests
pkg/cmd/issue/issue.go - Integration with existing issue commands
The implementation is fully functional and ready to use. If there's interest from the maintainers and community, I'd be happy to create a PR for review and discussion.
Reacted by kimiyuki shirai, Justyn Butler, Shane Lindsay, Evan, cr7Sund, 125ryun, Jan Frederik Léger and JohnMckane
Reacted by Gwenn Le Bihan, Julio Gómez Díaz, Raffael Campos, Vaibhav Khurana, Evan and 125ryun
Reacted by Přemek Vysoký, biwin, Gwenn Le Bihan, Evan, Ran Aroussi, 125ryun and Simon Baynes
Apologies for the silence on this one. This #10298 (comment) is still the current state of things.
Huge thank you to @yahsan2 for the implementation reference. We haven't had the time to dig into it fully, but I know that'll be valuable in the future 🙏
Like @stanoddly mentioned, porting your code to an extension could be a worthwhile endeavor, if you're interested. Extensions can help bridge the gap in these situations where we haven't been able to prioritize getting it into the core gh yet, while demonstrating the real world value and use of the feature 💡
For everyone that is waiting for this, please:
React (👍 ) to the original issue post.
Describe your use cases and the value of this feature. Seeing the value and use-cases are incredibly important to our prioritization process.
Thanks for the replies, you guys. @stanoddly@BagToad
I didn't know gh extensions. I'll try to make an extension like gh-sub-issues. I’ll let you know if I can get it done.
Describe your use cases and the value of this feature. Seeing the value and use-cases are incredibly important to our prioritization process.
And in my case, I manage my tasks using GitHub Issues. I often start by breaking down tasks using Claude Code and documenting them. Based on that document, I frequently want to add sub-issues.
If a sub-issues command existed, I could create structured issues directly from Claude Code outputs. Without parent-child issue relationships, the issue list becomes cluttered with many small tasks. By registering these as sub-issues under a single parent, I can keep the implementation units small while maintaining visibility and better progress tracking.
In addition, some tasks can be completed via GitHub Actions. After breaking down the tasks, I want to clearly separate which ones I will implement manually and which can be completed automatically by GitHub Actions.
I’ve already started implementing this :). For example, I would like to register the sections “Setup Tasks,” “Implementation Tasks,” and “Completion Checklist” from this issue comment as sub-issues:
I’m trying to use GraphQL with LLM prompts to register sub-tasks automatically, but I often encounter errors like “command not found” and the process is unstable.
I believe using a proper CLI extension would make the instructions more reliable. However, it would be even better if sub-issue support were built into the official GitHub CLI.
For my use case, I am using the GitHub CLI along with sub-issues to break down complex issues, ensuring that sub-agents remain focused and on task. However, I encountered a failure point when I asked an agent to create a new sub-issue using the CLI, and it became completely confused. In my search for documentation to assist with this, I found the resources to be limited, which is how I ended up here.
My primary use case is workflows with agents that breaking down PRD's into sub-issues for features/tasks.
@aRustyDev Not yet because we've had some competing priorities. I also think there might be more to fully supporting sub-issues than this - like issue view probably needs to be updated as well.
@BagToad - Even if adding/removing sub issues was to be added a ahead of solving future the issue view enhancements it would be a big win.
@aRustyDev Not yet because we've had some competing priorities. I also think there might be more to fully supporting sub-issues than this - like issue view probably needs to be updated as well.
However, if you are comfortable sharing more information about your CLI specific use cases, we can make sure that feedback is heard in our prioritization discussions and taken into account when we start working on this from a design standpoint.
I'd like to be able to query an issue ID and in its response have its Relationships data - highest priority being parent issue
Sub-issue support is in progress, covering --parent on create, --set-parent/--remove-parent on edit, and parent/subIssues/subIssuesSummary in --json output. The full design is up for review at #13120. If you have feedback on the proposed flags or behavior, please comment there!
Reacted by Will Battel, sito1912, Alfred.Liu, Julio Gómez Díaz, Nathan, Přemek Vysoký, Alex Cyphus, Bo Liu, gangan, Kishi Yoshimaru / kagan and 8 more
Activity
[-]Ass `gh issue` support for specifying a parent issue (or sub-task)[/-][+]Add `gh issue` support for specifying a parent issue (or sub-task)[/+][-]Add `gh issue` support for specifying a parent issue (or sub-task)[/-][+]Add `gh issue` support for parent issues / sub-tasks[/+]jtmcg commentedon Jan 27, 2025
Hey @premun, thanks for the request! We are currently chatting internally about how we want to approach this. We'll try to provide an update when we have one 🙂
aRustyDev commentedon May 10, 2025
Has there been any movement on this? I would love to be able to start leveraging this for my projects.
BagToad commentedon May 10, 2025
@aRustyDev Not yet because we've had some competing priorities. I also think there might be more to fully supporting sub-issues than this - like
issue viewprobably needs to be updated as well.However, if you are comfortable sharing more information about your CLI specific use cases, we can make sure that feedback is heard in our prioritization discussions and taken into account when we start working on this from a design standpoint.
DhruvDh commentedon May 17, 2025
Hi, tools like the just released OpenAI Codex (the cloud product) are very good at tackling small tasks autonomously. It would be a huge productivity boost to be able to use Codex to break down high-effort issues into smaller sub-issues and conveniently track progress.
You can configure the Codex environment and AGENTS.md to use gh CLI...
aRustyDev commentedon May 29, 2025
My use case is similar to @DhruvDh
I'm trying to be able to automate breaking up bigger issues, as well as trying to make some repos declarative in nature. I have some template repositories that I want to be able to quickly deploy a set of simple issues on creation (manually via the CLI if need be). Think like having a template for a rust repo, but needing to change out a few things depending if the repo is intended for a desktop app vs a web app vs a cli executable etc. So I might need to add configuration for homebrew cask or remove a dockerfile or something simple, but these would all roll up under one parent issue ("cleanup repo" or something).
This would help alot with documenting what I'm doing, quickly building out a list of small changes that need to be verified and helping to keep my issues cleaner.
Add gh issue add-sub command for sub-issue management
yahsan2 commentedon Jun 30, 2025
Hi! I've implemented a working
gh issue add-subcommand for my personal use since the GraphQLaddSubIssuemutation is now available.Implementation details:
gh issue add-sub <parent-issue> <sub-issue>--repoflagExample usage:
Live demo:
I've successfully tested it on my fork repository:
gh issue add-sub 1 2 --repo yahsan2/gh-cliSource code:
The implementation is available in my fork: yahsan2@05f9f44ab
Files added:
pkg/cmd/issue/addsub/addsub.go- Main command implementationpkg/cmd/issue/addsub/addsub_test.go- Unit testspkg/cmd/issue/issue.go- Integration with existing issue commandsThe implementation is fully functional and ready to use. If there's interest from the maintainers and community, I'd be happy to create a PR for review and discussion.
AzulGarza commentedon Jul 4, 2025
it would be very cool to see the subissues in
gh issue view.:)8 remaining items
Riprock commentedon Aug 1, 2025
Is A PR gonna get opened to have this added?
BagToad commentedon Aug 1, 2025
Hi folks 👋
Apologies for the silence on this one. This #10298 (comment) is still the current state of things.
Huge thank you to @yahsan2 for the implementation reference. We haven't had the time to dig into it fully, but I know that'll be valuable in the future 🙏
Like @stanoddly mentioned, porting your code to an extension could be a worthwhile endeavor, if you're interested. Extensions can help bridge the gap in these situations where we haven't been able to prioritize getting it into the core
ghyet, while demonstrating the real world value and use of the feature 💡For everyone that is waiting for this, please:
yahsan2 commentedon Aug 7, 2025
Thanks for the replies, you guys. @stanoddly @BagToad
I didn't know gh extensions. I'll try to make an extension like
gh-sub-issues. I’ll let you know if I can get it done.yahsan2 commentedon Aug 7, 2025
And in my case, I manage my tasks using GitHub Issues. I often start by breaking down tasks using Claude Code and documenting them. Based on that document, I frequently want to add sub-issues.
If a sub-issues command existed, I could create structured issues directly from Claude Code outputs. Without parent-child issue relationships, the issue list becomes cluttered with many small tasks. By registering these as sub-issues under a single parent, I can keep the implementation units small while maintaining visibility and better progress tracking.
In addition, some tasks can be completed via GitHub Actions. After breaking down the tasks, I want to clearly separate which ones I will implement manually and which can be completed automatically by GitHub Actions.
yahsan2 commentedon Aug 7, 2025
I’ve already started implementing this :). For example, I would like to register the sections “Setup Tasks,” “Implementation Tasks,” and “Completion Checklist” from this issue comment as sub-issues:
yahsan2/gh-sub-issues#4 (comment)
I’m trying to use GraphQL with LLM prompts to register sub-tasks automatically, but I often encounter errors like “command not found” and the process is unstable.
I believe using a proper CLI extension would make the instructions more reliable. However, it would be even better if sub-issue support were built into the official GitHub CLI.
yahsan2 commentedon Aug 7, 2025
I’ve created a gh-sub-issue extension — feel free to try it out and let me know your feedback! and please star ⭐
https://github.com/yahsan2/gh-sub-issue
gh extension install yahsan2/gh-sub-issueadamrefactored commentedon Aug 26, 2025
For my use case, I am using the GitHub CLI along with sub-issues to break down complex issues, ensuring that sub-agents remain focused and on task. However, I encountered a failure point when I asked an agent to create a new sub-issue using the CLI, and it became completely confused. In my search for documentation to assist with this, I found the resources to be limited, which is how I ended up here.
sandcastle commentedon Aug 27, 2025
My primary use case is workflows with agents that breaking down PRD's into sub-issues for features/tasks.
@BagToad - Even if adding/removing sub issues was to be added a ahead of solving future the
issue viewenhancements it would be a big win.In the mean time I'm using @yahsan2's extension https://github.com/yahsan2/gh-sub-issue
dfaivre-pcs commentedon Sep 5, 2025
I'd like to be able to query an issue ID and in its response have its
Relationshipsdata - highest priority being parent issueBagToad commentedon Apr 8, 2026
Sub-issue support is in progress, covering
--parenton create,--set-parent/--remove-parenton edit, andparent/subIssues/subIssuesSummaryin--jsonoutput. The full design is up for review at #13120. If you have feedback on the proposed flags or behavior, please comment there!docs(goal): resolve slice-2 shapes (guided form + native sub-issues)