r/AskProgramming • u/Any-Look-8817 • Jul 24 '26
Other Endless comments on PRs
Hey everyone! Just to quickly summarize my situation: We're a team of a few experienced devs, all having been 12+ years years in the industry. This year we switched to agentic engineering and despite its advantages there are a few drawbacks, like the extra overhead and other things I'm not going to go into.
My issue however is that our lead, who approves all PRs has lately discovered a stronger agent which he uses for code reviews, resulting in tons of back and forth when trying to get a merge through. Tons of petty/pedantic comments are being added to each PR. Sometimes it's like "ok I guess this is fine to add", but most of them are disputable. We of course discuss these, but the issue is that in the set of comments there is always something which technically makes the code 0.1% better. But we could go on like this forever. Even without AI you can look at a piece of code and suggest an "improvement" on a moderately-sized feature that's being implemented.
How to deal with this? I'm getting to a point where if I see more comments on a PR I just leave the PC and go for a run or a quick grocery shop visit just to regain my sanity. It feels like he's asking the agent if there is anything more that can be done with the code as if the goal is to have AI being unable to suggest anything more.
Am I in some slacking mindset or is the AI getting over his head? We also have Sonar turned up to a really high setting and the pipeline set in a way that if there's anything outstanding in Sonar it won't get through and I bet you all know how petty Sonar can get sometimes.
Please let me know any tips or share your experience with similar situations. Thanks!
10
u/retroroar86 Jul 24 '26
This is literally why Office Space is now my favorite movie. It’s not as bad where I work, but this would drive me (more) insane.
Sorry, I can’t help, but my heart goes out to you.
16
u/Most_Double_3559 Jul 24 '26
For new features, functions, etc: bulk reply that you'll get it in the next PR. Small PRs and all that.
For stylistic nits, etc: Ask them to put together a linter? Suggestions tend to go away when they're coupled with work.
19
u/james_pic Jul 24 '26
This kind of thing is exactly why retros exist. Bring it up at the next retro, or bring up the fact that you don't have retros.
9
u/LemonDisasters Jul 24 '26
These clankers will find problems where there are none. Saying "this is not a valid consideration for our purposes" or whatever, is totally legitimate.
7
u/Good_Independence403 Jul 24 '26
Companies want to push agentic coding but it only speeds up the process if you accept agentic code. The way I see it, It will never be exactly like my code. I am pretty much a system designer now and my focus is on the overall health and stability of the system. I have learned to accept that 10-15% drop in code quality as long as I’m happy that it’s still clear and performant.
I ask myself who I’m writing code for anymore? It’s less for human consumption and more for some LLM to understand in 6 months time. At least, that feels like the goal. It’s a trade off. We will all get better and faster at code review over time. I won’t accept bad code, but I personally think it’s important to accept “fine” code. That’s the only way I’ve been able to actually accelerate my work.
1
u/Useful_Calendar_6274 Jul 24 '26
have the agent fix everything
1
u/mtimmermans Jul 24 '26
If you all have 12+ years of experience, then you shouldn't need _approval_ to merge code, unless you're crossing an ownership boundary. Reviews from other than the code owner are great, but they're just suggestions.
3
u/gabriel_GAGRA Jul 24 '26 edited Jul 24 '26
The rules should always direct the AI when writing the code and when reviewing it.
1
u/Tetsubin Jul 24 '26
Run the same agent with a prompt asking it to refute unsubstantial comments.
2
u/ben_bliksem Jul 24 '26 edited Jul 24 '26
Tell AI to address the comments and spam him back and then take it to retro.
Also:
"our lead, who approves all PRs..."
My condolences. I could never be or work under a lead who is that controlling. Also where does he find the time? Nuts.
2
u/Delta-9- Jul 25 '26
I think the solution is to not use a fancy statistics calculator for writing and reviewing your code.
4
u/mredding Jul 24 '26
My answer is always the same:
My review is for compliance to coding standards, legal requirements, obligations, architecture - and catching errors.
I'm willing to entertain "improvements", but I will reserve the right veto/ignore them and pedantic bullshit like spacing, formatting, comments, style, organization... None of that is required to meet the technical, functional, obligatory requirements. If you don't like the way I write code, then write it your fucking self. You can accept my PR, merge it, and write/assign tickets to address your improvements.
I am not an extension of your fucking will. My work is not wrong because it's not in your hand.
And I absolutely will not accept a code review done by AI. First, AI is stupid - only capable of an industry average; I actually think. Second, if I wanted an AI review, I could have ran the god damn agent myself. Third, my agent says your agent is fucking retarded. Forth, if the HUMAN isn't reviewing the code his god damn self, he's not doing his job and meeting the obligations of his employment.
Why? Because an AI cannot be held accountable. Only the human can. We need the human to be accountable for their approval. Lazy employees are going to defer entirely to the AI. The AI doesn't actually know what's right or wrong, if the code actually meets the criteria of the ticket. It can only judge what is. I can sneak a command to format the disk in there. If the guy isn't looking, he's going to miss it.
I would, in fact, incorporate such a command (in unreachable code) in order to flush a bad colleague out and force the conversation about AI review agents used during a PR. I would hold that employee accountable for approving disk wiping code he obviously shouldn't have, and I'd bring this up with legal.
That's the dangerous thing about PRs. If YOU approve a merge, and there's a bug, YOU are culpable. I would leverage the fuck out of that.
Your lead IS NOT your boss. Only one man in the hierarchy has the power to A) pay you, and B) fire you. You take your marching orders from only one. If your lead is being a pain in the ass, you take this to the boss. Affirm you have the right to say no, where and when. This guy is a control freak, and is just getting in your way. It's unjustifiable that it doesn't look enough like his code, his hand. It's unjustifiable for some "0.1%" better - a complete god damn waste of time cycling over this shit. The code review alone is more expensive than the projected lifetime of this code in production. Production code changes, and this isn't where you're slow, or unstable, or compounding.
I would copy/paste this into an email, CC the boss, and CC HR. Warn him if he ever puts a bullshit passive-aggressive comment like this in a PR again it will lead to an escalation for making a hostile work environment. There is absolutely no place or justification for this sort of language anywhere in the business. Think about it - what did this add to the conversation? Why did it have to be said? At all?
Tell him people follow good leadership. He's a lead - perhaps next time he can fucking try to act like one or just get out of the fucking way. You're 12 years in the industry, you don't need to be told what to do, how to do, or be scolded or harassed. Tell him you know AI didn't generate this bullshit, so if this is all he has to contribute to the conversation, don't.
You have every right to chew his ass out. And yes, HR really, REALLY needs to know this is going on, with the proof. You have to establish the history now.
You don't have to like each other, you don't even have to get along, but he does have to behave himself and conduct himself professionally. He better take this as a lesson, a reflecting point, and adjust his attitude. He should be reminded that with HR on his scent, everyone will be watching for retaliation.
And you can also tell your boss "No." Don't forget that. If they don't like it - then tell them to put it in writing. Then take it to the boss's boss and ask if this is how he wants his team managed. Take it to HR and ask if there's any workplace conduct or policy violation. It's OK to lose on this matter.
Because if someone is going to nitpick me over every implementation detail, then we're going to have a design meeting before implementation. This will be their only opportunity to comment on the matter. So when we get to the review and they start to nitpick, I can still say no - they had their chance, and they approved the implementation either explicitly by the end of the meeting, or implicitly by not attending.
If you continue to struggle to resolve the situation, it's time to look for work elsewhere.
I would say he's approaching technical incompetence. If he isn't doing anything more than prompting the AI, then what do they need him for? Any fucking idiot can prompt an AI. The AI doesn't even need him to apply the comments, it can do that directly through the PR API. I can teach my 71 year old mother to do this in ~20 minutes. I can outsource prompting to India for pennies.
You're not slacking - you're actually producing the work. He's slacking by not doing a god damn thing but having the AI do his work for him, then he pats himself on the back and calls himself "lead" for it. It's offensive, and you have a right to be offended.
Once again, you get this in writing. You can take his toy away from him by getting in writing that every engineer passes their own code through a review agent themselves BEFORE the PR. That way, the only review going on is by the humans. They are NOT to use an agent to review for them.
Then why do you also have PRs? Why is he also using an agent? Clearly there is no intelligence in the room. Everyone is deferring to AI entirely.
Yours is a frustrating situation. You ought to talk to your boss about it and tell him you expect these issues to be addressed. Work isn't supposed to be frustrating - it's just a job.
1
u/WiseAcanthocephala45 Jul 24 '26
Absolutely nothing is stopping you from writing a claude code skill to automatically follow up on comments, and either provide justification and resolve a comment, or to implement its suggestion.
This works very well if you have a good set of automated tests and checks in your CI.
1
u/Glad_Contest_8014 Jul 24 '26
You need to have a conversation on what is “good enough” to ship. You will hit an infinite loop with MASSIVE token costs with the current setup. Show the bottom line of all the agent back and forth for how much it costs. It will be exorbitant.
If you all have experience, you should know that code is never “perfect”. There is always a way to improve. That is why technical debt can never be 0.
What you guys are doing is addressing technical debt immediately, on interation, which will never result in a usable product.
1
u/ReDucTor Jul 25 '26
On top of what others have mentioned here, it feels like conventinal style comments might be worth suggesting to them, this way it's clearer what is a nitpicking thing, what is just a thought and what is an actual issue.
1
u/StephenRoylance Jul 25 '26
Personally, I tuned my 'code review' prompt to be less of a picky asshole.
I borrowed language from legalese: 'preponderance of evidence' and 'beyond a reasonable doubt'. I told the agent to look at the scope of the change. default to preponderance, raise to beyond doubt if it opens a network socket or interacts with the filesystem.
net new code: preponderance. 1000 +/- lines in a production system: beyond doubt
the prompt tells the agent: if we've selected preponderance, then we're gonna LGMT/stamp as long as there's not obvious evidence its going to break something. If its beyond a reasonable doubt, then we need to seriously consider all the possible failure modes in production.
One thing that really helps, if you don't have it: code formatting syntax, applied automatically and linted in CI. Everybody agrees what correctly formatted means, so there's never arguing about it. if it lints clean, keep your formatting gripes to yourself.
1
u/jbiemans Jul 28 '26
I can understand the pain because I've worked with other humans (not even ai) that nit pick everything if it isn't exactly how they would have done it.
It ultimately comes down to picking your battles. Are their changes things that would actually make things better? Then try to adopt them going forward. Are they purely style? Maybe the team needs to get together and work out a style guide to prevent future complaints like that.
Are the requested changes preventing the person from approving your work? Have you had a conversation with this person to try to resolve it? If so, like others have mentioned, it needs to be brought up to the next level up that it is slowing you down and let them decide if the other person is right and you just need to accept it, or if they will talk to them and get them to relax. Or may e have someone else do the approval.
1
u/TheCryptoCaveman Aug 09 '26
On every comment I would ask them to add a screenshot or ask to reproduce this hypothetical issue
1
u/Moby1029 Jul 24 '26
We have CoPilot compliment human reviewers and it is such a pain in the ass because of the same issues. So I set up a Cursor cloud agent via Automations to check for CoPilot comments and address and resolve them and send me reports on what was commented, and what it wrote. I still have to resolve the conversation myself, but at least im not fighting with CoPilot anymore.
You may be able to go I to the agent's setti gs and tweak it so it doesn't leave stuff that don't actually require code changes.
1
u/MushinZero Jul 24 '26
I've noticed this as well.
I think you just gotta be able to make the decision "No, I am not going that change because it's not worth the effort"
0
u/knouqs Jul 24 '26
You need to sit down with your team and tell them that you all need to start working on a "bare minimum" approach to solving problems. If the fix as-is fixes the problem and doesn't introduce new ones, the PR gets approved. If you want to fix things on technicalities, those are new low-ranked issues or tickets.
0
u/specialpatrol Jul 24 '26
Isn't that trivial for your agents to fix though?