OpenBMB/ChatDev · error · ValueError
missing closing delimiter
Error message
missing closing delimiter
What it means
After finding the opening '---', _parse_frontmatter scans for a matching closing '---' line; if none exists before EOF it raises ValueError('missing closing delimiter'). The YAML frontmatter block is unterminated.
Source
Thrown at entity/configs/node/skills.py:58
continue
if not isinstance(raw_description, str) or not raw_description.strip():
continue
discovered.append((raw_name.strip(), raw_description.strip()))
return discovered
def _parse_frontmatter(skill_file: Path) -> Mapping[str, object]:
text = skill_file.read_text(encoding="utf-8")
if not text.startswith("---"):
raise ValueError("missing frontmatter")
lines = text.splitlines()
end_idx = None
for idx in range(1, len(lines)):
if lines[idx].strip() == "---":
end_idx = idx
break
if end_idx is None:
raise ValueError("missing closing delimiter")
payload = "\n".join(lines[1:end_idx])
data = yaml.safe_load(payload) or {}
if not isinstance(data, Mapping):
raise ValueError("frontmatter must be a mapping")
return data
@dataclass
class AgentSkillSelectionConfig(BaseConfig):
name: str
FIELD_SPECS = {
"name": ConfigFieldSpec(
name="name",
display_name="Skill Name",
type_hint="str",
required=True,
description="Discovered skill name from the default repo-level skills directory.",View on GitHub (pinned to 4fb2db0ea9)
Solutions
- Add a closing '---' line after the YAML block on its own line
- Verify the file is complete (not truncated by a failed write or partial download)
- Run a quick lint: file must contain at least two lines equal to '---'
Example fix
# before --- name: my-skill # after --- name: my-skill ---
Defensive patterns
Strategy: validation
Validate before calling
lines = text.splitlines() assert any(l.strip() == '---' for l in lines[1:]), 'unterminated frontmatter'
Try / catch
try:
_discover_default_skills(skills_dir)
except ValueError as e:
if 'closing delimiter' in str(e):
# quarantine file, log, continue
... Prevention
- Lint that '---' appears at least twice
- Atomic-write skill files to avoid truncation
When it happens
Trigger: A skill markdown file with an opening '---' but no second '---' line terminating the frontmatter block.
Common situations: Truncated files; authors forgetting the closing delimiter; copy-paste that drops the last line; a horizontal-rule '---' being confused with delimiters mid-document after the real block was never closed.
Related errors
- missing frontmatter
- frontmatter must be a mapping
- skill name is required
- expected list of skill entries
- expected skill entry mapping or string
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/50b32421d85737cd.
Report an issue: GitHub.