-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Description
Description
When running npx playwright init-agents --loop=vscode, the generated .agent.md files contain malformed YAML frontmatter that fails VS Code's agent file validation.
Problem:
The description field is generated as a multi-line string with improper YAML indentation:
This causes VS Code to report the error:
"Attribute 'using Playwright Examples' is not supported in VS Code agent files. Supported: argument-hint, description, handoffs, infer, model, name, target, tools."
Root Cause:
The init-agents command template doesn't validate generated YAML against VS Code's agent file schema. The multi-line description with embedded XML breaks YAML parsing.
Solution:
The description should be a single line.
Version
1.57.0
Steps to reproduce
- In the Playwright project directory, run
npx playwright init-agents --loop=vscodecommand in the terminal - Open any generated .agent.md file in VS Code (for example .github\agents\playwright-test-generator.agent.md)
- Observe red error underlines on the description field
Expected behavior
- The generated .md files pass VS Code's agent file schema validation
- Files open in VS Code without any error underlines or validation warnings
- All fields in the frontmatter conform to VS Code's supported agent file attributes
Actual behavior
- The generated .agent.md files contain malformed YAML in the description field
- The description is split across multiple lines with improper indentation and embedded XML examples
- VS Code displays red error underlines on the description content
- VS Code reports: "Attribute 'using Playwright Examples' is not supported in VS Code agent files"
- The agent files work functionally, but fail schema validation in the editor
Additional context
No response
Environment
Operating System: Windows
Node.js version: v24.13.0
npm version: 11.8.0
Playwright version: @playwright/test@^1.57.0
VS Code version: 1.108.2Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels