This guide helps diagnose and fix common issues when using accessibility agents with GitHub Copilot CLI.
Run these commands in Copilot CLI to diagnose loading issues:
# Check if agents are loaded
/agent
# Check if skills are loaded
/skills list
# Check custom instructions status
/instructions
# Enable debug mode for detailed diagnostics
/troubleshoot/agentcommand shows empty list or only built-in agents (explore, task, general-purpose, code-review)- Custom agents don't appear in agent picker
- Agent mentioned in prompt is not recognized
Check agent file locations:
# Repository-level agents
ls -la .github/agents/*.agent.md
# User-level agents (global)
ls -la ~/.copilot/agents/*.agent.mdCheck file naming:
- Files MUST end in
.agent.md(not.mdalone) - Filename can only contain:
.,-,_,a-z,A-Z,0-9 - Example:
accessibility-lead.agent.md✓ - Example:
accessibility lead.agent.md✗ (space not allowed)
Check YAML frontmatter:
Every agent file must have valid YAML frontmatter with at least a description:
---
name: My Agent
description: What this agent does and when to use it
---The description is required. Without it, the agent won't load.
1. Restart CLI session:
Exit and restart copilot after adding new agents.
2. Trust the workspace:
On first launch in a directory, CLI asks if you trust the files. Choose "Yes" to enable custom agents.
3. Verify YAML syntax:
Common YAML errors that break agent loading:
# BAD - unquoted special characters
description: What's this agent for? # The apostrophe breaks YAML
# GOOD - quote strings with special characters
description: "What's this agent for?"4. Check character encoding:
Agent files must be UTF-8 encoded. Windows users: ensure your editor saves as UTF-8, not Windows-1252.
/skills listshows empty or missing skills- Agent can't access domain knowledge it should have
- "Skill not found" messages
Check skill directory structure:
Each skill must be a folder containing SKILL.md:
.github/skills/
├── accessibility-rules/
│ └── SKILL.md
├── web-scanning/
│ └── SKILL.md
└── cognitive-accessibility/
└── SKILL.md
Check SKILL.md format:
---
name: accessibility-rules
description: Cross-format document accessibility rule reference...
---
# Skill content here...Both name and description are required in skill files.
1. Reload skills:
/skills reload2. Verify skill folder naming:
- Folder names should be lowercase with hyphens
- Must match the
namein SKILL.md
3. Check skill location:
/skills infoThis shows where CLI is looking for skills and which ones are loaded.
Cause: Agent files may reference VS Code-specific tools that CLI doesn't support.
Expected behavior: CLI ignores unknown tool names. Core functionality works.
Tool alias mapping:
| Agent declares | CLI uses |
|---|---|
runSubagent |
agent |
readFile, Read |
read |
editFiles, Edit, Write |
edit |
textSearch, Grep, Glob |
search |
runInTerminal, Bash, shell |
execute |
getDiagnostics |
(not available in CLI) |
askQuestions |
(not available in CLI) |
Solution: This is informational only. Agents still work for their core tasks.
Cause: CLI needs approval for certain tools (edit, execute).
Solution: When prompted, choose:
1. Yes- approve this use2. Yes, and approve for session- approve all uses of this tool in current session
- Accessibility guidance not present in responses
- Agent behaves differently than in VS Code
- Custom rules not being followed
/instructionsThis shows which instruction files are being loaded.
Expected files:
.github/copilot-instructions.md- Any
.github/instructions/**/*.instructions.mdfiles
1. Check file exists:
cat .github/copilot-instructions.md2. Verify file is in git root:
Instructions files must be in the repository root's .github/ directory, not a subdirectory.
3. Check file size:
Instructions are limited to 8,000 characters. Very large files may be truncated.
Possible causes:
- Large instruction files
- Many skills loaded
- Complex agent prompts
Solutions:
- Use
/compactto compress conversation history - Disable unused skills with
/skills(toggle off) - Check context usage with
/context
/usageThis shows token consumption. High usage may indicate:
- Too many files included in context
- Overly detailed agent instructions
- Skills loading unnecessary content
# List available sessions
/resume
# Continue most recent local session
copilot --continue# Start fresh session
/clear
# Or exit and restart without --continue
copilotFor detailed diagnostics, enable agent debug logging in VS Code settings (these affect CLI too):
{
"github.copilot.chat.agentDebugLog.enabled": true,
"github.copilot.chat.agentDebugLog.fileLogging.enabled": true
}Then in CLI:
/troubleshootThis analyzes debug logs to identify why agents/instructions aren't loading.
Debug sessions can be exported as JSONL for sharing:
- Enable file logging (setting above)
- Run the problematic workflow
- Find logs in
~/.copilot/logs/ - Share the relevant
.jsonlfile for support
PowerShell version: CLI requires PowerShell v6+. Check with:
$PSVersionTable.PSVersionIf using Windows PowerShell 5.1, install PowerShell 7:
winget install Microsoft.PowerShellPath issues:
Ensure ~/.copilot/ resolves correctly. In PowerShell:
$HOME + "\.copilot\agents"
# Should show: C:\Users\YourName\.copilot\agentsPermissions: Agent files should be readable:
chmod 644 ~/.copilot/agents/*.agent.md
chmod 755 ~/.copilot/skills/*/
chmod 644 ~/.copilot/skills/*/SKILL.mdIf issues persist:
- Run
/feedbackin CLI to submit a bug report - Check GitHub Copilot CLI documentation
- Open an issue in the accessibility-agents repo
When reporting issues, include:
- CLI version (
copilot --version) - OS and version
- Output of
/agentand/skills list - Relevant error messages