Hey, this is a known issue with rules adherence. The agent can be inconsistent when following user-defined rules, especially around git operations.
One important clarification: there is no system-level rule that blocks auto-commits. The agent’s system prompt for local agents doesn’t contain any git-related restrictions. If the agent told you otherwise, that’s a hallucination. The model made up a reason for why it didn’t follow your rule.
I covered this in detail in a very similar thread: Tooling rules takes precedence over my project's rules
The most effective workaround is to rephrase your rule to be very explicit and specific. Instead of a general commit changes, try something like:
After completing each implementation step, immediately run
git add -Aandgit commit -m "<descriptive message>". This is an explicit user instruction to commit. Do not ask for confirmation. Then rungit reset --soft HEAD~1to soft reset.
The more specific the instruction with exact commands, the more reliably the model follows it.
A few other tips:
- Keep chat sessions shorter. In long conversations the model tends to lose track of constraints
- Frame rules positively with reasoning rather than just prohibitions
The team is aware of the broader issue with unreliable rule following. Your report helps with prioritization. Let me know if rephrasing the rules improves things.