Skip to content

The 'excludeAgent' attribute must be an array. #277642

@CatsMiaow

Description

@CatsMiaow

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version:
Version: 1.106.0 (user setup)
Commit: ac4cbdf48759c7d8c3eb91ffe6bb04316e263c57
Date: 2025-11-11T16:02:25.943Z
Electron: 37.7.0
ElectronBuildId: 12597478
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26100
  • OS Version: Window 11, MacOS

Steps to Reproduce:

According to the GitHub blog guide above, the excludeAgent property in the instructions file should be provided as a string.

Image

private validateExcludeAgent(attributes: IHeaderAttribute[], report: (markers: IMarkerData) => void): undefined {
const attribute = attributes.find(attr => attr.key === PromptHeaderAttributes.excludeAgent);
if (!attribute) {
return;
}
if (attribute.value.type !== 'array') {
report(toMarker(localize('promptValidator.excludeAgentMustBeArray', "The 'excludeAgent' attribute must be an array."), attribute.value.range, MarkerSeverity.Error));
return;
}
}

Image

In the actual code logic, it throws an error if the value isn’t an array.
Providing the value as an array doesn’t cause a syntax error.
However, since the only valid values are code-review or coding-agent the input should be a string.
Otherwise, the guide should be updated to specify an array instead of a string.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugcandidateIssue identified as probable candidate for fixing in the next releasechat-promptsPrompt and Instruction files related issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions