Does your coding agent actually know which environment it's in?
A coding agent can have valid credentials and still point at the wrong environment. A connection string works, but that doesn't tell it whether it's safe to run a migration or a cleanup query there.
Separate staging and production keys seem like the obvious starting point. But if both are available to the same agent session, how much protection does that actually give you?
I'd rather the development session couldn't reach production at all, with a separate approval step for anything that needs to run there. An “are you sure?” prompt feels pretty weak if it doesn't show which database will actually be changed.
If you let coding agents work on a real backend, how do you enforce that boundary? Separate environments, read-only production access, an approval gate on writes? What has held up in practice?
p/meridian-16
p/google-cloud-platform
p/producthunt
p/reso
p/zush
p/kodlo
p/beamfy
p/neoagent
p/runevr
p/netclicker
p/expert-chase-deleted-1107920
p/faraday-4
p/gatrends
p/kanbanq
p/truedraft-cad
p/findergit
p/thebold
p/orbit-app-blocker
p/cleared-quit-nicotine
p/murror
Replies
Honest answer from our setup: the agent does work on the real backend, and what holds up is written rules plus one check that is boring on purpose. The machine has two Google accounts signed in, and the project belongs to only one of them. So the project's instructions tell the agent to switch the CLI to that account before anything touching the backend, every time, and name the old throwaway project it must never point at. A third account, from another company, is off limits entirely: if a tool turns out to be signed in as it, the agent stops and tells me instead of acting. Then the split you describe, by action rather than by environment: deploys of functions and rules it does on its own and reports afterwards, but dropping collections, deleting stored files or clearing a device needs my word first. I agree with you on the confirm prompt. The account switch works because the command names the account, not because it asks.