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]: Add visibility flags for merged config and system prompt #4960
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I'm working with instruction files and having difficulty understanding what's actually being loaded and processed. While the documentation mentions the merge strategy for configuration files, there's no way to verify the final merged state that the system is using.
There's some challenge in the black box of sending in inputs and observing outputs, even in a deterministic world. Worse with a non-deterministic model processing inputs. I've spent considerable time (see #2225) trying to understand why certain instructions aren't being acted upon, but without visibility into the system prompt or final configuration, it's difficult to reason about the cause.
I put on my functional programming thinking cap (data flowing through a pipeline taking on different forms) to propose these two additions:
--config flag - Display the final merged configuration object as JSON. This would help verify that all configuration sources (global, project-local, etc.) are being combined correctly. Not correctly you, but correctly me.
--system-prompt flag - Show the fully-merged system prompt being passed to the model for a new session. This way I don't have to interrogate it. I know what it will be told.
Having these debugging tools would make it much easier to set up instruction files reliably and understand why the system behaves the way it does. Currently, the lack of visibility makes it difficult to distinguish between configuration issues and model behavior.
This appears to be a feature request about debugging and visibility for OpenCode's configuration and system prompts. Searching the repository for related issues...
The --system-prompt flag is really just knowing what you're actually communicating to the model. You have a /thinking toggle in the TUI. Alternately, a /prompting toggle would provide an unfiltered display of what you're actually saying to the model.
@rekram1-node I've implemented source attribution for debug config - it shows where each value comes from in a _sources object.
The merge process doesn't track sources, so I retraced config loading to avoid touching core code (~200 LOC). But it might be cleaner to add source tracking directly to the merge logic (~80 LOC).
Do you think the sources should be displayed by default or behind a --sources flag?
Activity
github-actions commentedon Dec 1, 2025
This appears to be a feature request about debugging and visibility for OpenCode's configuration and system prompts. Searching the repository for related issues...
github-actions commentedon Dec 1, 2025
Searching repository for related feature requests and issues...
github-actions commentedon Dec 1, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Dec 1, 2025
Yeah have a config debug command (
opencode debug config), rn it just shows your modifications if you have opencode.json files.I think we should adjust it to fully resolve all the different configs so youy have full visibility into everything
mlanza commentedon Dec 2, 2025
The
--system-promptflag is really just knowing what you're actually communicating to the model. You have a/thinkingtoggle in the TUI. Alternately, a/promptingtoggle would provide an unfiltered display of what you're actually saying to the model.will-marella commentedon Dec 6, 2025
@rekram1-node I've implemented source attribution for debug config - it shows where each value comes from in a _sources object.
The merge process doesn't track sources, so I retraced config loading to avoid touching core code (~200 LOC). But it might be cleaner to add source tracking directly to the merge logic (~80 LOC).
Do you think the sources should be displayed by default or behind a --sources flag?
mlanza commentedon Jan 15, 2026
I noticed
opencode debug configbasically does what I suggested in item 1. This was more important than item 2. Closing.