Skip to content

fix: fail closed on unknown --agent - #47091

Closed
RaviTharuma wants to merge 10 commits into
anomalyco:devfrom
RaviTharuma:fix/run-agent-fail-closed-v2
Closed

RaviTharuma wants to merge 10 commits into
anomalyco:devfrom
RaviTharuma:fix/run-agent-fail-closed-v2

Conversation

@RaviTharuma

Copy link
Copy Markdown

Issue for this PR

Closes #47038
Closes #47040

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

opencode run --agent NAME did an exact-key lookup. After a plugin remaps config keys to display names, the original key is missing and the CLI silently ran default_agent.

Unknown --agent values now error with the registered names. The --model/-m help text now says that a pin skips plugin fallback chains.

How did you verify your code works?

bun test packages/opencode/test/cli/run/agent-flag.test.ts on this branch (4 pass).

Screenshots / recordings

N/A — CLI change, no UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Copilot AI lite review requested due to automatic review settings September 3, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that --model/-m pins and disables plugin fallback opencode run --agent should fail closed on unknown names

2 participants