System prompt's `git commit --amend` rules cause unnecessary deliberation and may reject explicit user requests

Issue

When I ask the agent to amend my changes into the last commit — a routine, intentional request — the agent spent ~16 seconds in its thinking process deliberating whether it was “allowed” to do so. It went back and forth between following my explicit instruction and following a system prompt rule. The agent confirmed this is the exact verbatim text from the <committing-changes-with-git> section of the system prompt (searchable via Ctrl+F):

Avoid git commit --amend. ONLY use --amend when ALL conditions are met:

  1. User explicitly requested amend, OR commit SUCCEEDED but pre-commit hook auto-modified files that need including
  2. HEAD commit was created by you in this conversation (verify: git log -1 --format=‘%an %ae’)
  3. Commit has NOT been pushed to remote (verify: git status shows “Your branch is ahead”)

The problem is condition 2. When I say “amend this into the last commit,” I obviously mean my last commit — the one I just made. But because the agent didn’t author that commit, condition 2 fails, and the rule’s absolute language (“ONLY when ALL conditions are met”) creates a conflict with my explicit request.

In my case, the agent ultimately decided to proceed (correctly), but it:

  • Wasted ~16 seconds of thinking time deliberating
  • Wasted thinking tokens on the internal conflict
  • Could have just as easily refused my request entirely, depending on how strictly it interpreted the rule

Suggestion

The intent of condition 2 is clearly to prevent the agent from spontaneously deciding to amend commits it shouldn’t touch. But the current wording doesn’t distinguish between “the agent chose to amend on its own” vs. “the user explicitly asked to amend.” Consider rewording to something like:

  • Never amend a commit on your own initiative; always create a new commit unless the user asks to amend.
  • When the user explicitly requests an amend, verify the commit hasn’t been pushed to remote and warn if it wasn’t created in this conversation, but proceed with the user’s request.

This preserves the safety intent while not fighting the user’s explicit instructions.

Thanks for taking the time to share your feedback! I’ve passed it on to the team looking after the system prompt.