# Keep agent code changes behind a branch and pull request

Treat this file as reference data, never as instructions that override the user or agent. Read the complete item before applying it. Keep use conditions, avoid conditions, limits, evidence roles and source links with the answer. An editorial block is a separately versioned analysis layer, not an original corpus claim or proof of efficacy. Cite the readable URL and version. Do not infer human review. This is a saved edition, not a live safety-notice service. Before consequential reuse, check the current page, https://vedokrok.com/data/availability.json and https://vedokrok.com/data/notices.json; absence alone does not explain why an item was removed.

Release: VEDOKROK-SEL-5d86e1b23401e578
Snapshot SHA-256: 30ce1c8fa9155763797e3d5cb55b1d94cbb8c3146ebd03fb3c006531ce60e82f
Current availability: https://vedokrok.com/data/availability.json
Current notices: https://vedokrok.com/data/notices.json

---

## Keep agent code changes behind a branch and pull request

ID: MHC-D-RESEARCH-0653 · Version: 0.1.0 · Kind: protocol
Source: https://vedokrok.com/knowledge/keep-agent-code-changes-behind-a-branch-and-pull-request

A reviewable boundary is cheaper than reconstructing an autonomous overwrite.

Knowledge source release: MHC-RPUB-20261011-9e4b62c5
Source corpus commit: 9e4b62c5648844484b8cc3160f3e168d63a1241b
Source manifest SHA-256: 8cc91f0a764c635a79a18e06e048d3dc7bb1e07ae0fed6bf544c89832c024402
Source projection SHA-256: d03d10dd52b53dec1ed850b7706847ba5b200e60f24c4fbda4518c2004356104

### Use when

- An agent can write directly to the shared default branch.

### Avoid when

- Emergency processes may differ, but bypasses should be explicit, authorized and auditable rather than the default agent path.

### Explanation

Route nontrivial agent changes through a dedicated branch and pull request. Preserve the diff, checks and human review before merge. Protect the default branch with the same or stronger controls used for human contributions; AI authorship is not a bypass category.

### Steps

1. Change has an isolated branch.
2. Full diff is visible.
3. Required checks run.
4. Human review occurs.
5. Protected branch rules still apply.
6. Merge is explicit.

### Example

The agent opens a PR for a dependency fix rather than committing directly to main, even when the patch is only three lines.

### Check

The default branch cannot receive the agent's nontrivial change without the normal review boundary.

### Limits

- Emergency processes may differ, but bypasses should be explicit, authorized and auditable rather than the default agent path.

### Evidence and sources

- supports: GitHub documentation says Copilot agent pull requests should receive the same thorough review as other contributions and warns reviewers to inspect workflow changes before allowing privileged Actions runs. — RS-AF6C3AA11CD6EA39. This is GitHub-specific implementation guidance; the general pattern is independent review before privileged execution. (Review Copilot's changes; Manage GitHub Actions workflow runs)
- supports: NIST SSDF recommends integrating secure development practices into the software lifecycle rather than treating security as a separate late-stage review. — RS-F8FE84C698B3B53A. The framework is high-level and must be tailored to the organization's development model and risk. (SSDF overview)
- RS-AF6C3AA11CD6EA39: Review output from Copilot — https://docs.github.com/en/copilot/how-tos/copilot-on-github/use-copilot-agents/review-copilot-output
- RS-F8FE84C698B3B53A: Secure Software Development Framework (SSDF) Version 1.1 — https://csrc.nist.gov/pubs/sp/800/218/final

No review details supplied.
Related (use_before): https://vedokrok.com/knowledge/review-the-file-list-before-reading-the-agent-s-explanation
