Skip to content

opencode agent create uses wrong folder .opencode/agent/ instead of .opencode/agents/ (docs mismatch) #14410

@d-oit

Description

@d-oit

Description

What happened?

The opencode agent create CLI command creates agent markdown files in .opencode/agent/ (singular), but the official documentation at https://opencode.ai/docs/agents/ specifies the correct path as .opencode/agents/ (plural).

This means agents created via the CLI are silently ignored at runtime because the loader reads from .opencode/agents/ (plural) and never finds the files placed in .opencode/agent/ (singular).

Steps to reproduce

  1. Run opencode agent create in a project directory
  2. Observe that the CLI creates the agent file under .opencode/agent/<name>.md
  3. Open opencode — the agent does not appear in the agent list
  4. Manually move the file to .opencode/agents/<name>.md
  5. Open opencode again — the agent now appears correctly

Expected behavior

The opencode agent create command should create files in .opencode/agents/ (plural) to match:

Actual behavior

Files are created in .opencode/agent/ (singular), causing agents to be silently ignored. There is no error or warning to indicate the path mismatch.

Related

This is the same class of singular/plural path mismatch bug as the skills vs skill issue. The docs say agents/ (plural), the CLI writes to agent/ (singular).

Plugins

No response

OpenCode version

latest

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

debian

Terminal

bash

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)docs

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions