Truth in IT
    • Sign In
    • Register
        • Videos
        • Channels
        • Pages
        • Galleries
        • News
        • Events
        • All
Truth in IT Truth in IT
  • Data Management ▼
    • Converged Infrastructure
    • DevOps
    • Networking
    • Storage
    • Virtualization
  • Cybersecurity ▼
    • Application Security
    • Backup & Recovery
    • Data Security
    • Identity & Access Management (IAM)
    • Zero Trust
    • Compliance & GRC
    • Endpoint Security
  • Cloud ▼
    • Hybrid Cloud
    • Private Cloud
    • Public Cloud
  • Webinar Library
  • TiPs
  • DRAW

GitHub: Stacked PRs & Multi-Agent Workflows in GitHub Copilot

Github
10/07/2026
0 (0%)
Share
  • Comments
  • Download
  • Transcript
Report Like Favorite
  • Share/Embed
  • Email
Link
Embed

Transcript


1. Ydych chi'n gwneud gwreiddiadau ar gyfer y cyflogau yma? 2. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma? 3. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma? 4. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma? 5. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma? 6. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma? 7. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma? 8. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 9. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. 10. Ychwanegwch y gwreiddiadau ar gyfer y cyflogau yma. It's going to save it in my .co-pilot folder. 10. Yıkıntıya geçirmeyi unutmayın. That's where all the projects get cloned. Then it creates a new agent session. You can see at the bottom here, I have my server-rdt demo folder. That's where this went. Then next to it, you can decide where you want to run the session. We've just cloned the repo, so you can choose to walk off the main branch, and that is option number 2, local repository, or you can choose to create a new work tree, which is the default. The reasoning here is that the Co-Pilot app here is agent-first. It's a whole developer experience that has been reworked to allow agents to easily work together on the same project. You don't want to have four, five, six agents all writing on the same file. You'll be having so many conflicts to manage. The concept of Git work trees, each agent is assigned its own work tree, and it's just able to just focus on that particular part of the project. That's what we're going to do. We're just going to start a new session directly in a new work tree, so the app will take care of managing the separate work trees for my different agents. Then of course, I'm working from the main branch. Then we can either choose to run this in interactive mode, plan mode, or auto-pilot. You have your model selection right here, reasoning efforts. If you have any custom agents, then you can just switch between your different custom agents from this view. First thing, let's try and understand what is this project about. We can ask for a summary. Give me a summary of this project. Immediately, you'll see that a new work tree will be created in the folder that I told you about where the project got cloned. While this command executes at the very top right, I can toggle this on to view my panel. I can have a panel where I can easily just have a look at the different angles of my project so if my agents start working, I have one page to see all the changes that come in. I can, of course, run commands in the terminal from here. We have our files, so you can look at the different files from here, and a lot more options that you will see probably in the course of the stream. See a few more comments. Yes, the concept of Git work trees is interesting. Funny thing is that it's not a really new concept. It's been there. VS Code has had support for work trees for so many months. But right now, since we're having a lot of parallel executions with different coding agents, we are seeing a need for having these work trees. Yeah, I think you see, I hope that explanation makes it a bit clear on what work trees are. We see that the agent here is telling us that, hey, this is Java. Let's actually just run it. I feel like it would be easier to just explain this once you have it running. From the terminal, I know we have an SRC folder. I'm going to do a quick npm install. But basically, the idea here is that this is just a simple demo application. The scenario is that it's a Java site, just a home improvement company that allows you to come in. If you have your own DIY project, you just want to see some supplies, just do some consultation. You want to paint your living room, which paint should you use? That's basically the use case that we have. I'm going to start this application, just so we can have a better feel of what it is that is happening. We started our application. Then the next thing is, again, the beauty with the Copilot app. Instead of running these on a different browser instance, I can easily just open it in the built-in browser that we have in the app. This way, all your work is just consolidated in a single view, one experience across different platforms. Let me just move this a little bit. That's the site. As you can see, you can just come in here. You want to do a quick DIY project at home. You can explore the different products that they offer. Then what we'll focus more on is on this AI chat feature. For now, if I type hi, you will see that we are getting sort of a set response from the AI assistant. The reason is because right now, this code just has some simulation. It has a random response generator behind the scenes. This AI assistant feature is not really implemented. This is just like a mock-up running on the front end. That's what we want to do. We want to see if we can actually improve it. Not build a whole end-to-end agent system, but we want to improve this experience. Let's, at the very least, have the AI assistant grounded in the actual product catalog. That's the starting stage. This is what we want to build and see how our different agents can learn to use Stacked PRs. That's it for our scenario. The first thing, of course, is I'm just going to talk about what I have here. I'm going to step further to build custom agents because this application, again, as you can see from this summary, everything is fragmented. We don't have an actual product catalog. We don't have an API, so everything is fragmented. We have different angles and elements of the same project. I'm going to step further and build some additional custom agents. I have my custom agents defined in the .github folder and in the agents folder. We have three files here and the three files are responsible for the data modular agents, the backend agent, and the frontend agent. That's the first step. Then the next step is that I want to work with Stacked PRs. From the terminal, and I'm going to just stop our application. The first thing you do if you want to experiment with Stacked PRs is, of course, install the extension. I already have it installed, but that is the command that you would use. Let me zoom in a little bit to make it easier to read. Then that's the first setup. Of course, I'm working with coding agents. I'm assuming that you are also working with coding agents. You need to teach your coding agents how they can stack pull requests by default. Think of the idea that these coding agents have been trained on lots of repositories on how we traditionally write code. These agents don't decompose problems by default. You have to teach them, hey, here's a feature you want to build. I want you to think of it in logical steps. I want you to break down the different parts of the problem and then build that dependency chain because that is what you will use to stack your pull request. In order to teach your agents how they can work with GitHub Stacked PRs, you're going to install the GitHub Stack or the gh-stack-skill. This is the command to use for that. I'll hit Enter. Then I want to install the gh-stack-skill. This way, the coding agents that I'm using will be able to successfully work with Stacked PRs. I will install this for GitHub Copilot, and I want to install this globally. Just have it ready. I want to override the version that I currently have, and there we go. Now I have the skill installed, and if I'm working with my agents, they should be able to pull this and start working. That's it about the setup. Now we have a feature in mind. We want to improve this AI assistant experience, and you can already think of the different layers that we have. As I said, for now, this data, this is not very clear, but the data that you're seeing on this site right now is actually just hard-coded data. Nothing is actually stored, so we need to do some bit of cleaning up. That's the first layer, and then we need to build our API on top of that, and then we now need to do the wiring to this UI. We can think of those three or four logical layers that we want to implement. The first thing that I'm going to do is, I'm going to just clear this chat session. But before that, I will switch to the first agent that I will work with. That is the data modular agents. If you have any questions, kindly put them on the chat. Happy to go through them. We have just cleaned up everything we've done so far, so the context window is clean. We can get started. I have switched over to my data modular agents. I have a prompt that I had prepared here, so I'm going to just paste that in. I'm telling the data modular agents that our product data is hard-coded and scattered across the homepage components with inconsistent shapes. Initialize a stack and build the catalog data foundation that the API and the UI layers will later on depend on. Consolidate into one validated product catalog with a clean data access module. This is the prompt that I'm going to submit to my data modular agents. Then we'll see that it immediately loads up the GitHub stack skill. Right now, the agent is learning how to work with GitHub stacked pull requests. It just loaded the skill and it now understands the whole concept of decomposing problems. For the sake of this illustration, we're doing this one step at a time. We are issuing the instructions per agent, per session, but ideally, we'll see that most organizations now run such workflows in a loop. You're not there to look at every single stage. For the sake of illustration, we're going to do this step-by-step, looking at each agent, how it's working. But ideally, if you were to implement this, you will most likely be running it in a loop where you have different agents, just handing off different features and different steps to each other. You can see that the agent here, before it started working, it initialized the stack, called it Feature Catalog Data. At the top here, where we have the name of the session, if I click on that, you will see that indeed, the agent just created a new branch. That is where it's currently working from. Everything that the data modeler agent is now creating is going into this bottom of our stack. Now, if I switch back to my terminal, if I switch back to my terminal and then I can use the commands GitHub stack view. If I use the command GitHub stack view, then this will load that stack that the agent has just created. We can just have a single view of understanding what is the stack that you're working with, how many layers do we have. As the agent is running, we'll see all the files, all the commits being updated on this single view. Let me see. Welcome. We have Andrea Griffiths from India. Interesting. I have a colleague with the exact same name. There's a question at the bottom, at the top here. We'll just give our agent just a few minutes to work on the first layer. You have a good question here from Saga. How would you integrate Copilot into CICD without compromising on security? Right. That's a great question. The first thing that comes to mind here is the concept of tool scoping. In a CICD environment, the idea is that you're not there to supervise every single step, every single tool call, every single page that your agent visits. You want to ensure that you're setting up a pipeline that is already limiting for your agent. The first layer is, of course, the instructions being very clear in terms of what this agent needs to do and also having the instructions on what it should not do. That's the first base layer, prompt engineering. Then the next bit is on tool scoping. You ensure that in as much as you've given your agent instructions on what to do, you've taken away its ability to do something that it should not. What I mean by that is, if the agent decides to ignore your instructions completely, let's say it's been prompt injected, and the bad attacker here just instructed the agent and the bad attacker here, to ignore all your instructions. So if that succeeds, if the agent tries to, let's say, run a command, it shouldn't access a platform or a tool that it should not be able to do that, then it doesn't have the tool in the first place. So I think that should ideally form that initial security layer of, number one, your agents have very clear instructions, and number two, you have carefully thought about the tools that you want to just make available and accessible to the different agents, including GitHub Copilot, in that it's not able to complete an action that it should not do. So I think that would be the first step to think about it. Then, Sagar, I would probably suggest that you look at the concept of GitHub workflows. Let me see if I can just pull that up for you. Sorry, I digress, but let me just respond to this question. We have GitHub agentic workflows. I believe this is something that will have some additional insights on how you can work with Copilot and other agents in that automated pipeline or that automated workflow. And the reason why I point to this resource is that one of the built-in features is, and actually how GitHub agentic workflows work here, is that you would just define a single, like a YAML file, but you're describing instructions in natural language. And then there's this provision for you to specify the safe outputs. I don't know if we'll be able, I feel like we'll digress so much, but it's a good question. And I want us to just address it briefly. But we have this concept of safe outputs. So what this means is that, yes, this Copilot here will be invoked as part of a pipeline. So you're not sitting at your desk monitoring what it's doing, but then you've just applied safe outputs. So the agent knows that after I go and finish the work that I'm doing, I can only come back and let's say open up here or just make a comment. I cannot write on the main branch. So this is how you sort of think about the guardrails that you set for your different workflows that have agentic features. But Sagar, I hope you get a chance to just read about GitHub agentic workflows, because this is like just a feature that is built on the whole concept of coding agents and automation. So I hope that answers your question. Let's quickly look back at our example. So we see that the stack has been initialized. And if we view our stack again, we should now see that our data modeler agent has worked from the catalog data stack. I can use the letter F to open the files. So you can quickly just see the different files that have been touched by this agent. It has made three commits, which I can open by typing the letter C, right? So we have three different commits. And of course, if you now want to have a closer look at exactly the changes that have been added by the agents, you have the ability to do that right there from the application. So for now, we'll assume everything looks good. This is all fine. So the next part would be to build the next layer on top. So we've cleaned up our data and we have a data access module. So the next step would be to now switch to the next agent, which is the backend agent. And again, best practice is to clear the context window. This way, everything that has been done so far won't pollute the context window of the next piece of work to be completed. So we're just going to clear the session. So we're still in our work tree. I'm going to paste in the next prompt, which goes to the backend agent. And my prompt is to ask the agent here to expose the data catalog through a product search API. Have this in its own layer on top of catalog that the chat UI can call. Build on the data access module from the layer below in the stack. Keep this layer API only. Do not touch any other files. I always like to be very specific with my instructions because just assuming that coding agents will do exactly what you think will do, in some cases can be very frustrating. So yeah, just having very clear instructions on what the agent should and shouldn't do. Just reading through the comments. All right, no new question. So we're seeing here that this next agent, again, just loaded the GitHub stacks skill. So it's learning how to work with stack PRs and it has created its own branch based on top of the branch before, right? So if we open our session metadata at the top here, we should see that the current agent is working on a different branch. This is not the branch that agent number one was working on. So you're having this isolated, independent and scoped work streams that are all running in parallel. Now, the beauty of this is, now assume that in your organization, I have a colleague who, in my organization I have a colleague who works with data only, I have one who works with backend only, I have one who works with databases only and I need everyone to just review the same pull request. So the goal here is to not give all of these independent reviewers one large PR, but as my agent is working on layer number two, layer number one can already be reviewed by the data owner. So the data owner can come in, look at the first PR, just go through each review, but at the same time, I'm having my agent build the next part of the project or of the feature based on top of these changes that are being reviewed. So that's the win, that's the whole idea that you can have smaller scoped pull requests and this just makes the reviewing process to not be painful, right? I see a comment here from Anning Oduro, I hope I'm pronouncing your name correctly, great insights on managing stuck PRs, this is super helpful breakdown, right? And I'm glad that we were able to finally get this shipped. So when you get a chance, please do try stuck PRs and of course, let us know if you have any comments and any feature suggestions also. So now if I go back to my terminal and run our stack view command again, I should see the two stacks, the two layers that have been created, sorry, the two layers that have been created and you can see the current one. So we are now working on the search API layer, of course, I can click to see the different files that have been changed, the comments that have been made and again, here the assumption is that everything works well, so we're just going to go to the next part of the project, which is to wire this API into our chat interface, right? So that's what we are hoping to achieve. So again, in the interest of time, I'm just going to copy and paste a prompt here, okay, sorry, before we do that, as usual, we'll switch to the front-end agent. Now I'll just assume that everything works, but ideally, if you are collaborating with agents, you want to take that additional verification step and validate that the work has been done and just not rely on the claims from the agents. So let's assume everything here works well, we're going to clear the session and we'll just switch to our front-end agents. All right, so context window has been reset, we are good to start a different part of our job. So you can see that we are just decomposing the problem and we are also training the coding agents to do that at the same time. So back to the question that was asked earlier, if I have these agents running autonomously, then they already know how to work with decomposition as their default. So this third layer, we're going to ask the front-end agent to replace the chat assistance mock responder with real calls to this API that has been created, so that the replies are grounded in actual projects from the catalog. Actually, this should be products, products from the catalog. Handle the no results and the failure cases, keep this stack layer to the data flow only, do not touch the UI representation work. So we're going to send that in, that goes to our front-end agent and in case you're curious, probably you want to know so far, how much am I spending in terms of AI credits? How is my context window filling up? So again, we have this chat metadata view. If I click on that, first thing is that I will see the branches. So hopefully this agent, let me see. Okay, I didn't see the agent load the stacks skill. Skill. Yeah, so it appears to be working on the previous branch. So now what? Let me not risk it. I will send that again. And this time round, I will ensure that I at least have the name stack just to see if it's going to trigger the agent to load up the skill. And that's the thing to note about using skills is that if the agent chooses to not use your skills, then your attempts to customize your coding agent experience is probably futile. So you need to ensure that you are crafting prompts and you're designing skills and the whole harness is basically designed in a way that should ensure your agents decide, in quotes, decide to use the right skills at the right time. So let's see if we can just tweak our prompt here to ensure that it loads up the skill. Okay, let me just say, create a new layer. So stack layer on top of that search. I think that was the name of the, oh, search API, search API. Okay, let's try that again. Yeah, so now it actually picked up the skills. And yeah, so that's, I'm glad that happened. It will allow me to address that whole concept of probably you're working with agents and then you discover that, hey, my agents are not executing, are not hitting the quality, but that you've set, that you expect. And it could be such a simple step where the agent failed to load up your skill. And since you don't like, you have little control about what the agent decides to do. You just have to ensure that you are presenting everything in a way that the agents will know exactly what they need to work with. So as the front-end agent works here on that third layer, what I was trying to explain earlier is if you click on the session metadata, a view at the very top, one, you will see the branch that is currently being worked on. That's the active branch. The agent has correctly created a different branch. Then you can see additional metadata here, including the tokens, how your tokens are being consumed. So the tokens that have been cached as well. So you can also have that insight here. You can see your context window and you will click on that. You of course now see the distribution across what percentage of your context window is going to the system prompt, which one is going to the system tools, to your MCP tools, what free space do you have? And then there's this additional view that I like to use. So if I open the panel, there's the insights tab. If you've not seen this before, you can use it to just have, again, just a visual representation of what's happening in the chat window, right? So this can give me a breakdown in terms of how my context window is filling up. If I want to have some manual compaction, I want to do that manually, I can easily just monitor how my context window is filling up, what tools are being used, which agent is running, if I'm having any background agents executing, you can do all that from this single view. So agent is done. So hopefully it has added something. So this one you can actually test. So I'm going to start the application again. It should have wired the chat UI here to talk to our API. I'm going to open it in the browser. I'm going to open it in the browser. I'll do a quick refresh. Let me make this full screen. So open the chat assistant. Yeah, assistant. Let me try Hi. All right, I found one product matching Hi, electric paint sprayer. Yes, I'm not sure where the Hi is. So that's interesting. Let me ask for paints. I couldn't find any catalog products matching paints. Okay, paint. Three products matching paint. Do you have tip? So you can see that we've moved from, it's not yet there, but we've moved from having an AI assistant that's just working from a mock-up, right? So just randomly generating responses, but it appears to be looking through the actual catalog and responding. So that's the part that we've just implemented. And as far as our stack goes, I'm going to open a new terminal instance, and we can just view our stack, what we have right now. And we said we have the three different layers, all stacked on top of each other. So the last step would be to finish up on the UI presentation bit. And so in as much as this is still a work for the front-end agent, let me start a new session. And then I'm going to explain why, instead of having the chat grounding and the UI work all happen in the same branch or in the same layer, I'm just going to shortly explain why I'm choosing to not do that. So we'll stick with the front-end agent. I will clear the session. So let's assume I've tested the feature. It works well. If it doesn't, you can iterate and have the agent improve on the experience. So I'm going to clear our session here. I'm going to go in with the final prompt. So add a final layer to the stack, present the grounded results, which I want you to show the matched products and cite them in cards. So I'm going to do that. We'll send that in. Hopefully it's going to load in the right skill. Perfect. It also chose to use a different skill that I have, impeccable, because it's working on UI work. So I have a specific skill that my agents can look at just to polish up on the UI that these agents create. Traditionally, open-end models have not been the best when it comes to UI work, but hopefully with such skills like the impeccable skill, it's going to be able to just do a better job. So we're going to see how that turns out. Okay. Now, the reason why I chose to break this down into two distinct layers. So I have layer number three, which the front-end agent worked on, and the whole task was to just wire our chat UI to the API. And then this last one, the exact task is for it to just make everything pretty on the website. And the reason for that is probably you don't want to subject just a UI UX person to how to review lines of code that involve your API. So it's that whole idea of having tasks that are related, a task that you can easily just give a single, give someone who's just in charge of PR this one very small part of your pull request to have a look at the UI, give you feedback that is related to you, to the user experience only, without having to go through additional lines of code. So that's the whole idea. I see a few questions. So does CoPilot have support for the upcoming agentic workflows like agentic loops and agent graphs? That's a good question. Gentic loops and agent graphs. I am not a hundred percent sure about that question. Yeah, yeah. I'm not a hundred percent sure in terms of how that support would look like from a CoPilot standpoint, but it's a good question. And what I can do though, what I can do is on this live streams chat area or the comment section, I'm going to ask this question and come back with a response. I'm just going to quote the question that was asked and then just put in the response that I get. But for now I have no specific answer or direct answer that I feel like would be enough for that question. Okay. So our agent is working and I'm just going to pull this screen because it has loaded the Playwright MCP server. It has opened its own instance of a browser and it's now navigating the page. You can see the agent there trying the different edge cases. And it's basically now just doing the whole UI work on its own. I have given it access to just the tools that it needed. In this case, it needed access to the Playwright tools. We didn't see this from the data model and the backend agents because I haven't given them access to this tool. So again, to our earlier question around how can you just improve the security when it comes to your agents is simply just giving them the tools that they need to do what they need to do. So yeah, I believe this session should be done. I'm just going to move this browser out of the way. The agent is still working. So let me just bring it back in case it decides to test something else. All right. Any other questions? So I guess we can talk more since the agents are writing the code, we can have enough time to talk. But any other questions, comments? If you've tried Stack PRs, let me know how your experience has been. Is this making sense? Hi, we're seeing some more people joining. So for those who are just joining, we are taking a deeper look at Stack PRs. GitHub Stack PRs launched last week. So we're just having a deeper look at how that looks like. Okay. So the agent is done. Again, let's just look at our stack. And there, so instead of having one large PR, you can see that we have it divided into four different layers, all achieving the same goal, but it's structured in a way that review now can be possible. So the next step would be, I'm happy with everything this stack sits locally, right? So I want you to submit this. And that is as easy as using the command GitHub stack. Submit, I believe. Let's see. Yes. So with GitHub stack commits, this should confirm the state of our stack and it should ideally create the different, the different pull requests. So we have this page that opens up and I can now see the different, you can see the different layers in the stack. If you want to modify the title, if you want to add in a description for the pull request, what does this pull request do? What does this other one do? So you can do all that from here. The only thing I'm going to change is I'm going to mark the PR as draft, then go to the next branch catalogs. So the search API sits on top of catalog data. I'll mark that as draft. Copilot added some description in the title. I'm happy with that. Next, for my chat grounding, just mark it as draft. Next, everything is looking okay. And then I can submit the four PRs and we should see the tool here, the CLI here taking care of that shortly, hopefully. Yeah, so it goes off to create our pull requests and they are all now being created as part of one single stack. All right, perfect. So all four PRs were created. And now if I move over to GitHub, except I will not go back on GitHub. As I said at the beginning of the live stream, we are trying to do everything from the Copilot app, see what's supported. So if I go over to, we have this tab, the My Work view, right? So if I click on that, I can filter. So you can see the different PRs that have actually just been created, right? From the very top here, I can just filter these to our repository. So again, this is such a nice view that allows me to just focus on everything. So all the work that has been assigned to me, either issues that have been tagged in, pull requests that I need to review, everything just shows up in this My Work page and you're able to just get started, have agent sessions addressing the different assignments that you have. So you can see that our PRs are in progress. We have some CI checks that are executing. So the last two, I believe, and the last two still have the CI checks ongoing. The first two have passed, so that is good. Now, if I click on this, and I won't do that at this point, but the idea here is that this is the view that the reviewer will also see. So if I have been tagged as a reviewer on this repository, I can come in and see the different pull requests that are there. So if I click on one of this, it's going to open up a new agent session that is checked out to that pull request, right? And I think that's really, really cool in that it's the same applications, the same experience, but now if I switch my heart and just talk about how the reviewer would be looking at this, they will come in, see your stack, look at the area they want to review. And then as soon as I click on this, I won't do that again because it's just going to create an additional session and I don't want you to do it. But from the reviewer's point of view, they should be able to come in and then just start reviewing, start looking at the code and do everything from the app. So that's okay. Let me see if we have time for one more thing. But again, if you want to just see how does this look like on GitHub, we can switch over to, we can switch over to github.com. This is my repo. If I go back to the pull requests, we should see that all the pull requests were created. And then we have this icon that shows that all these pull requests are part of a stack. I can open the one at the bottom here. And you can see in terms of reviewing, the experience is the same. Only difference is at the top here, we have this icon and I can see the different branches that have been built on top of this initial layer. And I can easily just switch from one to the other. So from a reviewer's perspective, this is also such an improved experience. You can see our CI checks all execute and we have our stack at the bottom here. So for now, all the PRs are in draft mode. So what I can do is, again, I want us to simulate, because the question that you're probably asking yourself is what happens if a change is introduced at the bottom of the stack? And everything on top of it is built on a single commit. And then we have some changes that get introduced on the bottom layer. How does that rebasing actually work? So I want us to think about how we can simulate that. In the meantime, I'm going to assign, or I'm going to ask Copilot here to just do a quick review. And then hopefully suggest some changes that we can do at the very bottom of the stack and then see how Stack PRs actually handles that rebasing across the entire stack. Okay, let me switch back to the app because the promise was that we'll try and do everything from this single application. So this is pull request number one. Again, the beauty is that I can open this PR from here just by typing hash one. I should be able to open this pull request from here. So without having to go back on github.com, I can easily just see and monitor my pull request from here. The other thing that I'm going to try, and hopefully it's going to work, is, okay, my PR is not marked as ready for review. So let me do that. I'll mark it as ready for review. And then I'm going to enable agent match. I'm going to enable agent merge. Now, just to quickly summarize what agent merge is. Now, at this point, yes, I've worked with my coding agents. I have code that has already been pushed. If I walk away, I will have to come back and just continuously BBC this pull request. Now, if someone comes in, they drop a comment, hey, can you change this, or after copilot reviews, it drops some comment on something that needs to be done. Right now, that's manual. I need to come in, see what has been dropped on the pull request, and then act accordingly. But if I enable agent merge, then this is actually like a built-in feature, right here on the copilot app. What happens is that an agent will be continuously monitoring that pull request. If any comments, if let's say the CI workflow fails, the agent is going to pick that up, see what needs to be addressed, implement that right here in the local session, update the pull request so it can autonomously just walk through the comments, suggestions, any failing CIs up until everything is green for me to come in and merge. That's the beauty of agent merge. Let's see if it's going to kick in. You can see agent merge just checked right now. It's looking at the PR, seeing if we have any new comments, if anything is failing. The checks so far are green, so that is good. But you have an ongoing review from copilot. Hopefully, copilot is going to drop some suggestions, and then we can implement that and simulate how Stack PRs handles the rebasing. Sia here is asking a question. Is the GitHub Stack skill responsible for deciding how many branches should be on a stack depending on project structure? That's such a good question. Out of the box, no. The skill is not responsible for that. Ideally, the skill purely is to teach the agents. One, what Stack PRs are and how they work. And I can actually just show you that. Let me just show you that. I will open a new terminal, and we could probably do something like GitHub stack. What's the command? No, the skill. We want to view the skill. So skill preview. So let's just preview this skill, just so that I can answer your question. Now, if you read through this skill, you'll see that at no point is it telling the agent explicitly that, hey, I want you to break this down into this number of branches. No, that is not what the skill is for. The skill is to, number one, just introduce what the GitHub CLI is, because that's what we're using. Introduce what Stack PRs are. Tell the agent when to use the skill. Any prerequisites, so this way the agent should be able to know what I need in order to run Stack PRs. These are the agent rules. So just take some time, preview through. But to your question, Sia, if you want the agents to decide how many branches you should have, then I can easily see that being like a planned session. So if you choose to have a brainstorming planning session with your coding agents, as long as they have access to the skill, you can just very clearly tell the agents, hey, here's my project. I want us to submit this as a stacked pull request. How can we decompose this work? Because the whole idea here is that you have a sense of how you can decompose your work into logical layers. You need to have a dependency chain where the bottom of your layer, like whatever comes on top of it, depends on something that has been implemented in the bottom layer. So ideally that's something you come up with, but again, you can have your agents, since they now know about Stack PRs from the skill, you can just ask them, hey, this is what I have. This is the feature I want to build. Let's decompose it together. Once you're all set with the different branches and the different layers you want to have, you can send them off to now implement. So Sia, let me know if that answers your question, but that's such a great question. Okay, so I'm trying to see where we are right now. And I know we're out of time, but let's see just one last thing. We have our PR here. All right, so Copilot has reviewed this and we have a few suggestions. Yeah, so this is fine. So let me just manually ask the agent here to implement the projections from Copilot. Ground agents. And this happened on the... Yeah, so this is on layer one. So it's a change related to other data. So I'm going to switch back to our data modular agents. And then just ask it to implement the suggestions from Copilot. So let's see if it's able to read through. I forgot to attach the pull request, but hopefully it's going to be smart enough to figure that part out. All right, so Sia, I'm glad that I've answered your question. Any more questions? Before we... We're almost at the end of the demo. Just to recap, we started with our use case. We agreed on a feature that we wanted to build, and then we sort of had the layers already decomposed. So to add an AI assistant to our Zavva website, we are breaking it down into the data layer, API layer, and some front-end work. And then we teach our coding agents to use GitHub Stack PRs and help them initialize the stack, each custom agent working on its own, working on its own branch, and then just stacking one on top of the other. So now we are trying to simulate... Okay, hold on. It's looking at the wrong pull request. No review comments. I'll just look at, I think it's PR number one. And let's try and mark this as... Ready to review. We can do that from the app. Switch over. Okay. Ready to review. And then from the copilot app, I'm going to... Agent match is enabled. Interesting. So, yeah, let's give it one attempt, one last attempt, see if it's going to pull in the comments. Enhancement for pilot suggestions. Okay. Let's see. Let's give it one more attempt. All right. So it's now reading the review comments. Yeah, so it has found the different, there are four of them. So it has found them. I will just follow with reply to the comments. When you've finished working. Okay. So now we're trying to simulate if a change is introduced at the bottom of the stack, how does that ripple up and just apply to the rest of your peers that are all branched of that current layer. So that's what we're trying to simulate here. And then see how the stack peers CLI is going to handle it. Now, something I'll also comment on is the fact that we can actually do this entire end to end workflow without leaving the co-pilot app. To me, it's impressive actually, because now I'm able to just focus on my interaction with the agents. I'm able to notice if there are any mistakes that the agents do, whether it's a local agent or an agent running on GitHub. I'm able to just see everything. And this single application gives me that consolidated view that simply just allows me to not worry so much about what's happening on GitHub, what's happening on VS code, what's happening on a different surface. Everything can basically be managed from this one single view. So yes, today it's about stack peers, but if you haven't tried the co-pilot app, which is what we've been using throughout this session, give it a try and let us know what you think. Okay, so the agent here has implemented the four suggestions from the co-pilot review. We should see the replies go in. I asked you to also just post like a quick reply on the peer itself. So hopefully those will come in. There is some bit of delay. So I'm sure that we have some activity happening on GitHub, but what you'll actually notice is that the agent here on its own actually run the rebase command. So we have like a GitHub stack rebase, where the agent was actually able to figure out that, hey, I have made some changes on the stack that is at the bottom of the, on the layer that is at the bottom of the stack. So it was able to actually on its own do the rebase and stack peers actually now takes care of ensuring that those changes are actually applied across the entire stack. So there's no manual step where you have to come in and just do a manual rebase on every single branch and then handle any conflicts that come up. Since all this is happening and our agents are taking care of that, if there is any conflict, it's able to resolve that without you having to go through that pain, right? So that's, again, another very, very useful feature. So we can see that the agent here responded to the four comments that were sent, linked to the comment that fixes the issues that were raised and resolved the chat. So all this happens, again, using the agent match feature on the Copilot app. I highly recommend that you try that out. So for now we have two of our peers that are still in the draft. Okay, let me just mark them as ready for review. And you can see as we're working on every single PR, we kind of have the updates that show up on the entire stack. So from a stack perspective, our bottom PR is ready. We have the second one here that is still in draft. And because layer number two is in draft mode, then we can see that the other two layers here are blocked. So let's just mark this as ready for review. So let's say it's ready for review. Have the CI checks run. Okay. So let's just work from github.com now moving forward. But yes, so from this single view, I can look at my most recent pull request. So from here, I should be able to see the entire stack, And every single layer in the stack is ready for review. It's ready to be matched actually. So I can easily click on this button and we can now match the entire stack. So what I expect to happen is that the matching will happen from the bottom layer all the way to the top layer. And there, if now assume you had different reviewers, every reviewer just focusing on a single part of the feature. So everyone comes in, everyone is good. You've gotten a green light. You can now match the entire stack all at once. So I think that's pretty, pretty insane. That is stack PRs. Again, I'm going to drop the link. On the chat, if you haven't tried it, please try it. Don't ship very large problematic pull requests that will sit for such a long time without being looked at or without being reviewed. Yeah, so take some time, go through stack PRs. Let us know if you have any feedback. We're very active on X. So if you just post your feedback, your questions on X, we're very, very responsive. we're very, very happy. The team is really, really open to your feedback. Then one last thing is this whole demo that we've done throughout this session. I actually blogged about the entire thing. We have this blog on the GitHub blog. Again, I'm just going to pop this link for you on the chat. This is the entire workflow that we have just done on this live stream. If you want to read about the scenario, if you want to share this with someone who could actually just look at how SACPRs work, I have shared the exact same scenario on this blog. If you want to just revisit the steps that we've covered, just read through what's happening in each step, that's a blog that I can actually recommend. You just go through and then eventually we'll see how we arrived at what we've just done on this live stream. Okay. We have 14 minutes over time, but I think this was helpful. I hope this was helpful. Let me just look for one last question that we can talk about before we wrap up. Faith has a question here. I see the match button also listed with the default match options like squash and match. What happens if we select one of those instead of match stack? I think I know what you're asking. Hold on. I'm just trying to get the screenshots. Just give me a second. Hold on. I believe this is it. This should be what you're referring to, Faith, just confirm for me. Basically, it's you defining how you want the commits from the different pull requests here to be handled. This is the traditional options that you have in terms of how to manage your commits for the match action. This is not new actually. This has always been there. It's you deciding, do you want all these commits to just be matched, or do you want to squash them, do you want to rebase? It's just the different options you have here in terms of managing your commits. I think this is what you're asking for there, Faith. Kasten, which link are you talking about? I'll just reshare one more time the link to the blog that has the entire workflow that we have just done. I've posted that right here. Kasten, I see that you're on LinkedIn. I suspect that my comments might not be going through successfully on LinkedIn. Let me just put the same link on the comments of this video. Just the video, not the live chat, but I'll just put it as a comment. You can check it there. All right. Well, I think that's it. We can stop there. We do have two more instances of RoboDuck Thursday. We have one in Spanish and then one later on in around a few hours. It's a Pacific friendly session. In case you want to just join one of these live streams, talk about different topics, you're more than welcome to do so. Otherwise, I hope to see you all next Thursday. Thank you so much for joining and have a lovely rest of your day. Okay. Bye everyone.

TL;DR

  • Stacked PRs let developers break large features into ordered, reviewable layers — each owned by a dedicated Copilot agent scoped to a specific concern such as data modeling, backend, or frontend.
  • The GitHub Copilot app assigns each agent its own Git work tree, preventing file conflicts during parallel execution and consolidating terminal, browser, and agent management into one interface.
  • Agents can autonomously run stack rebase commands when lower-layer changes occur, with the Stacked PRs extension propagating updates across all dependent branches without manual intervention.
  • Layered PRs enable targeted code review: a UI reviewer sees only the presentation layer, while a backend reviewer focuses solely on API integration — reducing cognitive load and accelerating approval cycles.
  • Once all layers are approved and CI checks pass, the entire stack can be merged in sequence with a single action, eliminating the coordination overhead of merging dependent branches one by one.
  • A companion GitHub Blog post documents the full scenario demonstrated in the live stream, providing a shareable reference for teams evaluating Stacked PRs and multi-agent development workflows.

Stacked PRs and the Multi-Agent Development Model

This live stream session from GitHub's Rubber Duck Thursday series provides an in-depth walkthrough of Stacked PRs — a workflow that allows developers to decompose large, monolithic pull requests into a series of smaller, logically ordered layers that can be reviewed and merged independently or as a complete stack. The host demonstrates how this approach maps naturally onto multi-agent development, where separate GitHub Copilot agents — a data modeling agent, a backend agent, and a frontend agent — each own a distinct layer of the stack. The demo application is a home improvement company website with an AI chat assistant that initially returns mock responses; the goal throughout the session is to ground that assistant in a real product catalog using coordinated agent work across stacked branches.

Git Work Trees and the GitHub Copilot App

A significant portion of the session focuses on the GitHub Copilot app as the central control surface for agentic development. The host explains how the app is designed agent-first: rather than having multiple agents write to the same working directory and create conflicts, each agent is assigned its own Git work tree. This is not a new Git concept, but its relevance has grown sharply with the rise of parallel agent execution. The Copilot app consolidates the browser, terminal, file explorer, and agent session management into a single interface, with an insights panel that surfaces context window utilization, token consumption, active tools, and MCP tool usage — giving developers real-time visibility into what each agent is doing without switching between surfaces.

Layered Review and Automated Rebase

The session demonstrates how Stacked PRs enable targeted code review: a UI/UX reviewer, for example, can be assigned only the presentation layer PR without needing to wade through API integration code in adjacent layers. The host shows how the Copilot agent autonomously ran a stack rebase after making changes to a lower layer, and how the Stacked PRs extension propagated those changes up through the entire stack — eliminating the manual rebase-and-conflict-resolution cycle that typically accompanies dependent branch workflows. Once all layers pass CI checks and receive reviewer approval, the entire stack can be merged in sequence with a single action from the GitHub.com interface. The session closes with a pointer to a companion blog post on the GitHub Blog that documents the full workflow demonstrated live.

Custom Agents, Skills, and Practical Takeaways

The host walks through the configuration of three custom agents defined in the repository's `.github/agents` folder, each scoped to a specific concern: data modeling, backend API, and frontend presentation. A custom skill called 'impeccable' is highlighted as a way to improve UI output quality from models that historically underperform on front-end work. The session also covers session metadata inspection — including how to monitor context window fill rate and trigger manual compaction — and addresses audience questions about merge commit options (squash, merge, rebase) within the stack merge flow. The overall message is that Stacked PRs, combined with the Copilot app's multi-agent orchestration, represent a meaningful shift in how teams can structure both development and review workflows for complex features.

Chapters

0:00 - Introduction and Setup
14:57 - Copilot App and Work Trees
16:42 - Demo Project Overview
20:43 - Custom Agents and Stacked PRs Setup
41:25 - Agent Execution and Session Metadata
44:01 - Testing the Grounded AI Assistant
46:08 - Final UI Layer and Review Strategy
68:04 - Copilot App Consolidated View
69:01 - Automated Rebase and Stack Merge
71:33 - Merging the Full Stack
73:56 - Q&A and Wrap-Up

Key Quotes

15:34 "The reasoning here is that the Co-Pilot app here is agent-first. It's a whole developer experience that has been reworked to allow agents to easily work together on the same project."
15:49 "You don't want to have four, five, six agents all writing on the same file. You'll be having so many conflicts to manage."
47:28 "The reason for that is probably you don't want to subject just a UI UX person to how to review lines of code that involve your API."
69:27 "The agent here on its own actually run the rebase command. So we have like a GitHub stack rebase, where the agent was actually able to figure out that, hey, I have made some changes on the stack that is at the bottom of the stack."
69:49 "Stack peers actually now takes care of ensuring that those changes are actually applied across the entire stack. So there's no manual step where you have to come in and just do a manual rebase on every single branch and then handle any conflicts that come up."
72:02 "The matching will happen from the bottom layer all the way to the top layer. And there, if now assume you had different reviewers, every reviewer just focusing on a single part of the feature. So everyone comes in, everyone is good. You've gotten a green light. You can now match the entire stack all at once."
68:25 "This single application gives me that consolidated view that simply just allows me to not worry so much about what's happening on GitHub, what's happening on VS code, what's happening on a different surface. Everything can basically be managed from this one single view."
71:41 "Don't ship very large problematic pull requests that will sit for such a long time without being looked at or without being reviewed."

FAQ

What are Stacked PRs and how do they differ from a standard pull request workflow?

Stacked PRs allow a large feature to be split into a sequence of smaller, dependent pull requests — each representing a distinct layer of work (e.g., data model, backend API, frontend UI). Unlike a single large PR, each layer can be reviewed independently by the appropriate reviewer, and the entire stack can be merged in order once all layers are approved. The Stacked PRs extension also handles rebase propagation automatically when lower layers change.

Why does the GitHub Copilot app use Git work trees for agents?

When multiple agents work on the same project simultaneously, having them all write to the same working directory creates merge conflicts. Git work trees give each agent an isolated checkout of the repository, so agents can work in parallel without interfering with each other. The Copilot app manages work tree creation and assignment automatically as new agent sessions are started.

What happens when changes are made to a lower layer in the stack after upper layers have already been created?

The Stacked PRs extension handles this through automated rebase. In the demo, the Copilot agent autonomously ran a stack rebase command after modifying a lower-layer branch, and the extension propagated those changes up through all dependent layers — resolving conflicts without requiring manual intervention at each branch.


Categories:
  • » Cybersecurity » Application Security
  • » Data Protection
Channels:
News:
Events:
Tags:
  • AI & Machine Learning
  • DevSecOps
  • Demo
  • Best Practices
  • Technical Deep Dive
  • Stacked Pull Requests
  • GitHub Copilot
  • Multi-Agent Development
  • Git Work Trees
  • Agentic Coding Workflows
  • Code Review Best Practices
  • AI-Assisted Development
  • Branch Management
Show more Show less

Browse videos

  • Related
  • Featured
  • By date
  • Most viewed
  • Top rated
  •  

              Video's comments: GitHub: Stacked PRs & Multi-Agent Workflows in GitHub Copilot

              Industry Events (Sponsor Hosted)

              • Oct
                13

                Transitioning from CJIS to FERPA: Essential Audit Evidence for Compliance

                10/13/202601:00 PM ET
                • Oct
                  15

                  Risk in Real Time Demo Series: Virtual Patching: Protection at the Speed of Exploitation

                  10/15/202611:00 AM ET
                  • Oct
                    20

                    Harnessing Data Governance for AI with Cyera and Snowflake

                    10/20/202611:00 AM ET
                    More events

                    Upcoming Webinar Calendar

                    • 10/13/2026
                      01:00 PM
                      10/13/2026
                      Transitioning from CJIS to FERPA: Essential Audit Evidence for Compliance
                      https://www.truthinit.com/index.php/channel/2159/transitioning-from-cjis-to-ferpa-essential-audit-evidence-for-compliance/
                    • 10/15/2026
                      11:00 AM
                      10/15/2026
                      Risk in Real Time Demo Series: Virtual Patching: Protection at the Speed of Exploitation
                      https://www.truthinit.com/index.php/channel/1372/risk-in-real-time-demo-series-the-autonomous-era-orchestrating-a-resilient-enterprise/
                    • 10/20/2026
                      11:00 AM
                      10/20/2026
                      Harnessing Data Governance for AI with Cyera and Snowflake
                      https://www.truthinit.com/index.php/channel/2137/harnessing-data-governance-for-ai-with-cyera-and-snowflake/
                    • 10/27/2026
                      11:00 AM
                      10/27/2026
                      Maximize Security, Value, and Returns on Your Microsoft Investment
                      https://www.truthinit.com/index.php/channel/2178/maximize-security-value-and-returns-on-your-microsoft-investment/
                    • 10/27/2026
                      01:00 PM
                      10/27/2026
                      The HUMAN Experience: Real-Time Insights into Page Intelligence
                      https://www.truthinit.com/index.php/channel/2139/the-human-experience-real-time-insights-into-page-intelligence/
                    • 11/04/2026
                      11:00 AM
                      11/04/2026
                      Leveraging CISA’s Zero Trust Maturity Model in an AI-Driven Landscape
                      https://www.truthinit.com/index.php/channel/2149/leveraging-cisas-zero-trust-maturity-model-in-an-ai-driven-landscape/
                    • 11/04/2026
                      11:00 AM
                      11/04/2026
                      Aligning Agentic Intent: Understanding Your Agents' Purpose vs. Their Actions
                      https://www.truthinit.com/index.php/channel/2158/aligning-agentic-intent-understanding-your-agents-purpose-vs-their-actions/
                    • 11/05/2026
                      02:00 PM
                      11/05/2026
                      HUMAN Dialogue: Embracing the Rise of the Agentic Consumer in AI
                      https://www.truthinit.com/index.php/channel/2160/human-dialogue-embracing-the-rise-of-the-agentic-consumer-in-ai/
                    • 11/05/2026
                      02:00 PM
                      11/05/2026
                      Reclaim Your Evenings: Leverage Data Intelligence to Minimize Risk and Boost AI Adoption
                      https://www.truthinit.com/index.php/channel/2172/reclaim-your-evenings-leverage-data-intelligence-to-minimize-risk-and-boost-ai-adoption/
                    • 11/19/2026
                      01:00 PM
                      11/19/2026
                      360View: Govern, Secure & Recover Your Microsoft 365 Environment
                      https://www.truthinit.com/index.php/channel/2076/360view-govern-secure-recover-your-microsoft-365-environment/
                    Truth in IT
                    • Sponsor
                    • About Us
                    • Terms of Service
                    • Privacy Policy
                    • Contact Us
                    • Preference Management
                    Desktop version
                    Standard version