Skip to content

test(agent): lock in markdown frontmatter description propagation#28086

Draft
PeterPonyu wants to merge 1 commit into
anomalyco:devfrom
PeterPonyu:fix/opencode-27831-markdown-subagent-task-mode
Draft

test(agent): lock in markdown frontmatter description propagation#28086
PeterPonyu wants to merge 1 commit into
anomalyco:devfrom
PeterPonyu:fix/opencode-27831-markdown-subagent-task-mode

Conversation

@PeterPonyu
Copy link
Copy Markdown

@PeterPonyu PeterPonyu commented May 18, 2026

Issue for this PR

Closes #27831

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a regression test for #27831: custom markdown-defined subagents should surface their frontmatter description in Agent.list() and in the Task tool description, not the "should only be called manually by the user." fallback. The propagation chain under test is ConfigMarkdown.parse → mergeDeep into cfg.agent → agent.ts item assignment → describeTask render.

Test-only — no source changes. The test passes on current dev, so this locks in correct behavior. Four assertions:

  • frontmatter description appears in Agent.list()
  • it is not overridden by the fallback text in describeTask
  • agents with no description field still load (and description is undefined)
  • quoted descriptions containing a colon (e.g. "Searches for relevant context: files, symbols, patterns") are preserved verbatim

How did you verify your code works?

cd packages/opencode && bun test test/agent/markdown-agent-description.test.ts — 4 pass, 0 fail.

Screenshots / recordings

N/A — no UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…omalyco#27831)

Adds regression test covering the propagation chain reported in anomalyco#27831:
markdown agent files with `description` in frontmatter should surface in
Agent.list() and not be overridden by the "should only be called manually"
fallback text used by the Task tool.

Four assertions covering:
- frontmatter description appears in Agent.list()
- it is not overridden by the describeTask fallback
- agents without a description still load (description = undefined)
- description values containing a colon (quoted) are preserved

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom markdown-defined subagents show "should only be called manually" in Task tool despite having description in frontmatter

1 participant