Summary
opencode run --agent NAME does exact-key lookup. After a plugin remaps config keys to display names, the original key is not found. Unknown names silently use default_agent instead of failing.
Repro
- Plugin registers the agent under display name Sisyphus - ultraworker and hides the config key sisyphus.
- opencode run --agent sisyphus ping
Actual
Default agent runs. Easy to miss in e2e (every --agent foo appears to pass as Sisyphus).
Expected
Unknown agent names error with the list of registered names. Optionally resolve case-insensitive / alias maps plugins can provide.
Suggested fix
Fail closed on unknown --agent. Allow plugins to register aliases (config key to registered name).
Summary
opencode run --agent NAME does exact-key lookup. After a plugin remaps config keys to display names, the original key is not found. Unknown names silently use default_agent instead of failing.
Repro
Actual
Default agent runs. Easy to miss in e2e (every --agent foo appears to pass as Sisyphus).
Expected
Unknown agent names error with the list of registered names. Optionally resolve case-insensitive / alias maps plugins can provide.
Suggested fix
Fail closed on unknown --agent. Allow plugins to register aliases (config key to registered name).