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]: System prompt mode switcher (Default/Light) #15457
I'm running a local model with 32k context and it works really well for my use case; however, OpenCode's system prompt is consuming ~10% of that context window. If we could get a configuration option to replace the default system prompt with the agent/model prompt we specify, that would solve this and all of the other related issues.
I opened #32315 before seeing this; it's the same mechanism from the opposite end, so I'll continue here and close mine as a duplicate.
This issue frames the switcher around a Light mode for small/local models. The same opt-in selector also solves the high-capability end — and #10927 (overspecification degrading reasoning in capable models), which is cited above, is exactly the case I have data for.
I prototyped a Frontier mode (the same idea as Light, just a different target): a prompt variant that pushes GPT/Claude-class models toward root-cause reasoning instead of "looks fine" conclusions. Measured with a within-session controlled A/B on a public code-review task (planetiler, last 10 commits, known seeded regressions) — same model, same agent prompt, same session, only the system prompt swapped:
bug (public-API silent semantic change)
baseline
frontier
reservoir polygon dropped
16.7%
62.5%
signed→unsigned comparison
16.7%
87.5%
compareTo ordering change
0%
50%
false positives
0
0
~45–71pp better recall at the same (zero) false-positive rate.
This reinforces the case for the switcher being a general mechanism rather than a single Light mode: the same option naturally carries Light (trim for small models) and Frontier (elevate for capable models), with Default unchanged.
I have a working branch for the Frontier end — the selector mechanism (~30 lines), two prompt files, unit tests, and an Apache-2.0 NOTICE for principles paraphrased from the Codex CLI prompts. Happy to adapt it to whatever config shape the maintainers prefer here (a mode/variant enum), or open a PR if there's interest in landing the mechanism with Default + one alternate to start.
My issue #39537 is a duplicate of this. I would like a config option to disable/replace system prompt in particular. Don't see any reason for prompts to be built-in, since Opencode is an open and highly customizable tools, in contrary to competitors.
Why not just let the user nuke everything from a certain agent session? Offering this OPENCODE_DISABLE_CLAUDE_CODE only as a global setting sort of diminishes this flag's capability.
There is a good chance a user might want all the circus and drama Calude Code has to offer on the same machine, esp. if it's a complex task (says a complex coding project or huge codebase, or both). But say another user (or the same user) at some point wants to just work with a few .txt/.md files in a directory and needs writing feedback, or so, it's absolutely bonkers in that case that OpenCode would still send something like git or node or whatever, unless the user completely shut that off via that flag.
I see issues closer to that have been closed before #1157#5637
Thanks for the detailed proposal! You're asking for a system prompt mode setting (Default/Light, and possibly Custom later), so smaller or local models, and people who want minimal prompting, don't pay for the full built-in prompts. Maintainers will consider it.
In the meantime, in OpenCode v2 (2.x) the base system prompt is already short. Giving an agent its own prompt replaces the default prompt completely, and the model-specific prompts (e.g. for Claude or GPT) are then left out too:
Activity
m-nelly commentedon Mar 3, 2026
I'm running a local model with 32k context and it works really well for my use case; however, OpenCode's system prompt is consuming ~10% of that context window. If we could get a configuration option to replace the default system prompt with the agent/model prompt we specify, that would solve this and all of the other related issues.
okuyam2y commentedon Jun 14, 2026
I opened #32315 before seeing this; it's the same mechanism from the opposite end, so I'll continue here and close mine as a duplicate.
This issue frames the switcher around a
Lightmode for small/local models. The same opt-in selector also solves the high-capability end — and #10927 (overspecification degrading reasoning in capable models), which is cited above, is exactly the case I have data for.I prototyped a
Frontiermode (the same idea asLight, just a different target): a prompt variant that pushes GPT/Claude-class models toward root-cause reasoning instead of "looks fine" conclusions. Measured with a within-session controlled A/B on a public code-review task (planetiler, last 10 commits, known seeded regressions) — same model, same agent prompt, same session, only the system prompt swapped:~45–71pp better recall at the same (zero) false-positive rate.
This reinforces the case for the switcher being a general mechanism rather than a single
Lightmode: the same option naturally carriesLight(trim for small models) andFrontier(elevate for capable models), withDefaultunchanged.I have a working branch for the
Frontierend — the selector mechanism (~30 lines), two prompt files, unit tests, and an Apache-2.0 NOTICE for principles paraphrased from the Codex CLI prompts. Happy to adapt it to whatever config shape the maintainers prefer here (amode/variantenum), or open a PR if there's interest in landing the mechanism withDefault+ one alternate to start.thekk1 commentedon Jul 15, 2026
This would be a very welcome improvement for our local infrastrukture.
violog commentedon Aug 1, 2026
My issue #39537 is a duplicate of this. I would like a config option to disable/replace system prompt in particular. Don't see any reason for prompts to be built-in, since Opencode is an open and highly customizable tools, in contrary to competitors.
justauserid commentedon Sep 3, 2026
Why not just let the user nuke everything from a certain agent session? Offering this
OPENCODE_DISABLE_CLAUDE_CODEonly as a global setting sort of diminishes this flag's capability.There is a good chance a user might want all the circus and drama Calude Code has to offer on the same machine, esp. if it's a complex task (says a complex coding project or huge codebase, or both). But say another user (or the same user) at some point wants to just work with a few .txt/.md files in a directory and needs writing feedback, or so, it's absolutely bonkers in that case that OpenCode would still send something like git or node or whatever, unless the user completely shut that off via that flag.
I see issues closer to that have been closed before #1157 #5637
opencodejr commentedon Oct 29, 2026
Thanks for the detailed proposal! You're asking for a system prompt mode setting (Default/Light, and possibly Custom later), so smaller or local models, and people who want minimal prompting, don't pay for the full built-in prompts. Maintainers will consider it.
In the meantime, in OpenCode v2 (2.x) the base system prompt is already short. Giving an agent its own prompt replaces the default prompt completely, and the model-specific prompts (e.g. for Claude or GPT) are then left out too:
{ "agent": { "build": { "prompt": "{file:./prompts/minimal.txt}" } } }See the agent
promptdocs: https://opencode.ai/docs/agents/#promptRelated issues:
neriousy commentedon Nov 12, 2026
Thanks for the suggestion. This isn't something we plan to build, so closing to keep the tracker focused.