Introduce session-scoped commit authorization#38
Conversation
Per-turn-only authorization made autonomous loop sessions impossible:
the safety rules voided any grant on the next turn, and the checked-in
"permissions.ask" pin on "git commit" forced a confirmation dialog that
no "allow" rule can override ("ask" outranks "allow" in Claude Code).
The pin itself was dropped in the previous commit; this one updates the
policy texts:
- safety-rules.md: add "Session-granted" as a third authorization
form: it persists across turns, covers only the operations it
names, is scoped to repo and branch, never covers history-rewriting
or publishing operations, and suspends on surprise. Replace the
advice to pin "git commit" in "permissions.ask" with its opposite.
- AGENTS.md, quick-reference-card.md, CLAUDE.md: update the echoes
of the rule.
- claude/commands/version-bumped.md: drop the stale reference to the
settings gate.
The secret-scan PreToolUse gate remains the hard backstop.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Introduces a third, session-scoped form of commit authorization in the safety guidelines, and updates repo docs/settings to remove a Claude Code permission pin that prevented autonomous commits under a valid grant.
Changes:
- Document “Session-granted” commit authorization, including scope/limits and suspension conditions.
- Update quick-reference and repo guidance (AGENTS.md/CLAUDE.md) to reflect the new authorization model.
- Remove the
Bash(git commit:*)permissions.askpin from.claude/settings.jsonand repointplansDirectoryto.agents/tasks.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
guidelines/safety-rules.md |
Adds session-granted authorization rules and updates guidance about Claude Code permission prompting. |
guidelines/quick-reference-card.md |
Updates the authorization summary to include session grants and exclude CLAUDE/memory sources. |
claude/commands/version-bumped.md |
Updates wording around commit authorization expectations for recovery behavior. |
CLAUDE.md |
Aligns repo-level guidance with the updated authorization model and references safety rules. |
AGENTS.md |
Updates the repo’s “commit and history safety” summary to include session grants and limits. |
.claude/settings.json |
Removes the permissions.ask pin for git commit and redirects plansDirectory to .agents/tasks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Restore the "git " prefix in the excluded-operations bullet. - Add the missing comma after "In Claude Code". - Reword the loop-prompt note to drop the ambiguous "current-prompt authorization" phrasing (also fixes the widow line). - Converge on "per-prompt request" in safety-rules.md and AGENTS.md, fixing the non-parallel grammar in the latter. - version-bumped.md: make the recovery sentence a full clause and restore "section" after the heading reference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c414bdf26
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- AGENTS.md: a session grant covers only the operations it names, so plain "git push" is grantable; only history rewrites and release operations (force-push, rebase, tag, release, PR merge) always stay per-action. Also list the skill-declared authorization form and reflow the paragraph. - CLAUDE.md: include the skill-declared "## Commit authorization" form in the authorization list. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Keeping plansDirectory = .agents/tasks is the maintainer's deliberate choice: approval artifacts stay visible beside the durable notes they precede. The dual-file convention now keys on lifecycle, not location: task files are committed, frontmatter-carrying, and meaningfully named; plan-mode files are untracked, frontmatter-less, and random-named, and are never staged, committed, or renamed. Task discovery explicitly skips files without status frontmatter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Use code spans and exact command names for operations in the session-grant limits and the AGENTS.md parenthetical. - "add ... to permissions.ask" instead of "pin ... into". - Reflow the session-grant examples so each quoted phrase stays on one line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
guidelines/safety-rules.md:76
- This list item wraps so the last line is just
`git push --force`.(a runt/widow-like line), which makes the bullet harder to scan. Reflow so the final command stays on the same line as the preceding clause.
- It covers only the operations it names: `git commit` does not
imply `git push`, and `git push` does not imply
`git push --force`.
What
guidelines/safety-rules.mdadds Session-granted as a third commit-authorization form: it persists across turns, covers only the operations it names, is scoped to the repository and branch it was given on, never covers history-rewriting or publishing operations (git push --force,git rebase,git tag,gh release create,gh pr merge), and suspends on surprise (a secret-scan hit, unexpected working-tree changes, unclear commit scope).Bash(git commit:*)inpermissions.askis replaced with its opposite, and the pin is removed from this repo's.claude/settings.json. In Claude Code, anaskrule outranks everyallowrule from every settings file, so the pin forced a confirmation dialog on each commit — even under a valid grant — and made autonomous sessions impossible.AGENTS.md,CLAUDE.md, andguidelines/quick-reference-card.mdare updated to match;claude/commands/version-bumped.mddrops its stale reference to the removed settings gate..claude/settings.jsonalso redirectsplansDirectoryto.agents/tasks(separate commit).Why
Per-turn-only authorization made long autonomous sessions (loops) impossible: a grant given in one prompt was void on the next turn by design, and the harness-side
askpin forced dialogs that no chat authorization can suppress. A session grant makes "you may commit throughout this session" effective across turns while keeping hard limits, per-action confirmation for history-rewriting operations, and the secret-scan PreToolUse gate as the unconditional backstop.Review notes
version.gradle.kts), no build applicable (Markdown + JSON only),review-docsreturned APPROVE WITH CHANGES with no Must-fix items.safety-rules.md, converging the six near-synonyms for per-prompt authorization on one term, restoring thegitprefix in the excluded-ops bullet, and re-adding "section" after the## Commit authorizationmention inversion-bumped.md.🤖 Generated with Claude Code