Claude Code 2.1.312 Halts Commits When No-AI Policies Are Present in Repos

·2026.11.03 11:26

Key point

Testing shows Claude Code 2.1.312 with Sonnet 5.5 halts commits when AGENTS.md or CLAUDE.md files enforce no-AI rules, though it may still provide code in chat.

Details

  • Claude Code 2.1.312 running Sonnet 5.5 was tested on a task to add a slugify() function to a Python repo under various no-AI contribution policies.
  • The agent refused to commit when AGENTS.md or CLAUDE.md files were present, citing the files as the reason for refusal.
  • In repos with only AI_POLICY.md and CONTRIBUTING.md, the agent found the policy, made no changes, and explained why, but still displayed a sample function in the chat.
  • A commit hook blocking AI credit lines caused the agent to stop before committing, though the hook can be bypassed with git commit --no-verify.
  • The agent refused to waive rules based on user insistence, stating only the project can waive them, and noted that these measures are agreements rather than hard locks.
  • A copy-ready template for AI_POLICY.md, AGENTS.md notes, PR templates, and commit hooks is available at aiparabellum.com.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.