Skip to content

fix(opencode): fail closed on unknown --agent - #53058

Closed
kvnloo wants to merge 3 commits into
anomalyco:devfrom
kvnloo:fix/run-agent-fail-closed-v3
Closed

kvnloo wants to merge 3 commits into
anomalyco:devfrom
kvnloo:fix/run-agent-fail-closed-v3

Conversation

@kvnloo

@kvnloo kvnloo commented Oct 4, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #47038

Type of change

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

What does this PR do?

"opencode run --agent NAME" currently falls back to the default agent when the requested agent is unknown or is a subagent.

Fail closed instead. Exact and case-insensitive primary-agent names still resolve normally.

Based on #47091 by @RaviTharuma.

How did you verify your code works?

"cd packages/opencode && bun test test/cli/run/agent-flag.test.ts"

Tests cover exact matching, case-insensitive matching, unknown agents, and subagent rejection.

Screenshots / recordings

N/A

Checklist

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

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Hey! Your PR title Fix/run agent fail closed v3 doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@kvnloo kvnloo changed the title Fix/run agent fail closed v3 fix(opencode): fail closed on unknown --agent Oct 4, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 72-hour window.

Feel free to open a new pull request that follows our guidelines.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 7, 2026
@github-actions github-actions Bot closed this Oct 7, 2026
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.

opencode run --agent should fail closed on unknown names

1 participant