Yahoo
Skip to main content
Advertisement
Advertisement
Advertisement
Advertisement

Stop blindly trusting GitHub Copilot: 4 reasons it’s failing as a coding agent

the github logo on top of a blurred out repository
Michael Betar IV | How-To Geek/Wikimedia Commons

I've tried many different AI coding tools both in my job and for personal projects. GitHub Copilot is the most recent addition to my toolbox. While it can be great for productivity sometimes, I've faced so many woes that I feel it does more harm than good.

It can make the dumbest mistakes

AI can make mistakes. A LOT of mistakes. However, I never thought they would be this bad until I used GitHub Copilot. What kind of mistakes, you ask?

Variable name mistakes. In one file, it defines the variable name as 'phone,' while in another file, it defines that same variable as 'phone_number.' Data type mismatches. In one file, it correctly defines a variable as a datetime type. However, in another file, it sets that same variable as a string type.

GitHub Copilot making the mistake of not adding property fields to a database model it did in the past.

And don't even get me started with clean coding and following best practices. There are times when it generates a utility function and then goes on to not use it and write the same functionality everywhere. In a recent project, it introduced a race condition in my code.

Advertisement
Advertisement

Oh, and guess how it replies when you ask it to clarify the mistake. "You're absolutely right. This should've been this way instead."

The agent starts doing unnecessary tasks

Ever found an LLM bot doing everything except what you told it to do? GitHub Copilot takes that to the next level sometimes. When I just ask it to make a plan or discuss something, it starts implementing the whole feature. Here's another common scenario I face a lot.

I work with PostgreSQL and Python for the backend. I need to do database migrations. When I ask GitHub Copilot to implement database models, it goes beyond that, generates migration files using Alembic, then tries to run the migration, fails (as it's supposed to because of version mismatch), then reads the codebase, changes the migration file, attempts to migrate again, fails again, and gets stuck in this loop.

GitHub Copilot not listening to the prompt given by the user with other blank code snippet bugs.

Unless I tell it not to do anything related to migrations, it will attempt to do so every single time. For a coding agent, the default behavior should be to strictly stick to the given prompt and not do anything more than that. I mean, it's not a bad thing in general if it can do it correctly. But to make mistakes and get stuck in that mistake loop kills a lot of time and resources.

Hard to follow file changes in Agent mode

One of the coolest things about using a coding agent is that it makes the changes to the files itself. No need for you to copy the code, find the place to enter it, and paste it there. The agent does all these. After that, you can review that code snippet and decide to take or reject it.

Advertisement
Advertisement

However, recently, I've seen this issue where GitHub Copilot regenerates the whole file with the updated code instead of just writing the snippet into the file. This raises the issue where I'm not sure what the new change is, as the whole file is presented as a new file, and all the code is new.

This just defeats the purpose of using an agent because I need to review the whole file from scratch to understand the new changes. In more recent sessions, I've found the agent does this more frequently than doing it the correct way. In fact, it's more frustrating when you just tell it to make the smallest change, and the agent rewrites the whole file.

The Ask mode is buggy

Copilot's ask mode trying to act like agent and wrongfully showing no code.-2

Ask mode in coding agents is where you can discuss things, ask questions (of course) to clear doubts, give clarifications, and plan your system. Or, that's how it was supposed to be. In GitHub Copilot, though, Ask mode acts more like a stripped-down Agent mode.

This happens to me a lot when I'm debugging and fixing bugs. I share an error with Copilot in Ask mode and ask it to explain and tell me how I can solve it. I do this so I understand the error correctly and learn how to solve it instead of blindly believing the bot. In the ideal scenario, GitHub Copilot will explain the bug, share the code snippet that's causing it, and then suggest the necessary changes to fix it, sometimes sharing the code as well.

Advertisement
Advertisement

But sometimes, it behaves as if it's still in Agent mode. It reads the files for context, then 'attempts' to update the files by itself, though that shouldn't be the case. Sometimes, it even shares blank code snippets. At other times, it may complain that the agentic tools are disabled, preventing it from updating the files.

The worst part? After finishing the response, it mistakenly says something along the lines of "I have made all the changes to the code that were causing bugs. It should be fixed now."

Umm, no? This is like adding insult to an injury. The Ask mode has been really unhelpful for my purposes since I started using Copilot. Using the Agent mode for the smallest things feels like overkill, not to mention the resources it takes.


After all these, I'm thinking of switching to a different coding tool like Claude Code or Cursor. I'll still keep GitHub Copilot for some occasional side projects and quick development. Hopefully, the team behind it can work to improve it to match the other competitors.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: