Skip to content

bug(agent-server): Playbooks show no description when allowed-tools uses Claude Code's comma-separated form — Pydantic rejects the string and the fallback nulls every field #2850

Closed

Description

@vybe

Summary

The Playbooks tab, the / autocomplete popup and the chat empty-state quick actions show "No description available" for every skill whose SKILL.md declares allowed-tools in Claude Code's canonical comma-separated form (allowed-tools: Read, Bash, Glob). The description is present in the frontmatter; the agent container's skill scanner rejects the record on that one field and re-adds the skill with only its directory name, so description, argument_hint and allowed_tools all come back null.

Because the string form is what Claude Code documents, what our own agent guide teaches (docs/TRINITY_COMPATIBLE_AGENT_GUIDE.md → "allowed-tools: Read, Grep, Glob"), and what the abilities marketplace wizards scaffold, a freshly created agent looks broken in the UI on first open. Only skills written in YAML list form (allowed-tools: [Read, Bash]) render.

Context

Observed 2026-09-16 on base image 0.9.5-rc3 (scanner unchanged on dev). A new 12-skill agent created from the marketplace rendered 0/12 descriptions. Spot-checking other running agents on the same instance: a 41-skill agent renders exactly the 7 skills written in list form; a 43-skill agent renders 37 of 43, again matching its list-form count. Marketplace-wide the string form outnumbers the list form roughly 3:1, so this is the default experience for wizard-generated agents, not an edge case.

Container log per skill, repeated on every /api/skills request:

WARNING:agent_server.routers.skills:Failed to parse skill at /home/developer/.claude/skills/brief/SKILL.md: 1 validation error for SkillInfo
allowed_tools
  Input should be a valid list [type=list_type, input_value='Read, Write, Edit, Bash, Glob', input_type=str]

Reproduction: create an agent whose SKILL.md frontmatter contains description: and allowed-tools: Read, Bash; open its Playbooks tab, or call GET /api/agents/{name}/playbooks; description is null. Change the field to allowed-tools: [Read, Bash] and the description appears.

Ruled out: the files are byte-identical between the repo and the container, have no BOM/CRLF, and the frontmatter parses cleanly with the scanner's own regex and hardened YAML loader. The failure is the model validation after parsing, and the fallback path discards every other parsed field along with the offending one.

Acceptance Criteria

  • A skill whose allowed-tools is a comma-separated string renders its description and argument hint in the Playbooks tab, the / popup and the empty-state quick actions
  • Both accepted forms (Read, Bash and [Read, Bash]) produce the same allowed_tools value in the /api/skills response, including entries like Bash(git:*) that contain parentheses
  • A single invalid frontmatter field no longer nulls the whole record: the other parsed fields (description, argument hint, automation, user-invocable) survive, and the skipped field is logged once, not once per request
  • Regression test covering the string form, the list form, and one malformed field
  • Release note states that the fix lives in the agent base image, so existing instances see it only after a base-image rebuild (the bug: Workspace composer '/' typeahead lists only part of an agent's skills #2213 trap)

Technical Notes

Scanner: docker/base-image/agent_server/routers/skills.py (SkillInfo model + scan_skills_directory), proxied by GET /api/agents/{name}/playbooks in src/backend/routers/agent_files.py; consumers are src/frontend/src/components/PlaybooksPanel.vue, src/frontend/src/composables/usePlaybookAutocomplete.js and src/frontend/src/components/chat/ChatEmptyState.vue. The agent-guide example and the marketplace scaffolds should stay as they are: the string form is the Claude Code contract.

Activity

  1. added
    priority-p0
    type-bug
    theme-devex
    complexity-low
    status-ready
    on Sep 16, 2026
  2. removed
    status-ready
    on Sep 16, 2026
  3. vybe commented on Sep 16, 2026

    @vybe
    ContributorAuthor

    /claim

  4. added
    status-in-progress
    on Sep 16, 2026
  5. github-actions commented on Sep 16, 2026

    @github-actions

    Claimed by @vybe. Label status-in-progress added.

    Next steps:

    1. Create branch: feature/2850-<short-slug>
    2. Implement the feature
    3. Open a PR with Fixes #2850
  6. added
    status-in-dev
    and removed
    status-in-progress
    on Sep 16, 2026
  7. removed
    status-in-dev
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-lowpriority-p0theme-devextype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions