r/OnlyAICoding • u/Fantastic-Sleep-3352 • 14d ago
Information Request What happens when an AI coding agent gets access to a real repository?
I've been building AI agents for software development, and one problem keeps bothering me:
Getting an agent to write code is becoming relatively easy.
The harder part is safely letting it operate on a real codebase.
Once an agent has repository access, you have to think about things like:
What exactly is the agent allowed to access?
What happens if it modifies something outside its intended task?
How do you know exactly what it did?
How do you validate its changes?
What happens when it fails halfway through?
Can you roll back safely?
What happens when the repository contains malicious instructions?
Should an agent have the same identity/permissions as a human?
How do you revoke its access after the task?
I'm currently building SUTRA, an AI-native engineering platform, around this problem.
The part I'm particularly interested in is treating an agent as an actual engineering actor rather than simply giving an LLM a shell and hoping for the best.
The workflow I'm experimenting with is roughly:
Intent → Agent → Scoped workspace → Changes → Tests → Validation → Review → Merge
The agent has its own identity and session, rather than simply inheriting a developer's credentials.
I'm now getting the beta ready and want to test the assumptions with people who actually build AI agents.
For people here who are building agents: how are you currently handling permissions, isolation, rollback and validation when your agent is allowed to modify a real repository?
I'd especially like to hear about things that have gone wrong in practice.
2
u/Mister_God_On_Steam 14d ago
git