troubleshoot

Diagnose unexpected chat agent behavior by analyzing Copilot debug logs in JSONL format.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/jimeh/hucode --skill troubleshoot-jimeh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: troubleshoot
Source: https://github.com/jimeh/hucode/tree/main/extensions/copilot/assets/prompts/skills/troubleshoot
Command: npx skills add https://github.com/jimeh/hucode --skill troubleshoot-jimeh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a Copilot chat agent behaves unexpectedly—slow requests, skipped tools, missing instructions, or failed tool calls—users have no easy way to find the root cause. This Skill investigates session debug logs to explain exactly what happened and why, based on evidence rather than guesswork. ## Core Features & Use Cases - Log-Based Root Cause Analysis: Parses JSONL debug logs (main.jsonl, subagent logs, system prompt and tool snapshots) to trace conversation flow, tool calls, and model requests. - Latency and Error Detection: Identifies slow events, failed tool calls, and discovery issues using terminal-based search with grep, jq, Select-String, or Node.js one-liners. - Customization Loading Diagnostics: Explains why instruction, skill, or agent files failed to load, including name mismatches and folder resolution problems. - Use Case: A user asks why their custom skill never loaded. The Skill searches the session log, finds a name mismatch between the folder and SKILL.md frontmatter, and provides the exact fix. ## Quick Start Ask the agent why your last Copilot request was slow or why a specific tool was not called, and it will analyze the session debug logs to explain the cause.

Frequently Asked Questions about troubleshoot

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find out why a Copilot request was slow?▼

Search the session debug log for events with high duration values, for example using jq to filter entries where dur exceeds 5000 milliseconds. Check llm_request entries for time-to-first-token and token counts to identify whether latency came from the model or a tool call.

Why did my custom skill or agent file not load in Copilot chat?▼

Check the discovery events in the session debug log, which report how many instructions, skills, and agents were resolved and from which folders. A common cause is a mismatch between the folder name and the name field in the file's frontmatter.

How to debug a failed tool call in Copilot chat?▼

Search the debug log for tool_call entries with status error to see the tool arguments and error message. Correlate the event with its parent span to see which model response triggered the call.

Can I use grep_search to search Copilot debug log files?▼

No, grep_search only works on workspace files and cannot access debug logs stored in user storage. Use run_in_terminal with grep or jq on macOS and Linux, or Select-String and Node.js one-liners on Windows.

What should I do when Copilot logs show network or authentication errors?▼

Run the github.copilot.debug.collectDiagnostics VS Code command, which returns a diagnostics report covering authentication status, network reachability, and proxy configuration. Use that report to pinpoint the connectivity issue before concluding.