[MODEL] Sonnet 4.5 (default)

Resolved 💬 2 comments Opened Oct 28, 2025 by BoMadsen Closed Oct 28, 2025

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Claude ignored my instructions or configuration

What You Asked Claude to Do

I asked claude to perform the following task:
please plan the implementation of phase 6, create tasks for it detailed enough that you can implement them, and update @docs\admin.md with them.

What Claude Actually Did

  1. It performed the task
  2. It committed the changes to Git

Expected Behavior

It should only have performed the task, and not committed the changes. I have quite clearly stated in the CLAUDE.MD file that claude is not allowed to commit changes unless specifically instructed to do so, but despite this claude keeps committing changes unless I end each prompt with "do not commit".

I have the following section in the claude.md file:

Git Workflow

🚨 CRITICAL: NEVER COMMIT WITHOUT EXPLICIT USER INSTRUCTION 🚨

COMMIT PREVENTION RULES - READ CAREFULLY:

  1. NEVER commit after completing tasks
  2. NEVER commit after implementing features
  3. NEVER commit after fixing bugs
  4. NEVER commit after updating documentation
  5. NEVER commit as part of any workflow
  6. NEVER commit when user says "finish", "complete", "implement", or "do"
  7. ONLY commit when user explicitly uses words: "commit", "git commit", "commit changes", "commit this", "push"

ALWAYS STOP AND ASK:

  • After implementation: "Implementation complete. Would you like me to commit these changes?"
  • If ANY doubt: "Should I commit these changes, or would you like to review first?"

What User Says vs What To Do:

| User Says | What To Do |
|-----------|------------|
| "Implement task 2.3" | ✅ Implement, ❌ Do NOT commit, ✅ Ask if they want commit |
| "Implement task 2.3 and commit" | ✅ Implement, ✅ Commit |
| "Finish this feature" | ✅ Complete, ❌ Do NOT commit, ✅ Ask if they want commit |
| "Complete the implementation" | ✅ Complete, ❌ Do NOT commit, ✅ Ask if they want commit |
| "Commit the changes" | ✅ Commit (only this) |
| "Push this" | ✅ Commit and push |

Example Correct Workflow:

# User: "Implement task 2.3"
# You: [implement the feature]
# You: "✅ Task 2.3 complete. Files created:
#       - apps/web/components/checkout/StripeProvider.tsx
#       - Updated docs/stripe.md
#
#      Would you like me to commit these changes?"
# User: "yes, commit"
# You: [NOW commit with git]

# Feature branch (only when user requests)
git checkout -b feature/cart-improvements

# Commit with conventional commits (ONLY when user explicitly requests)
git commit -m "feat(cart): add quantity selector"

# Create PR against main (only when user requests)

Remember: Implementation ≠ Permission to Commit

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

_No response_

Claude Model

Sonnet

Relevant Conversation

Impact

Low - Minor inconvenience

Claude Code Version

2.0.27

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

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