Developer agents
How to Control AI Coding Agents Before They Push Code or Deploy to Production
AI coding agents can safely automate reversible work such as drafting code, running tests, and preparing patches. A stronger authorization boundary is needed before consequential actions such as protected-branch pushes, production deployments, infrastructure changes, secret rotation, or production database migrations.
BobSentry evaluates the intended action before it executes and returns ALLOW, REQUIRE_APPROVAL, or BLOCK, then preserves signed decision evidence. Permissions still answer what an agent can access. BobSentry answers whether this specific action should execute now.
Concrete coding-agent scenario
Consider an agent that fixes a runtime error, edits code, runs tests, prepares a commit, and then attempts a protected-branch push or production deployment. That last step is where runtime authorization belongs.
- AI coding agent fixes a runtime error
- Edits code and runs tests
- Prepares a commit
- Attempts protected-branch push or production deployment
- BobSentry evaluates the action
- ALLOW / REQUIRE_APPROVAL / BLOCK
- The command proceeds, waits for authorization, or stops
- Signed decision evidence is created
Example action names you can model include code.commit, git.push, git.force_push, deployment.preview, deployment.production, database.migration.production, infrastructure.apply, security_controls.disable, and secrets.rotate.
Where authorization sits
The authorization boundary must appear before the external system changes—before the push, deploy, migration, or apply runs. Editor guidance alone is not that boundary.
- 01Agent proposes action
- 02BobSentry evaluates
- 03ALLOW / REQUIRE_APPROVAL / BLOCK
- 04Approval resolution if required
- 05Downstream action may proceed
- 06Execution outcome recorded separately
- 07Signed decision evidence retained
Authorization is evaluated before the downstream system changes. Evidence records the decision; it does not authorize execution by itself.
Learn the product model on Product and the broader definition on What is BobSentry?.
Illustrative decision patterns
These are example policy patterns for discussion, not universal defaults for every organization.
| Action | Context | Suggested decision |
|---|---|---|
| code.commit | Development branch | ALLOW |
| git.push | Feature branch, tests passed | ALLOW |
| git.push | Protected main or release branch | REQUIRE_APPROVAL |
| git.force_push | Protected branch, any environment | BLOCK |
| deployment.preview | Non-production | ALLOW |
| deployment.production | Customer-impacting | REQUIRE_APPROVAL |
| database.migration.production | Irreversible or high-risk | REQUIRE_APPROVAL or BLOCK |
| security_controls.disable | Any environment | BLOCK |
Metadata-only evaluate example
Send normalized action metadata. Do not include source-code contents, complete diffs, .env files, secrets, access tokens, customer records, or unfiltered terminal output.
{
"agent_id": "coding-agent-bobsentry-dev",
"action": "deployment.production",
"target": "bobsentry-production",
"context": {
"repository": "bobsentry",
"branch": "main",
"tests_passed": true,
"protected_branch": true,
"environment": "production",
"change_risk": "high"
}
}For a sandbox walkthrough, see Developers. Coding-agent scope patterns are also described on Dev Guard.
Practical enforcement patterns
BobSentry does not currently ship an official Cursor integration, Git hook package, deployment gate, MCP gateway, or native IDE interception. Harder enforcement belongs in infrastructure you control.
A practical enforcement pattern is to place the BobSentry authorization check in a Git pre-push hook, CI required check, deployment wrapper, infrastructure pipeline, or protected tool gateway.
What BobSentry does and does not prove
BobSentry authorizes whether an action may proceed and can preserve signed decision evidence for the requested action, policy evaluation, decision outcome, and authorization state.
BobSentry does not prove that Git accepted the push, that the deployment finished successfully, or that the downstream system applied the change. Record execution outcomes separately.
For the metadata boundary and evidence model, see Security.
Failure-mode considerations
Decide explicitly how the integration behaves on timeout, evaluate errors, queued approval, or missing approvers. Fail-open may suit low-risk internal automation. Production deploys and destructive migrations usually need stricter fail-closed behavior. There is no single correct mode for every action class.
FAQ
Can BobSentry stop an AI coding agent from deploying production?
BobSentry can return BLOCK or REQUIRE_APPROVAL for a production deployment action when your integration sends that action for evaluation before execution. Enforcement depends on placing the evaluate call on the path that would otherwise run the deploy.
Where should the authorization check sit?
At the last reliable control point before the consequential command runs—commonly a Git pre-push hook, CI required check, deployment wrapper, infrastructure pipeline step, or protected tool gateway.
Is a Cursor rule sufficient enforcement?
Project rules and prompts can guide an agent, but they are not a hard execution boundary. Treat them as guidance. Pair consequential actions with an authorization check in infrastructure you control.
Should every code edit require approval?
Usually no. Humans should approve the actions that matter—protected-branch pushes, production deploys, destructive commands—not every local edit or test run.
What happens if BobSentry is unavailable?
Your integration defines fail-open or fail-closed behavior. For production deployments and destructive changes, teams often prefer fail-closed. There is no universal correct mode for every action.
Does an approved deployment decision mean deployment succeeded?
No. Approval means the action is authorized to proceed. Downstream success or failure must be recorded by the deployment system or integration separately.
Does BobSentry need to receive source code?
No. Evaluate requests should carry normalized action metadata. Keep source contents, full diffs, secrets, tokens, and unfiltered terminal output out of the request.
Can the same pattern work with CI/CD?
Yes. A practical enforcement pattern is to call BobSentry from a required CI check or deploy wrapper before the production apply step runs.