AI  

GitHub Copilot Agent Looks Promising – Part2 (June 2025)

GitHub Copilot Agent, as of June 2025, looks much more capable than it did 2 months ago.

Abstract: After the appearance of the GitHub Copilot Agent, I decided to try it on my real-life ASP.NET8 project of 123.000 SLOC. I tried some limited-scope tasks, and the initial results are much better than my GitHub Copilot tests two months ago.

1. GitHub Copilot in VS2022

I am working on the development of .NET8/C#/ASP.NET8/EF8 application, which is now around 123.000 lines of code (SLOC), out of which 50.000 is EF-database-first model, in Visual Studio 2022.

I have a subscription to GitHub Copilot Pro + license. So far, that AI tool has been good for limited-scope tasks. I wanted to try the new GitHub Copilot Agent mode. Below are notes from my regular work.

2. Anecdotal Experience with Real ASP.NET8 project

The environment is,

  • Visual Studio 2022, 17.14.4
  • GitHub Copilot (GHC). License Copilot Pro+
  • Agent mode, GPT-4o, GPT-4.1, Claude 3.7 Sonnet

The task is,

  • The task is to create a similar View-Component based on an existing one.
  • Context is WebApp (.dll) in this moment is ~66.000 SLOC , different technologies, C#, JavaScript, jQuery, Bootstrap, HTML, CSS, ASP.NET8, MVC, Razor.
  • The task for GHC is to create a new View-Component based on the existing template. It is 4 files in different technologies. Still, it is pattern-based, practically just Contract and Account need to be switched. It is a component, so it is independent from the main app code, and it limited scope.
  • Component uses AJAX, so the Controller method for the component needs to be created too

2.1. Create a new AJAX method in the ASP.NET MVC controller based on the existing

That is 80 lines of C# code method, just referencing the DataAccessLayer.dll TBServerUI.Data. It is pattern-based; it should be no problem.

2.1.1. GHC (GPT-4o)

  • (Run1-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was: Based on method AccountsListForContractDT_AJAX in file #AccountsController.cs, create a similar method where Contract and Account roles are switched, called ContractsListForAccountDT_AJAX. Context is TBServerUI.WebApp project. In implementation, you will need to use Contracts_ContractsForAccountListDT from TBServerUI.Data project.
  • It worked a 3 minutes, it added a method, it tried to build, it built. I looked into it. IT IS GOOD. It was pattern-based, but it did exactly what I would do manually. Just put it in AccountController, I want it in ContractController.
  • So, I asked to move that method to the other controller class, and it did. It was built again to verify that it all builds.
  • It looks like GHC has some problems if the VS2022 project/solution is not opened in the proper folder/view/tab. It couldn’t find the C# file. So I helped it a bit, by observing GHC-Chat-Window, which is practically a Log of what is doing, and when it was not able to find some file, I navigated VS2022 to that file/class. Then it was unstuck and continued to work.
  • I AM IMPRESSED. IT DOES FEEL AS IF YOU HAVE A COMPETENT COOWORKER THAT GETS INSTRUCTIONS FROM YOU AND YOU CAN DELEGATE WORK TO HIM/HER.
  • And commands/instructions I gave to GHC are quite normal, as I would give to some coworker, not too much of “prompt engineering pseudo science tricks” were needed. Quite a natural language. OK, I admit, I was skeptical in the past, but this looks like real AI.
  • The fact that GHC automates VS2022 has a big psychological effect… really looks like someone else has overtaken control of your dev tools.
  • I am using Git, and that is my line of defense; there, I observe every change made to project files and review each one before accepting it. I kind of do not trust AI messing with my project, without me having firm control of every line that is about to be changed.
  • I do read AI-generated code, but in the past, it happened that I overlooked some small change AI added, and that created problems later. What happened before, AI-generated code in case of method failure returned an empty object from the default constructor, and I usually return null in case of failure, so it messed with logic in the upper invoking methods. I just didn’t see such a small deviation in code created by AI. That is why I say, be careful, AI follows some textbox conventions (from who knows which author), not your project conventions.
  • In this case, I read 80 lines of code, and it looks fine, but I am not a compiler, just a human, maybe some small error is somewhere.
    Command

2.2. Create a new ASP.NET View-Component based on template (4 files)

  • This is a bit more tricky task. It is still template-based, but involves 4 files and several different technologies.
  • Still, the component is a limited-scope task.
  • On the other hand, many ASP.NET developers do not know or use View Components.

2.2.1. GHC (GPT-4o)

  • (Run2-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was: Based on View-Component AccountsForContractSelectableViewComponent in file #AccountsForContractSelectableViewComponent.cs, create a similar View-Component where Contract and Account roles are switched, called ContractsForAccountSelectableViewComponent. Context is TBServerUI.WebApp project. AccountsForContractSelectableViewComponent consists of several files: 1) AccountsForContractSelectableViewComponent.cs; 2) AccountsForContractSelectableViewComponent_Model.cs; 3) AccountsForContractSelectableViewComponent_ViewModel.cs; 4) AccountsForContractSelectable_Default.cshtml. You will need to refer to the AJAX method ContractsListForAccountDT_AJAX in the generated ContractsForAccountSelectable_Default.cshtml.
  • It worked for only a few minutes, and it built that work, but it was not good. It created classes for the first 3 files and embedded them into existing files. Maybe I should have told it to create new files? It didn’t create Razor view .cshtml, which is quite complicated, 477 lines of code, most JavaScript. Let’s see if we can make it do it.
    JavaScript
  • (Run3-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was:
    • Move classes ContractsForAccountSelectableViewComponent_Model, ContractsForAccountSelectableViewComponent_ViewModel, ContractsForAccountSelectableViewComponent into their own files. File locations are the same as the model files on which they were generated.
  • It did it right, and now it looks better. Maybe complex tasks need to be broken into subtasks.
  • I created a manually view file, ContractsForAccountSelectable_Default.cshtml, because it looks like that is confusing GHC.
  • This Razor view with a lot of JavaScript, so let’s see how it goes
  • (Run4-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was (***) :
    • Based on Razor view file AccountsForContractSelectable_Default.cshtml create file ContractsForAccountSelectable_Default.cshtml as a view for component ContractsForAccountSelectableViewComponent, where Contract and Account roles are switched. In file ContractsForAccountSelectable_Default.cshtml create Datatable columns same as in ContractsList.cshtml. You will need to reference the AJAX call to ContractsListForAccountDT_AJAX in the controller Contracts.
  • It failed. Some errors. I will try again
  • (Run5-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was (***)
  • This time, it produced buildable code. Let’s check.
  • It was not good at all. It used the wrong model class and created a mess with JavaScript
  • (Run6-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was (***)
    • Replace all JavaScript sections in ContractsForAccountSelectable_Default.cshtml with JavaScript from AccountsForContractSelectable_Default.cshtml, and just adapt it to use Contracts_ContractsListDT_Json object
  • The result was buildable, but JavaScript is not good. It shortens it a lot.
  • (Run7-GHC (GPT-4o) ) My request COMMAND to GHC (GPT-4o) was (***)
    • Replace all JavaScript sections in ContractsForAccountSelectable_Default.cshtml with JavaScript from AccountsForContractSelectable_Default.cshtml, and just adapt it to use Contracts_ContractsListDT_Json object. Copy also all comments in code from AccountsForContractSelectable_Default.cshtml, just adapt it to the new file. Copy also sections that are triggered with Model?.IsSelectable flag when possible.
  • I have read the result, which is maybe 330 lines of JavaScript that invoke some libraries. I found a small mistake, not syntax, but it didn’t pass some parameter. VS2022 can not test syntax on JavaScript embedded in Razor, but I followed it manually, and it looks solid. Only running in the browser will show any errors. But it followed a pattern, improvised some things, ok- good improvisations. Made a usable base for me to modify manually. It didn’t follow my pattern for brackets; it followed textbook rules, but OK. In one place, it looks like it searched the code for the proper icon method and found the right one. It even added some smarts too, based on some flag, including/excluding some JS code. I didn’t care if a “dead code” JS method is there. It even cleaned some “dead code” methods that I initially added to the original file but later abandoned. I can actually understand what GHC wanted to do and why. It got right, which are primary keys in Accounts/Contract, and which need to be passed to other methods after selection. That is quite clever.
    Agent
  • So, it had a problem with that Razor MVC file with a lot of JavaScript, and needed help with it. It made 3 easy files right away, and it needed help with the 4th one.
  • Very important: I did not notice garbage code in JavaScript or an obvious mess, as I saw 2 months ago.
  • Component needs to be tested, of course, but it looks like I got a solid codebase, with just a few modifications (~6 lines) to the generated code. And 7 prompt commands altogether.

3. Conclusion

This was still a task carefully chosen for GHC, in the sense that it is template-based and component-separated from the main code. It only needed to clone the code and adapt it from the Account entity to the Contract entity. But before, GHC would fail even in such “Gen-AI favorable scenarios”. So, the above shows 7 prompts that created ~500 lines of code, with small interventions from a human programmer ~6 lines of code, and some empty file creation. And commands are in practically natural language, no “pseudo-science” prompt engineering needed, I spontaneously stopped using # for marking file names, and it all worked.

I have always stated that prompt engineering is “a defeat for AI,” and with the advancement of AI, it will become obsolete as natural language communication will prevail.

Impression: This version of GitHub Copilot (GHC) Agent is much, much stronger than the GHC I saw a few months ago. There is no mess in the code I saw 2 months ago. I did not see a single hallucinated method or property, and the code is buildable, meaning syntax is proper. The automation of Visual Studio 2022 (remote control by GHC) has a kind of psychological effect; you feel like someone else is present and has taken over the control of your tools. VS2022 is alive without me doing anything. It actually builds and repeats builds after errors.

It does not feel like “pair programming” or “peer programming” as in marketing stories. GHC is quite passive, so it feels like an “intelligent code generator”. But it does look effort-efficient. In the above work, I made altogether 7 commands to GHC, and got some 500 lines of usable code. But you still need a human proficient programmer to filter out bad attempts and tweak code in a couple of places.