Skip to content

Require approval for GitHub writes - #3949

Merged
kevinjqliu merged 1 commit into
mainfrom
kevinjqliu-github-write-approval
Sep 12, 2026
Merged

Require approval for GitHub writes#3949
kevinjqliu merged 1 commit into
mainfrom
kevinjqliu-github-write-approval

Conversation

@kevinjqliu

@kevinjqliu kevinjqliu commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

I would like agents to ask for explicit permission before making any visible GitHub changes, to reduce noise.

This PR updates AGENTS.md to require action-specific approval before writing to GitHub.

When I asked copilot to create this PR, heres what I got (Good bot):
Screenshot 2026-09-11 at 2 25 24 PM

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 11, 2026 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@kevinjqliu
kevinjqliu requested review from Fokko and geruh September 11, 2026 21:27

@rambleraptor rambleraptor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread AGENTS.md

## 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kevinjqliu

Copy link
Copy Markdown
Contributor Author

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

@kevinjqliu
kevinjqliu added this pull request to the merge queue Sep 12, 2026
Merged via the queue into main with commit 13d085e Sep 12, 2026
22 checks passed
@kevinjqliu
kevinjqliu deleted the kevinjqliu-github-write-approval branch September 12, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants