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
Custom primary agent mode name not shown in system-reminder notification #38643
When switching to a custom primary agent (defined via .opencode/agents/*.md or opencode.json's agent field), the system reminder notification always shows either "build" or "plan" instead of the actual custom agent name.
Steps to reproduce
Create a custom primary agent, e.g. .opencode/agents/manual.md
Press Tab to cycle through agents: build → plan → manual
Observe the <system-reminder> notification
Expected behavior
The notification should say something like:
Your operational mode has changed from plan to manual.
Actual behavior
It says:
Your operational mode has changed from plan to build.
This means the notification falls back to "build" for any unrecognized custom primary agent name, which is misleading for both the user and the LLM.
Impact
Custom primary agents work correctly (permissions, prompt) but the misleading notification text may confuse the LLM into thinking it's in build mode, potentially affecting its conservative/aggressive behavior.
Plugins
None, just the original version.
OpenCode version
1.18.4
Steps to reproduce
Create .opencode/agents/manual.md (or any custom primary agent)
Press Tab to cycle: build → plan → manual
The always says "build" or "plan", never "manual", and "manual" will be recognized as "plan" by OpenCode
Related: in a session using "alibaba-token-plan/qwen3.8-max-preview" (OpenCode 1.18.4, Windows 10), the injected a full Kimi K2.6 identity block ("You are Kimi, an AI assistant powered by Kimi K2.6, trained by Moonshot AI"), a model I've never used or configured. The system prompt's own identity line was correct ("You are powered by the model named qwen3.8-max-preview"), so the bug is specifically in the mid-session reminder, not initial prompt generation.
I only noticed it because the model mentioned it in a thinking trace twice during a long session, always with the same wording: "The user seems to have just provided a system reminder with my identity information. This appears to be a continuation of the previous conversation where I was..." (followed by a recap of the task it was mid-way through).
Adding it here because it's the same class of bug: the reminder mechanism is pulling the wrong identity template.
Activity
github-actions commentedon Jul 24, 2026
This issue might be a duplicate of existing issues. Please check:
SessionRemindersuses the wrong logic to determine which agent the previous turn was, causing the system-reminder to show an incorrect agent name (e.g. "build" instead of the actual custom primary agent name) when custom primary agents are in use. That issue includes a detailed analysis and a linked PR with a fix.jessie-amaranthine commentedon Jul 25, 2026
Related: in a session using "alibaba-token-plan/qwen3.8-max-preview" (OpenCode 1.18.4, Windows 10), the injected a full Kimi K2.6 identity block ("You are Kimi, an AI assistant powered by Kimi K2.6, trained by Moonshot AI"), a model I've never used or configured. The system prompt's own identity line was correct ("You are powered by the model named qwen3.8-max-preview"), so the bug is specifically in the mid-session reminder, not initial prompt generation.
I only noticed it because the model mentioned it in a thinking trace twice during a long session, always with the same wording: "The user seems to have just provided a system reminder with my identity information. This appears to be a continuation of the previous conversation where I was..." (followed by a recap of the task it was mid-way through).
Adding it here because it's the same class of bug: the reminder mechanism is pulling the wrong identity template.
github-actions commentedon Sep 25, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.