Require approval for GitHub writes - #3949
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments remain.
Pull request overview
Updates AGENTS.md to require approval before making GitHub changes.
Changes:
- Treats GitHub as read-only by default.
- Requires explicit, action-specific approval for writes.
- Requires showing proposed targets and content before writing.
File summaries
| File | Description |
|---|---|
AGENTS.md |
Adds GitHub write approval requirements. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
rambleraptor
left a comment
There was a problem hiding this comment.
I don't see the harm in adding this to AGENTS.md but I think this would better belong somewhere in your setup locally.
I don't see this cutting down on the repository's LLM-generated comments.
|
|
||
| ## GitHub Write Approval | ||
|
|
||
| - **Never** modify GitHub state without explicit user approval for that specific action in the current session; treat GitHub as read-only by default. |
There was a problem hiding this comment.
An agent can bypass this. Something like stop hooks have helped if some git / other commands are attempted to being run. So I'm not sure of the value of adding it here versus having users keep their local setup guardrails.
|
I'm actually not sure if this will work as intended. The idea is to stop agents from doing this by default. For example, when I started using Copilot, it created an issue for me even though I was just asking it some questions. Let's give this a try |
I would like agents to ask for explicit permission before making any visible GitHub changes, to reduce noise.
This PR updates
AGENTS.mdto require action-specific approval before writing to GitHub.When I asked copilot to create this PR, heres what I got (Good bot):

This wont catch all the cases, and might not be respected by all agents, but I think its a step in the right direction