Copilot Session Troubleshooter
Explain unexpected Copilot CLI behavior from session-log evidence.
The skill clearly limits itself to the current Copilot CLI session and requires conclusions to be grounded in session logs; its data source and read mechanism are transparent, with no file writes, deletion, or external side effects. However, logs may contain prompts, tool arguments, and sensitive data, while redaction, data minimization, user confirmation, permission boundaries, and recovery guidance are absent, so points are deducted.
The workflow, event schema, log discovery, and failure feedback are fairly detailed, covering both ordinary session logs and local agent-host wire logs. However, there are no dedicated tests for the key paths, some discovery depends on a newest-modified-file heuristic, and cross-platform commands, log rotation, and large-log behavior remain unverified. The static ceiling prevents a higher score, so deductions are applied.
Triggers, Copilot CLI scope, non-fit cases, and the distinction between ordinary model/tool issues and transport issues are reasonably clear. However, operation depends on access to specific local log paths and terminal tooling, with limited guidance for remote hosts, nonstandard configurations, or Chinese-language users, so points are deducted.
The documentation is well layered across purpose, log discovery, formats, workflow, and response rules; the repository supplies MIT licensing, Microsoft attribution, and version information. The skill itself lacks a version, changelog, explicit maintenance owner or update path, installation notes, FAQs, and representative output examples, so points are deducted.
For explaining tool calls, latency, skill loading, and agent-host connection problems, the intended root-cause and remediation output is clear and potentially useful. However, there is no skill-specific reproducible output or verification record, and completeness depends on the log existing, matching the documented format, and being parsed correctly. The static ceiling therefore requires a conservative deduction.
The skill requires key claims to come from the event log and defines event fields and pairing rules, providing some auditability. The supplied CI and test files do not cover this SKILL.md's key paths, and there is no third-party execution evidence or sample-log reproduction, so only limited static verifiability is awarded.
- Logs may contain user prompts, tool arguments, or other sensitive information; the skill gives no redaction, retention, or minimization guidance before presenting findings.
- Selecting the most recently modified events or wire log can choose the wrong target during multiple sessions, rotation, or concurrent writes; the session path or identifier should be confirmed.
- The function depends on local Copilot CLI session logs and terminal access; it may fail for remote agent hosts, nonstandard user-data directories, or disabled logging.
- There are no skill-specific tests, sample logs, or changelog entries, so findings should be treated as assisted diagnosis and reviewed by the user.
What it does & when to use it
This skill investigates unexpected behavior in the current Copilot CLI agent session. It analyzes the session event log to explain slow requests, unusual tool usage, missing instructions or skills, and failed tool calls. For connection, timeout, or protocol symptoms, it can also inspect the local VS Code agent-host wire log. It is one of 61 skills bundled in the microsoft/vscode repository, which is licensed under MIT.
The skill locates the target events.jsonl file, checks its size, and reads it through the terminal with a streaming jq or Node.js pass. It counts event types, lists user messages, pairs tool starts with completions, calculates durations, checks failed results, and optionally analyzes VS Code agent-host AHP JSONL frames. It produces an evidence-based explanation of what happened, why it happened, and what to do next.
- A Copilot CLI user wants to know why a request took unusually long and needs turn or tool timing.
- A user wants to determine why a tool was called or not called and needs session evidence.
- An instruction, skill, or agent file did not load and the user needs the likely cause.
- A tool call failed and the user needs the associated failure result investigated.
- A local VS Code agent host is stuck connecting, timing out, or reporting protocol errors.
Pros & cons
- Requires conclusions to be supported by session-log evidence rather than guesses.
- Covers request latency, tool calls, loading failures, and tool errors.
- Uses a streaming approach suitable for large logs and includes event and duration analysis.
- Its scope is specifically the current Copilot CLI agent session, not arbitrary application logs.
- It requires terminal access and local filesystem access to the session logs.
- The wire log applies only to a local agent host and may be disabled by default in VS Code.
- The supplied source provides no test suite or standalone installation workflow.
How to install
The skill is part of the collection in https://github.com/microsoft/vscode at src/vs/sessions/skills/troubleshoot/SKILL.md. The supplied source does not document a standalone installation command for the collection or this skill, so no additional command can be stated accurately.
How to use
Use it in a Copilot CLI session with a concrete prompt such as “Why was this request so slow?”, “Why was this tool not used?”, or “Why did this skill fail to load?”. If the message provides a Session log path, investigate that path; otherwise discover the most recently modified session log as defined by the skill. Inspect the local VS Code wire log only when the symptom concerns the agent host or transport layer.