Context
.claude/settings.template.json is the permissions source every Claude seat's real .claude/settings.json is derived from (five Claude peers today). Its permissions.allow names the git verbs a seat may run without a prompt: git add, git commit, git checkout -b agent/*, git checkout dev, git fetch, git status, git log, git diff, git branch, git rev-list, git rev-parse, git merge-base, git show, git push --force-with-lease origin agent/*, plus the gh pr / gh issue reads. Discarding a seat's own uncommitted edits is not among them, and the force-push row names a branch prefix (agent/*) no seat uses any more (clio/*, ada/*, …).
The Problem
On 2026-09-26 the auto-mode classifier refused git checkout -- a.spec.mjs b.spec.mjs c.spec.mjs — three spec edits the seat had made minutes earlier in the same session — as "Irreversible Local Destruction", and its wording forbids the same outcome through any other route (Edit, stash, restore, re-issued flags). The seat cannot undo its own work-in-progress the way a developer does a dozen times a day; it must either design forward around the dead end or stop and ask the operator. The same layer judges every force push to a seat's own feature branch, although every PR is squash-merged to dev and a feature branch's history is the seat's alone. The operator approved both allowances on 2026-09-26 ("approved on my end"; "force pushes into feature branches are fine too => we squash merge every PR to dev") and asked for them to land in the template first, so all five seats inherit them, and for the real settings files to be updated from the template afterwards.
The Architectural Reality
.claude/settings.template.json — permissions.allow (the rows above) and permissions.deny (gh pr merge, force pushes to dev / main in both spellings, refspec pushes, plain pushes to dev / main, --no-verify, Workflow); the file also carries the rationale for the subagent / fan-out denial (AGENTS.md §swarm_topology_anchor).
- Deny rows win over allow rows, so a broad force-push allowance stays fenced by the existing
dev / main deny rows.
- The classifier is a layer above the rules: a command an allow row matches is not sent to it, which is what the denial text points at ("the user can add a Bash permission rule to their settings").
- The real per-seat
.claude/settings.json files are the operator's (security settings); they are updated from the template after this lands, not by this ticket.
- Structure map: N/A (repository configuration).
The Fix
In .claude/settings.template.json, in the file's existing glob style beside the other git rows:
"Bash(git checkout -- *)",
"Bash(git restore *)",
"Bash(git rebase *)",
"Bash(git push --force-with-lease origin *)",
"Bash(git push --force origin *)"
and the agent/*-scoped force-push row goes, superseded by the broad one. git checkout -- <paths> and git restore <paths> discard uncommitted changes to the named paths only. git rebase rewrites the seat's own branch history and is what a force push exists for; without it the allowance is half. The force-push rows cover feature branches only because permissions.deny already refuses --force* / -f pushes to dev* and main* and every refspec push — those deny rows stay exactly as they are. git stash stays out: a different outcome (parked work that can be forgotten) nobody asked for.
Contract Ledger Matrix
| Target surface |
Source of authority |
Proposed behavior |
Fallback |
Docs |
Evidence |
.claude/settings.template.json permissions.allow |
this ticket (operator-approved 2026-09-26) |
discard own working-tree edits, rebase the own branch, force-push the own feature branch — without a prompt; dev / main stay denied |
a seat whose real settings lag the template still meets the classifier and designs forward |
the template's rationale comment |
AC-1, AC-2 |
Decision Record impact
none — permission rows, no process or topology change; the squash-merge policy is the operator's standing practice.
Acceptance Criteria
Out of Scope
The per-seat settings files (the operator's); git stash; branch-creation rules (git checkout -b agent/* stays as it is).
Related
The classifier's denial pattern also refuses raw gh api graphql mutations (the MCP write tools are the route there) — same layer, separate rule, not this ticket.
Live latest-open sweep: the latest 20 open issues at 2026-09-26T10:27:22Z — no equivalent. A2A sweep: none. Memory Core sweep: not run — the facts are the template's own rows and the classifier's denial text. Own-assignment sweep: none. Structure map: N/A.
Origin Session ID: 26b775fe-f8d9-4258-809c-09d9e5ef8ed1
Retrieval Hint: query_raw_memories("settings template allow git checkout -- git restore rebase force push feature branch classifier")
Context
.claude/settings.template.jsonis the permissions source every Claude seat's real.claude/settings.jsonis derived from (five Claude peers today). Itspermissions.allownames the git verbs a seat may run without a prompt:git add,git commit,git checkout -b agent/*,git checkout dev,git fetch,git status,git log,git diff,git branch,git rev-list,git rev-parse,git merge-base,git show,git push --force-with-lease origin agent/*, plus thegh pr/gh issuereads. Discarding a seat's own uncommitted edits is not among them, and the force-push row names a branch prefix (agent/*) no seat uses any more (clio/*,ada/*, …).The Problem
On 2026-09-26 the auto-mode classifier refused
git checkout -- a.spec.mjs b.spec.mjs c.spec.mjs— three spec edits the seat had made minutes earlier in the same session — as "Irreversible Local Destruction", and its wording forbids the same outcome through any other route (Edit, stash, restore, re-issued flags). The seat cannot undo its own work-in-progress the way a developer does a dozen times a day; it must either design forward around the dead end or stop and ask the operator. The same layer judges every force push to a seat's own feature branch, although every PR is squash-merged todevand a feature branch's history is the seat's alone. The operator approved both allowances on 2026-09-26 ("approved on my end"; "force pushes into feature branches are fine too => we squash merge every PR to dev") and asked for them to land in the template first, so all five seats inherit them, and for the real settings files to be updated from the template afterwards.The Architectural Reality
.claude/settings.template.json—permissions.allow(the rows above) andpermissions.deny(gh pr merge, force pushes todev/mainin both spellings, refspec pushes, plain pushes todev/main,--no-verify,Workflow); the file also carries the rationale for the subagent / fan-out denial (AGENTS.md §swarm_topology_anchor).dev/maindeny rows..claude/settings.jsonfiles are the operator's (security settings); they are updated from the template after this lands, not by this ticket.The Fix
In
.claude/settings.template.json, in the file's existing glob style beside the other git rows:"Bash(git checkout -- *)", "Bash(git restore *)", "Bash(git rebase *)", "Bash(git push --force-with-lease origin *)", "Bash(git push --force origin *)"and the
agent/*-scoped force-push row goes, superseded by the broad one.git checkout -- <paths>andgit restore <paths>discard uncommitted changes to the named paths only.git rebaserewrites the seat's own branch history and is what a force push exists for; without it the allowance is half. The force-push rows cover feature branches only becausepermissions.denyalready refuses--force*/-fpushes todev*andmain*and every refspec push — those deny rows stay exactly as they are.git stashstays out: a different outcome (parked work that can be forgotten) nobody asked for.Contract Ledger Matrix
.claude/settings.template.jsonpermissions.allowdev/mainstay deniedDecision Record impact
none — permission rows, no process or topology change; the squash-merge policy is the operator's standing practice.
Acceptance Criteria
.claude/settings.template.jsoncarriesBash(git checkout -- *),Bash(git restore *),Bash(git rebase *),Bash(git push --force-with-lease origin *)andBash(git push --force origin *)inpermissions.allowbeside the existing git rows, theagent/*force-push row removed, everydev/maindeny row unchanged, and the file still parses as JSON..claude/settings.jsonfiles are updated from the template by the operator afterwards.Out of Scope
The per-seat settings files (the operator's);
git stash; branch-creation rules (git checkout -b agent/*stays as it is).Related
The classifier's denial pattern also refuses raw
gh api graphqlmutations (the MCP write tools are the route there) — same layer, separate rule, not this ticket.Live latest-open sweep: the latest 20 open issues at 2026-09-26T10:27:22Z — no equivalent. A2A sweep: none. Memory Core sweep: not run — the facts are the template's own rows and the classifier's denial text. Own-assignment sweep: none. Structure map: N/A.
Origin Session ID: 26b775fe-f8d9-4258-809c-09d9e5ef8ed1 Retrieval Hint:
query_raw_memories("settings template allow git checkout -- git restore rebase force push feature branch classifier")