Skip to content

Custom primary agent mode name not shown in system-reminder notification #38643

Closed as not planned

Description

@FlyFeathers

Description

Description

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

  1. Create a custom primary agent, e.g. .opencode/agents/manual.md
  2. Press Tab to cycle through agents: build → plan → manual
  3. 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

  1. Create .opencode/agents/manual.md (or any custom primary agent)
  2. Press Tab to cycle: build → plan → manual
  3. The always says "build" or "plan", never "manual", and "manual" will be recognized as "plan" by OpenCode

Screenshot and/or share link

No response

Operating System

Windows 10

Terminal

Windows Terminal

Activity

  1. github-actions commented on Jul 24, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. jessie-amaranthine commented on Jul 25, 2026

    @jessie-amaranthine

    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.

  3. github-actions commented on Sep 25, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions