anomalyco / anomalyco/opencode
opencode run --agent should fail closed on unknown names
Open
@nexxeln is already working on this.
Since Sep 3, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.