Skip to content

Agent scanning from .opencode/agents/ silently drops files — only ~119 of 184 register #27988

@Moe1211

Description

@Moe1211

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

  1. Place 184 agent .md files into ~/.config/opencode/.opencode/agents/ (184 is approximate — any number above ~120 triggers this)
  2. Run opencode agent list
  3. Count the registered agents
  4. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

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