Commit 8b7f473
fix: concatenate system prompt instead of push to preserve agent prompts
When using custom OpenCode agents (defined in ~/.config/opencode/agents/),
output.system.push() creates a second element in the system[] array.
OpenCode maps each element to a separate {role: 'system'} message,
and providers only respect the last one — which drops the agent prompt.
Fix: concatenate DCP prompt to system[0] instead of pushing a new element.
Tested: isolated A/B test confirmed push() breaks agent prompt,
concatenation preserves it.1 parent 11e3774 commit 8b7f473
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
0 commit comments