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
Plugin-registered agent names with zero-width space (U+200B) prefixes leak into system prompt #21642
When a plugin registers agents with names containing zero-width space characters (U+200B), OpenCode passes these names verbatim into the system prompt's block. This causes the LLM to receive an agent name with invisible characters, e.g.:
Your designated identity for this session is "\u200BSisyphus".
The root cause is in the oh-my-openagent plugin, which uses \u200B (ZWSP) as sort prefixes to control agent ordering in the TUI dropdown (AGENT_LIST_SORT_PREFIXES in dist/index.js:61035). Each agent gets a different count of ZWSP prefixes (1× for Sisyphus, 2× for Hephaestus, 3× for Prometheus, 4× for Atlas). These prefixed names flow through remapAgentKeysToDisplayNames() into the agent config keys, which OpenCode then writes directly into the system prompt.
While this is primarily a plugin-side issue, OpenCode should defensively sanitize agent names before injecting them into system prompts — stripping zero-width and other invisible Unicode characters (U+200B, U+200C, U+200D, U+FEFF, etc.). This would protect against any plugin introducing similar issues in the future.
Plugins
oh-my-openagent@latest (v3.16.0)
OpenCode version
1.4.0
Steps to reproduce
Install oh-my-openagent plugin: add "oh-my-openagent@latest" to the plugin array in opencode.json
Start OpenCode and select any agent registered by the plugin (e.g. Sisyphus, Prometheus, Atlas)
Ask the agent: "What is your exact identity name? Show me the raw bytes."
Observe the system prompt contains ZWSP-prefixed agent names like "\u200BSisyphus" instead of "Sisyphus"
Alternatively, inspect the system prompt directly — the block will contain invisible characters before the agent name.
Activity
github-actions commentedon Jul 3, 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.