Skip to content

[FEATURE]: Remove hardcoded NEVER-commit rule from default/trinity system prompts #50579

Closed as not planned

Description

@CloudedQuartz

Problem

The default and trinity system prompts each carry a hardcoded, unconditional rule:

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.

Exact locations (v1.18.32, default branch):

  • packages/opencode/src/session/prompt/default.txt:76
  • packages/opencode/src/session/prompt/trinity.txt:78

This line fires on every default/trinity-model turn, with no opt-out. It contradicts users' own AGENTS.md commit workflows — e.g. continuous-commit disciplines where the user wants the agent to commit (or amend) as part of its normal loop without being asked each time. The system prompt wins over project instructions, so users cannot override this behavior from their own repo config.

Why removal is safe

The shell tool description (packages/opencode/src/tool/shell/shell.txt:14) already carries the softer safety default:

  • Only commit, amend, push, or create PRs when explicitly requested.

That one-liner keeps the conservative default (don't push unexpected commits) without the strident unconditional NEVER framing, and it lives at the tool level where users can reason about and override it. The system-prompt-level duplicate adds behavior conflict, not safety.

Measured burden context: the default system prompt is ~2k tokens; the issue with this line is behavior conflict (unconditionally overriding user commit workflows), not just tokens.

Related

Proposed change

  • Delete default.txt:76 and trinity.txt:78 (the two lines quoted above), one per file, nothing else.
  • Keep shell.txt:14 as-is as the remaining safety default.
  • Verified: the sentence appears nowhere else in the repo — no occurrences under packages/opencode/src/tool/, no snapshot tests or docs assert the literal text (only the two prompt files match).

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed write-up, @CloudedQuartz!

    This report is about OpenCode v1 (v1.18.32 and the packages/opencode/src/session/prompt/* paths). v1 now only gets fixes for critical bugs such as data loss, security problems or crashes, so this change is unlikely to be made there.

    If you can, please try v2 (the @opencode/cli package), which handles this differently:

    • The v2 default system prompt has no "NEVER commit" rule.
    • The line is still in the model-specific Trinity prompt (packages/core/src/plugin/system-prompt/trinity.txt), which is only used for Trinity models. Kimi models get a similar git rule.
    • These model-specific prompts are skipped for any agent that defines its own system prompt, so you can avoid them with a custom agent.

    Related issues you mentioned: #24370 (commit-policy tension), #15457 (prompt mode switcher) and #21345 (prompt size).

    If you think this is critical, or you see the same conflict with your AGENTS.md on v2, please reply here with the v2 version and the model you're using.

  2. CloudedQuartz commented on Oct 28, 2026

    @CloudedQuartz
    Author

    Same issue is present in V2 in certain models

  3. opencodejr commented on Oct 29, 2026

    @opencodejr
    Contributor

    Closing this as not planned. It's about the v1 system prompts, and v1 only gets fixes for critical bugs, so this won't change there. We left it open a day in case the same conflict also shows up on v2, but there hasn't been a reply.

    In v2 the default system prompt has no "NEVER commit" rule. Only the Trinity and Kimi prompts have a commit rule, and an agent with its own system prompt skips them. If one of those rules conflicts with your AGENTS.md commit workflow on v2, please open a new issue with your v2 version and model. Thanks again for the clear write-up, @CloudedQuartz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions