Add a setting to disable background agents' auto-commit / auto-push / auto-PR (v2.1.198)
Feature request
v2.1.198 (July 1, 2026) introduced auto PR creation for background agents: per the release notes, a background agent that finishes code work in a worktree now auto-commits, auto-pushes, and auto-opens a draft PR — as a default behavior.
Problem: some of us run propose-only workflows, where agents produce changes but a human reviews, commits, and opens every PR. With this behavior on by default, a background agent finishing its work can push branches and open draft PRs on origin without the human in the loop. I could not find a settings key, /config option, or any documented way to turn it off (checked the settings docs and the v2.1.198 changelog/release notes).
Ask (either would work):
- A configuration key to disable the behavior — e.g.
backgroundAgents.autoCreatePr: false, ideally with separate knobs for auto-commit / auto-push / auto-PR — settable insettings.jsonand via/config; or - Have background agents respect existing permission deny rules (e.g.
Bash(git push:*)) so the behavior can be blocked with the current permission system.
Why it matters: pushing branches and opening PRs is outward-facing. For workflows where the human is the only one allowed to publish, a default-on publish step needs an off switch.
Environment: Claude Code v2.1.198, macOS (darwin).
3 Comments
+1 from a solo developer perspective.
I run a single-person game dev project with background jobs. The auto-PR behavior introduced in v2.1.198 creates pure friction:
The previous behavior (background job commits to worktree branch, user merges when ready) was already safe enough. Auto-pushing to origin and opening PRs without consent is overreach for solo workflows.
Minimum viable fix: a settings.json key like
backgroundAgents.autoCreatePr: false. Separate knobs for auto-commit / auto-push / auto-PR would be ideal as suggested in the issue description.Environment: Claude Code latest, Linux (debian), solo developer.
+1 — hit this today. A background job was asked to do something purely local (rewrite 3 commit messages via git rebase), and because it isolated the work in a worktree, it auto-pushed the result to origin without ever being asked — no review step, no heads-up, just a live push to a branch I didn't expect touched. Not great to clutter the teams git history with zombie branches.
Worth noting: setting
permissions.denyrules forgit push/gh pr createdoesn't reliably help here either, since it's unconfirmed whether background sessions actually respect them — which is effectively option 2 in this request. The only working workaround right now isworktree.bgIsolation: "none", which disables worktree isolation entirely just to get "ask before publish" back — trading away one safety net for the other. A dedicated toggle (or making background sessions honor existing deny rules) would let us keep both.Partial update: in a recent release the behavior changed so background sessions only open a draft PR when the task calls for one, and your own git instructions take precedence. If your
CLAUDE.md(or the task prompt) says you handle committing and pushing yourself, Claude leaves git to you and just reports where the work lives.Docs: https://code.claude.com/docs/en/agent-view
Release notes: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md
A hard settings key / deny-rule enforcement isn't there yet, so leaving this open for that part.
🤖 Generated with Claude Code