Skip to content

opencode run --agent should fail closed on unknown names #47038

Description

@RaviTharuma

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).

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