You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Opt-out for "NEVER commit changes unless the user explicitly asks you to." #24370
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
i like letting smart models like gpt manage my commits. i have a section on continuous commits in my global AGENTS.md.
however opencode currently hard-codes a rule in packages/opencode/src/tool/bash.txt:
Only create commits when requested by the user. If unclear, ask first.
...
- NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTANT to only commit when explicitly asked, otherwise the user will feel that you are being too proactive.
please make this configurable. i get the safety aspect and think the current default is sensible, but i would just like an opt-out.
Reacted by Eduard Hildebrandt, fgDevDarwin, Kimmo Lehto, Cecile Tonglet, Arnaud Rebts, Simon Knittel, Stijn van der Linden and Lau Kondrup
This is in almost every provider system prompt as well. Commits are very useful when you prompt the model to do them correctly, they allow for clean delimitation. 'Do not commit' shouldn't be mandatory
Agree. As written, this statement creates conflicting instructions in my workflow. Please remove it, or make it configurable. Thank you for your continued amazing work!
I have this issue too. I have thorough commit discipline rules in my AGENTS.md and they keep being ignored half the time, and I'm pretty sure it's because it conflicts with that section (the agent says so anyway.)
I would also like to have it opt-out.
I just stumbled over this after using OpenCode to refactor and move parts of my codebase. While doing so, all existing comments got removed even though they were still relevant.
Activity
github-actions commentedon Apr 25, 2026
This issue might be a duplicate of existing issues. Please check:
includeGitInstructionsconfig option to control git instruction injection in tool prompts #23014: Requests anincludeGitInstructionsconfig option to control git instruction injection in tool prompts (including the commit rules inbash.txt) — covers the same use case of opting out of the hardcoded commit instructions.bash.txtfor token savings, which would also make those instructions more configurable.Please review those issues to see if your request is already covered or can be addressed there.
CloudedQuartz commentedon Apr 26, 2026
This is in almost every provider system prompt as well. Commits are very useful when you prompt the model to do them correctly, they allow for clean delimitation. 'Do not commit' shouldn't be mandatory
hildebrandt commentedon Apr 30, 2026
Agree. As written, this statement creates conflicting instructions in my workflow. Please remove it, or make it configurable. Thank you for your continued amazing work!
gabrielwerneckms commentedon May 2, 2026
I have this issue too. I have thorough commit discipline rules in my AGENTS.md and they keep being ignored half the time, and I'm pretty sure it's because it conflicts with that section (the agent says so anyway.)
simonknittel commentedon May 19, 2026
I would also like to have it opt-out.
I just stumbled over this after using OpenCode to refactor and move parts of my codebase. While doing so, all existing comments got removed even though they were still relevant.
github-actions commentedon Jul 19, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.