[FEATURE]: Unify provider system prompts #9333

Open
opened 2026-02-16 18:12:12 -05:00 by yindo · 3 comments
Owner

Originally created by @smola on GitHub (Feb 14, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

System prompts for Anthropic, Codex, and Gemini models are very different, in ways that might not have good justification with recent models. Some if it, like Gemini system prompt, seem to be just inheritance from prior work (e.g. imported from gemini-cli).

This makes all of them diverge in guidance: some have rules about OpenCode help and support, others don't, different tone, different tool usage guidance, etc.

I have been using a fork with OpenAI/Anthropic/Google models all using the default anthropic.txt system prompt. They all work just fine with it. In fact, the gemini.txt has some verifiable issues (see https://github.com/anomalyco/opencode/issues/10438).

So, to improve mainteinance and consistence across providers, I'm thinking a single baseline system prompt should be used for all providers. Where some divergences are demonstrably needed (e.g. via benchmark or any decent set of reproducible test cases), a lightweight templating system could be applied to have some conditionals (e.g. make some section conditional to certain provider, or certain tool being available).

Originally created by @smola on GitHub (Feb 14, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request System prompts for Anthropic, Codex, and Gemini models are very different, in ways that might not have good justification with recent models. Some if it, like Gemini system prompt, seem to be just inheritance from prior work (e.g. imported from gemini-cli). This makes all of them diverge in guidance: some have rules about OpenCode help and support, others don't, different tone, different tool usage guidance, etc. I have been using a fork with OpenAI/Anthropic/Google models all using the default anthropic.txt system prompt. They all work just fine with it. In fact, the `gemini.txt` has some verifiable issues (see https://github.com/anomalyco/opencode/issues/10438). So, to improve mainteinance and consistence across providers, I'm thinking a single baseline system prompt should be used for all providers. Where some divergences are demonstrably needed (e.g. via benchmark or any decent set of reproducible test cases), a lightweight templating system could be applied to have some conditionals (e.g. make some section conditional to certain provider, or certain tool being available).
yindo added the discussion label 2026-02-16 18:12:12 -05:00
Author
Owner

@smola commented on GitHub (Feb 16, 2026):

@ariane-emory Hey, I'd be curious to hear about objections to this proposal. Is there some principle such as trying to preserve per-provider prompts close to the vendor harness (e.g. gemini.txt close to gemini-cli)? I might be missing something about how the project currently sets the default prompts.

@smola commented on GitHub (Feb 16, 2026): @ariane-emory Hey, I'd be curious to hear about objections to this proposal. Is there some principle such as trying to preserve per-provider prompts close to the vendor harness (e.g. `gemini.txt` close to `gemini-cli`)? I might be missing something about how the project currently sets the default prompts.
Author
Owner

@ariane-emory commented on GitHub (Feb 16, 2026):

Yes, the prompts are specifically tailored to suit each model family. For instance, Anthropic blocks access to Claude Code subscriptions if the prompt contains the string "You are OpenCode", therefore the Anthropic block prompt specifically excludes this string, and the GPT models have access to an apply_patch tool on which they are trained and to which no other models have access.

There's no single prompt that would work well with every family of model, prompt engineering of specialized prompts for each model is needed to get the best results from them - really, we should probably have more of them than we do now.

@ariane-emory commented on GitHub (Feb 16, 2026): Yes, the prompts are specifically tailored to suit each model family. For instance, Anthropic blocks access to Claude Code subscriptions if the prompt contains the string "You are OpenCode", therefore the Anthropic block prompt specifically excludes this string, and the GPT models have access to an `apply_patch` tool on which they are trained and to which no other models have access. There's no single prompt that would work well with every family of model, prompt engineering of specialized prompts for each model is needed to get the best results from them - really, we should probably have more of them than we do now.
Author
Owner

@Hubedge commented on GitHub (Feb 16, 2026):

Sorry for being a bit off topic here, but this relates to how we handle model diversity.

People want to customize system prompt.

Anthropic / Gemini / GPT all have their tailor-made system prompts and they work well. But for the rest of the models, like Kimi K2.5 / GLM-5 / MiniMax M2.5, they are all very capable but the system prompt routed to them is too conservative and restrictive and these capable models never get the autonomy they deserve.

This table consolidates comparison of the 4 coding agent system prompts, generated by Gemini 3 Pro, and it is in line with my personal experience of using them.

Evaluation Dimension codex_header.txt gemini.txt anthropic.txt qwen.txt
1. Autonomy Level(Ability to make decisions without asking) 5.0 🏆 3.0 4.0 1.5
2. Low User Intervention(Minimizing "Should I proceed?" loops) 5.0 🏆 2.5 4.0 2.0
3. Context Awareness(Researching codebase before acting) 4.0 5.0 🏆 4.5 3.0
4. Safety & Engineering Discipline(Tests, linting, path safety, anti-malware) 2.0 5.0 🏆 3.5 4.0
5. Complex Task Planning(Managing multi-step, long-context goals) 3.0 4.0 5.0 🏆 1.0
6. Aesthetics & Creativity(UI/UX design, avoiding generic layouts) 5.0 🏆 2.0 1.5 1.0
7. Conciseness / Token Efficiency(Brevity of output, silence is golden) 4.0 2.0 3.0 5.0 🏆
Archetype / Role The Creative Partner The Strict Engineer The Project Manager The Silent Tool

If we unify to a lowest-common-denominator prompt (like the 'Silent Tool' archetype), we lose the power of these newer models.

I acknowledge the OpenCode team might not have the bandwidth to maintain per-model prompts for every emerging vendor. Allowing custom system prompts would solve this effectively—it empowers users to optimize for specific models (like Kimi or DeepSeek) without requiring the core team to maintain and validate 50+ different vendor files.

@Hubedge commented on GitHub (Feb 16, 2026): Sorry for being a bit off topic here, but this relates to how we handle model diversity. People want to customize system prompt. Anthropic / Gemini / GPT all have their tailor-made system prompts and they work well. But for the rest of the models, like Kimi K2.5 / GLM-5 / MiniMax M2.5, they are all very capable but [the system prompt](https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/session/prompt/qwen.txt) [routed to them](https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/session/system.ts) is too conservative and restrictive and these capable models never get the autonomy they deserve. This table consolidates comparison of the 4 coding agent system prompts, generated by Gemini 3 Pro, and it is in line with my personal experience of using them. Evaluation Dimension | codex_header.txt | gemini.txt | anthropic.txt| qwen.txt | --- | --- | --- | --- | --- | | 1. Autonomy Level(Ability to make decisions without asking) | 5.0 🏆 | 3.0 | 4.0 | 1.5 | | 2. Low User Intervention(Minimizing "Should I proceed?" loops) | 5.0 🏆 | 2.5 | 4.0 | 2.0 | | 3. Context Awareness(Researching codebase before acting) | 4.0 | 5.0 🏆 | 4.5 | 3.0 | | 4. Safety & Engineering Discipline(Tests, linting, path safety, anti-malware) | 2.0 | 5.0 🏆 | 3.5 | 4.0 | | 5. Complex Task Planning(Managing multi-step, long-context goals) | 3.0 | 4.0 | 5.0 🏆 | 1.0 | | 6. Aesthetics & Creativity(UI/UX design, avoiding generic layouts) | 5.0 🏆 | 2.0 | 1.5 | 1.0 | | 7. Conciseness / Token Efficiency(Brevity of output, silence is golden) | 4.0 | 2.0 | 3.0 | 5.0 🏆 | | Archetype / Role | The Creative Partner | The Strict Engineer | The Project Manager | The Silent Tool | If we unify to a lowest-common-denominator prompt (like the 'Silent Tool' archetype), we lose the power of these newer models. I acknowledge the OpenCode team might not have the bandwidth to maintain per-model prompts for every emerging vendor. Allowing custom system prompts would solve this effectively—it empowers users to optimize for specific models (like Kimi or DeepSeek) without requiring the core team to maintain and validate 50+ different vendor files.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9333