Description
When 184 agent .md files are placed in ~/.config/opencode/.opencode/agents/, only ~119 appear in opencode agent list. The remaining ~65 are silently dropped — they are never registered and cannot be invoked as subagents.
The dropped agents consistently cluster at the alphabetical tail (from seo-specialist through zk-steward), suggesting a scanning buffer limit or premature termination during file discovery.
Steps to reproduce
- Place 184 agent
.md files into ~/.config/opencode/.opencode/agents/ (184 is approximate — any number above ~120 triggers this)
- Run
opencode agent list
- Count the registered agents
- Compare with
ls ~/.config/opencode/.opencode/agents/ | wc -l
Diagnostic evidence
=== Files on disk ===
184
=== Registered in runtime ===
119
=== First 10 missing ===
seo-specialist
short-video-editing-coach
social-media-strategist
software-architect
solidity-smart-contract-engineer
sprint-prioritizer
sre-site-reliability-engineer
studio-operations
studio-producer
study-abroad-advisor
...
zk-steward
Total missing: 65 agents (all from the alphabetical tail).
Agent file format
Each file has valid YAML frontmatter. Example from a file that fails to register:
---
name: UI Designer
description: Expert UI designer specializing in visual design systems, component libraries, and pixel-perfect interface creation.
mode: subagent
color: #9B59B6
---
Files that do register have identical frontmatter structure — no format difference.
Expected behavior
All 184 agent files with valid frontmatter appear in opencode agent list and are invocable.
Actual behavior
Only ~119 register. The rest are silently ignored — no warning, no error.
Environment
- OpenCode version: 1.15.3
- OS: macOS (Darwin)
- Config path:
~/.config/opencode/.opencode/agents/
Suspected cause
The truncation at a consistent alphabetical boundary suggests a fixed-size readdir buffer or a premature termination in the agent file scanner. Directories exceeding that size cause files beyond the cutoff to never be parsed.
Description
When 184 agent
.mdfiles are placed in~/.config/opencode/.opencode/agents/, only ~119 appear inopencode agent list. The remaining ~65 are silently dropped — they are never registered and cannot be invoked as subagents.The dropped agents consistently cluster at the alphabetical tail (from
seo-specialistthroughzk-steward), suggesting a scanning buffer limit or premature termination during file discovery.Steps to reproduce
.mdfiles into~/.config/opencode/.opencode/agents/(184 is approximate — any number above ~120 triggers this)opencode agent listls ~/.config/opencode/.opencode/agents/ | wc -lDiagnostic evidence
Total missing: 65 agents (all from the alphabetical tail).
Agent file format
Each file has valid YAML frontmatter. Example from a file that fails to register:
Files that do register have identical frontmatter structure — no format difference.
Expected behavior
All 184 agent files with valid frontmatter appear in
opencode agent listand are invocable.Actual behavior
Only ~119 register. The rest are silently ignored — no warning, no error.
Environment
~/.config/opencode/.opencode/agents/Suspected cause
The truncation at a consistent alphabetical boundary suggests a fixed-size readdir buffer or a premature termination in the agent file scanner. Directories exceeding that size cause files beyond the cutoff to never be parsed.