📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Run code generation in the background with GitHub Copilot coding agents | GitHub Checkout

GitHub12:59

Transcription

GitHub Advanced Security has been around for quite a few years now. We're kind of trying to bring all that back and all that expertise to AI as well. So you get the most trusted developed AI around. We're going to continue to to work on that and to continue to iterate and and drive forward here.

Well, hello Tim. Welcome back to GitHub checkout.

Hey, it's great to be here. It's been it's been too long.

It has been and a lot has changed. Please tell us what is new with the GitHub Copilot coding agent. Just to kind of set the scene and intro Copilot coding agent because I know that not everyone will have seen it and and used it. Copilot coding agent is a coding agent just like Agent Mode in VS Code for example or the Copilot CLI, but instead of running on on your computer with your local repo and your local state, instead it runs in the cloud in the background.

One of the great things about this product is that we have loads of different ways that you can give a task to Copilot to work on. So you can assign an issue to Copilot on the GitHub. You can open the GitHub app on your phone and just type in a prompt, ask Copilot to do something, and it's going to go and welcome that in the cloud. You can do it from VS Code. We have integrations into Slack and Teams that are really cool. But the one that I'm going to show you today is something that we call the Agents panel. So I click this button in the top right hand corner of GitHub and it opens up this nice little little panel where I can enter a prompt, ask Copilot to do something, and I can see a list of other sessions, other tasks that Copilot has been working on for me recently.

The thing that's changed here that's that's really exciting over the past couple of months is that we now have a model here. This is available for Copilot Pro and Pro Plus users and we're bringing it to business and enterprise users in the near future. Before we always used Claude Sonic 4.5 when you were using this background coding agent, but now we give you options, but the one that I probably love the most is being able to upgrade to Opus for tasks where I want to do that. So using Opus costs a little bit more. So you'll pay three preview requests.

To start something off, I just enter a prompt in here. So I'm going to choose one of my repos, one of my custom open source ones, and I'm going to say, "Add comprehensive get tests with Jest." This is exactly the kind of work that I don't like doing. So that's the kind of thing that I want to give Copilot to do for me in the background. I'm going to go for GPT-5.2 CodeX for that. Then Copilot's going to go and start working on that for me in the background. So you know, I can shut my laptop. I can disconnect my internet. It's not dependent on me. It's able to just do that and then come back to me with a PR once it's done.

So, let's just click onto this and we can see kind of where we get taken. You're going to see Copilot's output as it starts working. The startup time here takes a little bit longer because we have to kind of spin things up in the cloud. Right now, this uses GitHub Actions as the kind of compute layer for where Copilot's going to work. So, the same place you're running CI/CD.

While this gets started, though, I'm going to go to another example that I picked off earlier just so we don't have to wait for things to get ready. So this is another one of my open source projects. I was doing some back and forth with Copilot earlier on today. It's got its own development environment. So it can run Git, it can run tests, all of those great things, the same stuff that we expect from an agent anywhere.

I want to show you a couple of cool things that we're doing in here to improve the quality of the code that Copilot writes. So if I scroll down, you know, all these edits that Copilot's making, it's making changes. It's running tests. It's running the lint. Here it says that it's reviewing its changes with Copilot code review. This is a really nice kind of Spider-Man pointing at Spider-Man moment where Copilot coding agent is working with Copilot code review to improve the quality of what it's doing. And you can see here that Copilot got some feedback on the changes, changes it had made. It got told that the string concatenation is overly complex, which is great. It's it's writing code that's not so good. And it's able to take that feedback and then go and make changes based off that. And the really nice thing about this is like this gets done before you even see the code. When you get that review request, you've got something that's in a much better state, that's higher quality, that's more likely to be ready to merge.

We also have an integration with GitHub Code Scan. And what that does is scans your code for security vulnerabilities. And again, that's going to run automatically inside Copilot as it's working. Usually that's part of GitHub Advanced Security, which is kind of a a premium GitHub feature but costs extra per month, but we give this away for free with Copilot coding agent just because we want to make sure that all the code that we're generating with AI, we want to make sure that's secure.

Tim, this is all baked into the Copilot coding agent's workflow. I don't need to turn anything on for this to happen for me.

Yeah, that's right. It all just happens automatically for you without without clicking anything and it's all kind of going on in the background. You know, we also have detection for secrets using GitHub Secret Scanning. So, if Copilot like accidentally commits an API key or something like that into your codebase, that's also going to get picked up and stopped before it happens. And we also have an integration with the GitHub Advisory Database, which means that if Copilot installs a new dependency into your project, we're going to scan that dependency and check whether there are any known vulnerabilities with the dependency as well. So if you think about the LLMs that are powering agents like this, they don't know everything that's happening right this second. They were trained with data maybe six months old or a year old or something like that. And that means that they will often recommend maybe old dependency versions and not the latest version. With this advisory database integration, Copilot can pick those things up. If the dependency it's picked is vulnerable, it has a security issue that it can kind of give a poke and say, "You should upgrade this and use Sang Latte."

One other thing I wanted to show was a nice feature that we have called custom agents. Obviously, like when you're giving a task to Copilot, you're going to write a prompt in here, but you're probably not going to write in tons of tons of detail, tons of like complexity. And sometimes you might want to create like different personalities or or different flavors to Copilot to do different things. And one way that we allow to do that is with this feature called custom agent. So I go to my repo and then I go to GitHub and I've got this agents directory and in here I can write my agents. And here I've created an agent called "Performance Optimizer" and what that does is kind of tells Copilot to take a particular approach when dealing with performance issues. So I want it to like benchmark first, like validate how long something is taking now, then make a change, and then look at how big a difference it made to be kind of data-driven in the approach that it's taking.

So just to give an example, I'm going to open this up again. Open up my agents menu. I'm going to use for Opus because, you know, for this performance optimization task, I'm willing to spend a bit more money to get higher quality. Going to click here and into the Performance Optimizer agent. And I'm going to say, "Optimize how airports and airlines are up." And I'm going to press Command Enter to go and fire that one off. I've done a similar one to that before. So let me just go and take a look and we can see the kind of work that it did. It's running a benchmark to actually find out how performant is the code right now. Then it makes changes and it runs the benchmark again and it can actually say like, "I've made a big performance improvement here." So we look at this and this performance change can say, "I've made a 99% improvement to the performance of this code." Obviously, that's just one small thing. It's not like, you know, made the whole app 99% more performant, but it's done this targeted change and be able to measure the impact.

Generally, I'd say that Copilot coding agent is going to be great for tasks that are like small to medium size and you've got a really good clear description of what you want. It's not so good if you're like, you know, you're confused and you need to make lots of decisions, but for well-scoped things, often I find like I get great results sending them to the background. I've shown you an example here where the performance where the agent is like stored inside a repo, but we also have a way for you to share that across a whole organization or even across the whole enterprise as well. So you've got ways to scale this up and and make it work more widely.

And I've got one more thing that I want to show. So if you haven't tried it yet, the Copilot CLI is just an agent that runs in your terminal. So if you've used por code for example or OpenAI CodeX, it's a very similar thing, but you can use it with your Copilot subscription and it's got some really nice magic integration with Git. This is a session that we looked at earlier that Copilot was working on for me. At the bottom I've got this button here that says "Open in VS Code," but if I click the next to it, we've got other options here as well. So, you know, checking out with the GitHub CLI or creating a Codespace. But I want to show you the "Continue in Copilot CLI" option. So this has got a little command under it. And when I click this, it's going to copy that command to my clipboard. So, let's go ahead and try that. I'm going to click there. And now I'm going to copy and paste that command that Copilot gave me.

If Copilot's actually still working, then I can tail those logs in the CLI. So, I can easily monitor my terminal. So, if I'm like a T-Bux guy with like four shells running at the same time, I can, you know, have the one where I'm coding and the one where I'm watching Copilot. But the other really nice thing I can do is switch into this local mode and it's going to check out Copilot's branch that was working in the cloud locally and let me continue that conversation in the CLI running on my local machine. And the really nice thing about that is that Copilot's going to have the context on why else it's due originally. So like the message at the top of the thread, the prompt that I gave it, and it's also going to, you know, know about all the work that it did. So you can see here you've got all these logs from the cloud and I can just kind of pick up where I left off.

We've seen there the way that we can kind of pull work that Copilot's been doing in the cloud and work on it locally. But we can also kind of do that in the opposite direction as well and be in the CLI working and then say, "Actually, we want to we want to do this thing in the cloud." So we have a really easy way to do that now by pressing the APAN key, which switches us into this "Delegate changes to remote repository" mode, and then Copilot can go off and do that thing in the background. So I can say, for example, "Add CORS headers to allow requests for any origin," and then Copilot's going to go and pick up that work, do it in the cloud, and I can keep working on my local machine. I can keep working the CLI while it does that. So now it's going to start sending the logs. It says it's processing. I can obviously open this in my browser, but I can also press CtrlN to start a new session and just go and do my own thing.

Amazing. And so I don't have to worry about work trees or like Copilot is taking care of all of this for me at this point.

Exactly. Right now, this workflow we have with the coding agent is super focused on writing code. So as soon as you tell it to do something, it opens up a PR, it starts working, and it takes from you. But this kind of misses two things that I really want and lots of developers tell us that they want as well. One thing we're going to be shipping soon is the ability to kind of have Copilot work privately, and then you can choose to open the PR when you're ready. So you can do that like initial review on Copilot's work and then say, "Okay, now I'm ready for a PR," or you can say, "Actually, I don't want to create a PR for this, like it was an experiment or Copilot didn't do what I wanted." It's going to allow us to use the coding agent for maybe tasks that are a bit different to coding. They have to ask it to plan work before it does it, and then start coding once you've reviewed the planner. That's something I do all the time with the Copilot CLI. But right now, I can't really do that with Copilot coding agent because it opens a PR straight away. But it's also going to open up some other kind of fun and random works as well. So imagine like asking Copilot to search your repository for performance improvements, and then it can just give you a bunch of ideas, and you can be like, "Do this one, do this one, but don't do that one."

And another thing I think is going to be really cool is like using it for kind of reporting and and dealing with bugs. So imagine like at least for me, something that I have to do every quarter is like tell my manager what I've been working on, like do my

Yes. And I will be able to say to Copilot like, "Hey, go through all my work in this repository and write a report on the stuff that I did." Or similarly, like if I've got an open source repository with tons of bugs or issues coming in, I'll be able to say, "Copilot, like go through all these issues and tell me what I need to know, like help to summarize that for me." And I'll be able to do that stuff in the cloud and it will just work in the background and then tell me when it's done, and I won't have to have a pull request for that. It will just be doing its thing.

Well, it sounds like there's a lot of really big plans for the Copilot coding agent. I'm excited. Tim, thank you so much for coming by and showing us.

And that was your second look at the GitHub Copilot coding agent, your coding agent anywhere you work. Thank you for watching. Please don't forget to like and subscribe. Push those changes domain, and we'll catch you on the next release.