anomalyco / anomalyco/opencode

opencode run --agent should fail closed on unknown names

Open
#47,038 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Plugin registers the agent under display name Sisyphus - ultraworker and hides the config key sisyphus.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.