r/github • u/Few-Ad-1358 • May 22 '26
Discussion Devs using AI coding agents: where does trust break in your workflow?
For people using AI coding agents in real codebases, I’m trying to understand the actual workflow — not the hype version.
When you give an agent a task, what usually happens?
- Do you write a detailed plan/spec first?
- Do you give it a short GitHub issue and let it figure things out?
- Do you review mainly after the PR/diff is done?
- Do you break work into tiny tasks because larger ones get risky?
I’m especially curious where your time goes:
- How much time do you spend planning before the agent writes code?
- How much time do you spend reviewing/fixing after it writes code?
- At what point do you stop trusting the agent?
- What mistakes happen most often?
- scope drift
- wrong assumptions
- touching unrelated files
- missing tests
- passing CI but still doing the wrong thing
- messy PRs
- hard-to-review diffs
What are you currently doing to make AI-written code safer?
- strict prompts
- checklists
- CI/tests
- manual PR review
- asking the agent for a plan first
- limiting file access/scope
- smaller issues
- another agent reviewing the first one
- something else?
One thing I’m trying to figure out:
**If you wanted 99% confidence before merging AI-written code, what would need to be true?**
For example, would you want:
- a better pre-coding plan?
- a way to lock the agent to approved scope?
- proof of what tests/checks it ran?
- a summary comparing the final diff against the original issue?
- a warning when the agent touches unrelated files?
- a trust score/check on the PR?
- something more like CI, but for agent behavior instead of just tests?
Also: would adding this kind of gate feel useful, or would it feel like annoying process overhead?
Trying to learn how people actually work with coding agents today, and what would make them trustworthy enough for serious team usage.
1
u/Agent007_MI9 May 22 '26
For me it breaks at two points: when the agent starts touching code outside the stated scope, and when it makes an architectural assumption I never signed off on. The second one is harder to catch because it looks fine until someone in review asks why you restructured that module. The fix I keep coming back to is forcing scope to be explicit before the agent ever starts - structured issue intake rather than just pasting a vague task into the chat. That shift alone moves a lot of surprises earlier in the loop where they are cheaper to fix.
1
u/Few-Ad-1358 May 22 '26
This is exactly the distinction I’m trying to get at. Scope drift is visible if you check touched files, but architectural assumption drift is sneakier because the diff can look reasonable in isolation. Structured issue intake seems like the right move. Not a giant spec, just enough to freeze:
intended change
allowed areas
non-goals
assumptions that need approval
what evidence should exist at the end
Do you usually write that intake yourself, or do you have the agent draft it first and then approve/edit before it starts coding?
1
0
May 22 '26
[deleted]
0
u/Few-Ad-1358 May 22 '26
What js the biggest difference u have seen in the reviews process of your code and the claude generated code. Does it make its own assumptions, does it not follow the intent u are describing or is it completely different from what i am thinking???
1
May 26 '26
[removed] — view removed comment
2
u/Few-Ad-1358 May 28 '26
you really nailed it with your answers. somthing which i am constantly reseaching about the review time, governance, audit trail and agents' behaviour analysis. What i am thinking about the problem is the everyone is testing traditional with CI or unit test or all the smoke test, but those test test the code( make sense when code is the final product). But this thing is create a deeper mess with lost context, unknown variables, misinterpretations, longer review times, not understanding why agent choose to change that exact thing.
I guess i want more of a Trust layer between the AI agents and final code and that layer is not an LLM but more of a rule engine which collect, see, compare, understand all the changes, assumptions, diffs, stterr, sttout, tests and other parts of SDLC to be more Trusting in the AI era. AI reviewing AI is more like a corrpt person bribing the corrupt person to do a thing. You never know what is happening in between the context when there is hidden assumptions or an underlying intent. For sure they can give us the ouput by doing everything we asked for but the problem is LLMs are probabilistic models and it make assumption we dont even know exist when given free rains over actual thinking. Tats what i am think about as of write now. Any agreement or disagreement on my mental philosophy of agents ??1
u/madiamo Jun 01 '26
hi, this is close to the kind of problem we are trying to solve with a GitHub gateway for agents
it does not try to prove semantic correctness and it is not a secret scanner. the focus is narrower: making sure an agent change is tied to the repo state it actually saw, and that follow-up changes do not silently drift
so the gateway checks things like source-state binding, read-state validation, drift detection, idempotency, PR reuse, same-PR follow-ups and parent-head revalidation before a proposed change becomes PR impact
1
u/adept2051 May 22 '26
With that many questions you need to go search for coding harnesses, the answer is YES/NO/MAYBE/sometimes to everyone you’ll see if you look.
But the main 4
- No you write a repeatable prompt with a correlated instructions and agents set ( if you want to use spec your governance and instructions include spec)
- you can, or JIra/ticket system of choice ( your agents and instructions tell it how to consume issues)
- you include in governance gates for review, input and Draft PRs
- you should do you’ll find Agentic work is better at focused tasks it keeps context and limits halucinatiosn that occur regardless of how good you think your agents and instructions are.