troubleshoot
Investigate unexpected behavior in the current Copilot agent session by analyzing its event log. Use when the user asks why something happened, why a request…
от posit-dev★ 4 361 звезда на GitHub
Установить troubleshoot в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Troubleshoot
Purpose
This skill investigates and explains unexpected agent behavior in the current Copilot agent session using its on-disk event log.
Use this skill for questions like:
- Why did this request take so long?
- Why was a tool called (or not called)?
- Why did an instruction/skill/agent file not load?
- Why did a tool call fail?
- Why did the model not follow expectations?
Base every conclusion on evidence from the event log. Do not guess.
Locating the Session Log
The skill runs inside the session's agent, so the log is on the same machine. It lives outside the workspace — read it via the terminal (run_in_terminal), never grep_search.
- If a
Session log:path is provided with this message, use it. It may point to a session other than the current one (via#session) and may be comma-separated paths — investigate all of them and compare. - Sticky reference: if no path is on the current message but an earlier turn in this conversation already established a target (a
Session log:path, or a#session:reference), keep analyzing that same session for the follow-up. Do not fall back to self-discovery here — the newest log is the current session, which is the wrong one. Switch only if the user references a new session. - Otherwise, self-discover it: pick the most recently modified
events.jsonlunder${XDG_STATE_HOME:-$HOME}/.copilot/session-state/<sessionId>/— this skill is appending to the current session's log, so it's reliably newest. HonorXDG_STATE_HOME, else$HOME. - If none exists there, this isn't a Copilot session — tell the user the skill supports Copilot sessions only, and stop.
Data Source — events.jsonl
Each line is a JSON object sharing one envelope:
{ "type": "...", "id": "...", "parentId": "...", "agentId": "...", "timestamp": "ISO-8601", "data": { } }
type— the event kind (see below).id— unique event id.parentId— the chronologically preceding event, not a logical parent. It is a flat back-pointer over every event, not the user → turn → tool-call hierarchy. Do not treat it as a logical parent.agentId— present for sub-agent events; absent for the main agent and session-level events.timestamp— ISO-8601 time. Compute durations by differencing timestamps (e.g. a tool's start vs. its completion, a turn'sassistant.turn_startvs. theassistant.message).data— type-specific payload.
Event types (data.* fields)
session.start(once) —selectedModel,reasoningEffort.user.message—content;transformedContent(expanded prompt, when it differs).assistant.turn_start/assistant.turn_end—turnId; measure a turn's duration vs the followingassistant.message.assistant.message—model,outputTokens,content,reasoningText(thinking, when present),turnId,parentToolCallId(set ⇒ sub-agent turn spawned by that tool call).tool.execution_start—toolName,toolCallId,arguments,parentToolCallId(set ⇒ nested/sub-agent).tool.execution_complete—toolCallId(matches start),success,result. Pair with its start bytoolCallIdfor the full call + duration.session.shutdown(once, at end) —modelMetrics[*].usage,totalNanoAiu. Absent mid-session.- Other (
hook.*,permission.*,system.message) — inspectdataas needed.
Reconstructing the flow
Iterate records in order and rebuild the logical tree from context:
session.startis the root.- a
user.messagebegins a turn. - an
assistant.messageanswers the currentuser.message— unless it hasdata.parentToolCallId, in which case it belongs to the sub-agent spawned by that tool call. - a
tool.execution_startbelongs to the currentassistant.message— unless it hasdata.parentToolCallId, in which case it is nested under that parent tool call. - pair each
tool.execution_startwith itstool.execution_completebytoolCallId.
Secondary Source — Agent Host Wire Log (protocol communication)
events.jsonl is the primary source and answers almost every question on its own. A separate log captures the transport/protocol between VS Code and the agent host process — the JSON-RPC-style frames that drive sessions.
Use the wire log only when the symptom points at the agent host / transport itself, not the model or a tool. Reach for it when:
- the agent host won't start, or the session never begins;
- requests hang or time out, or the agent appears stuck "connecting" / unresponsive;
createSession/subscribefails, or expected updates/notifications never arrive;- you see RPC / protocol / connection errors.
Do not open it for ordinary "why did the model/tool do X" questions — events.jsonl already answers those. If `events.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл troubleshoot?
Investigate unexpected behavior in the current Copilot agent session by analyzing its event log. Use when the user asks why something happened, why a request was slow, why a tool was or was not used, or why instructions/skills/agents did not load.
Как установить скилл troubleshoot?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл troubleshoot запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
agent-skill-stack
GitHubFind, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
build-evidence-map
GitHubBuild an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
pinecone-rag
GitHubBuild production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
qdrant-monitoring-debugging
GitHubDiagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…