Skip to content

docs: describe agent creation without the removed CLI command - #57419

Merged
Tarquinen merged 2 commits into
anomalyco:devfrom
aniruddhaadak80:fix/docs-agent-commands
Oct 21, 2026
Merged

Tarquinen merged 2 commits into
anomalyco:devfrom
aniruddhaadak80:fix/docs-agent-commands

Conversation

@aniruddhaadak80

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #57406

Type of change

  • Bug fix
  • Documentation

What does this PR do?

opencode agent create and opencode agent list are documented on the CLI and Agents pages, but the v2 CLI has no agent command. Running either prints:

ERROR Unexpected positional argument: "create"
  • packages/web/src/content/docs/cli.mdx: remove the agent command section (create flags and list).
  • packages/web/src/content/docs/agents.mdx: replace the interactive agent create instructions with the supported workflow — add a markdown file under .opencode/agents/ or ~/.config/opencode/agents/ — and point at the existing Markdown section that documents the file format.
  • packages/web/src/content/docs/agents.mdx: mention opencode debug agents, which prints the agents OpenCode has loaded.

The locale copies under packages/web/src/content/docs/<locale>/ still describe the removed commands; I left them alone because translations are synced separately.

How did you verify your code works?

  • opencode agent create returns Unexpected positional argument: "create" on v2.1.0, and the command map in packages/cli/src/index.ts has no agent entry.
  • opencode debug agents is registered (debug.agents) and lists the loaded agent catalog.
  • bunx prettier --check passes on both edited files.

Screenshots / recordings

Not a UI change.

Checklist

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

`opencode agent create` and `opencode agent list` are documented on the CLI
and Agents pages, but the v2 CLI has no `agent` command, so both fail with
"Unexpected positional argument". Remove the stale CLI reference and document
creating an agent as a markdown file, with `opencode debug agents` to list the
agents OpenCode has loaded.
Copilot AI balanced review requested due to automatic review settings October 20, 2026 14:14

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.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@github-actions

Copy link
Copy Markdown
Contributor

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

@opencode-agent opencode-agent Bot 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.

Looks good. The v2 CLI has no agent command (only debug agents), and the new text matches what v2 actually loads: markdown files under {agent,agents}/ in the project .opencode/ folder or the global config folder, with the #markdown link pointing to the existing section. opencode debug agents does list the loaded agents. Nothing was run because this only changes docs. No other English docs page still mentions opencode agent. The translated pages still describe the command, as the description notes.

Public API: unchanged (docs only).

@Tarquinen

Copy link
Copy Markdown
Member

translation sync ci hasn't run in a while so doing this manually for now

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.

[Bug / Docs]: CLI command "opencode agent create" returns "Unexpected positional argument: create"

3 participants