Inconsistency between docs and opencode agent create command #8613

Open
opened 2026-02-16 18:10:23 -05:00 by yindo · 1 comment
Owner

Originally created by @volker48 on GitHub (Feb 5, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

There is a singular vs plural mismatch between the docs and the agent creation CLI command. The docs show ~/.config/opencode/agents (plural) but the CLI command actually puts a new agent in ~/.config/opencode/agent (singular).

The good news is that the code is checking both locations for agents so things still work.

https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/config/config.ts#L384

The fix is easy enough by changing the CLI tool to align with the docs and for backwards compatibility we can leave the config AGENT_GLOB alone so nothing breaks.

CLI code:
https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L78

and

https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L102

Plugins

none

OpenCode version

1.1.51

Steps to reproduce

  1. Docs specify global path of ~/.config/opencode/agents as can be seen here https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/web/src/content/docs/agents.mdx?plain=1#L184
  2. CLI command for agent create puts new global agents in ~/.config/opencode/agent see code here https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L78 and https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L102

Screenshot and/or share link

No response

Operating System

macOS 26.2 (25C56)

Terminal

Ghostty

Originally created by @volker48 on GitHub (Feb 5, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description There is a singular vs plural mismatch between the docs and the agent creation CLI command. The docs show `~/.config/opencode/agents` (plural) but the CLI command actually puts a new agent in `~/.config/opencode/agent `(singular). The good news is that the code is checking both locations for agents so things still work. https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/config/config.ts#L384 The fix is easy enough by changing the CLI tool to align with the docs and for backwards compatibility we can leave the config AGENT_GLOB alone so nothing breaks. CLI code: https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L78 and https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L102 ### Plugins none ### OpenCode version 1.1.51 ### Steps to reproduce 1. Docs specify global path of `~/.config/opencode/agents` as can be seen here https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/web/src/content/docs/agents.mdx?plain=1#L184 2. CLI command for agent create puts new global agents in `~/.config/opencode/agent` see code here https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L78 and https://github.com/anomalyco/opencode/blob/1fe1457cfa0d908f2718bd6afee74ea7d8d3db0d/packages/opencode/src/cli/cmd/agent.ts#L102 ### Screenshot and/or share link _No response_ ### Operating System macOS 26.2 (25C56) ### Terminal Ghostty
yindo added the bugdocs labels 2026-02-16 18:10:23 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9819: Docs: Skill path mismatch - 'skills' (plural) vs 'skill' (singular)

This is a similar documentation/code inconsistency where docs specify plural paths but the code uses singular paths. The suggested approach in that issue (supporting both paths for backwards compatibility) would align well with your proposed fix here.

Feel free to ignore if this doesn't apply to your specific case.

@github-actions[bot] commented on GitHub (Feb 5, 2026): This issue might be a duplicate of existing issues. Please check: - #9819: Docs: Skill path mismatch - 'skills' (plural) vs 'skill' (singular) This is a similar documentation/code inconsistency where docs specify plural paths but the code uses singular paths. The suggested approach in that issue (supporting both paths for backwards compatibility) would align well with your proposed fix here. Feel free to ignore if this doesn't apply to your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8613