[FEATURE] Add a git-aware permission mode to the Shift+Tab cycle

Resolved 💬 4 comments Opened Mar 14, 2026 by bryan-gilbert Closed Apr 17, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I work across multiple open-source projects and want Claude to work efficiently within my project folder without interrupting me — but I still want to perform my own code reviews before anything hits the git repository.

Right now the permission mode cycle (Shift+Tab) offers:

  • Normal — prompt for everything
  • Plan — read-only planning
  • Auto-accept edits — accept file edits without prompting

There is no middle ground between "prompt for everything" and --dangerously-skip-permissions — and that flag name isn't just off-putting, it's accurate. It removes all guardrails, not just the ones that are actually in the way.

I've used Factory.ai which handles this well — it auto-allows operations within the working directory but prompts for anything outside it. The repo is already the unit of trust in every other developer tool. Claude Code should offer that as a selectable mode.

Proposed Solution

Add a new "Git-aware" mode to the Shift+Tab permission cycle:

Normal → Plan → Auto-accept edits → Git-aware → Normal

In Git-aware mode, Claude should:

  • Auto-allow file reads, writes, and edits within the repo working tree
  • Auto-allow read-only git commands: git status, git diff, git log
  • Prompt or block any git command that would remove the user's ability to review changes before they are recorded in the repository — including but not limited to git add, git commit, git push, git reset --hard, git rebase, and git stash pop
  • Prompt or block anything outside the working tree (system files, global package installs, network calls)

The guiding principle: Claude should not be able to take an action that bypasses the human's code review step. The user, not Claude, decides when code is ready to commit.

This mode should also be settable as a default in ~/.claude/settings.json with no per-project configuration required.

Alternative Solutions

I searched extensively before filing this. All related issues are either bug reports about permissions not persisting, or requests for a full bypass mode. None address a git-aware middle mode. Key related issues: #26345, #15898, #20093, #31604, #22292, #29285, #23109.

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

I'm working on an open-source project tracked in git. I ask Claude to refactor a module across several files. I want Claude to read, edit, and create files freely within the project — without asking me for permission on every operation. But when the work is done, I want to run git diff, review the changes myself, and decide what to stage and commit. Claude should never be able to run git add, git commit, or git push on my behalf.

Additional Context

This isn't about removing safety — it's about placing the safety checkpoint where it actually belongs: at the moment code enters version control. The user opts into this mode explicitly via Shift+Tab; it is not imposed automatically on git repos.

Most related issues are either bug reports (permissions not persisting when configured) or broad bypass requests (make --dangerously-skip-permissions easier to use). This request is neither. It's asking for a principled middle mode where the git repository defines the scope of automatic trust — matching how developers already think about project boundaries.

I searched extensively before filing this. Related but distinct issues:

  • #26345 — Permission dialog: add mid-granularity live controls (directory/session scoping)
  • #31604 — Feature Request: Simple Full Access permission toggle (closed as duplicate)
  • #22292 — Feature: Persistent permission preferences across sessions (locked)
  • #21080 — Permission 'don't ask again' not persisting across sessions (bug)
  • #11172 — "Always allow" settings not persisting to .claude/settings.local.json (bug)
  • #21290 — Permissions configuration files not persisting across sessions (bug)
  • #20093 — Add setting to enable bypassPermissions as a selectable runtime mode
  • #15898 — Feature Request: Add YOLO mode to Shift+Tab permission mode cycle
  • #29285 — Allow permanently trusting a directory (closed as duplicate of #23109)
  • #23109 — Trusted workspace patterns to skip trust prompt

Note: #15898 proposes adding YOLO/bypass mode to the Shift+Tab cycle. This request proposes a different addition — a git-aware mode that is neither fully permissive nor fully restrictive, but scoped to the developer's natural code review workflow.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗