通过分析 JSONL 调试日志,快速定位聊天代理异常、耗时与调用原因
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "troubleshoot" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/extensions/copilot/assets/prompts/skills/troubleshoot/SKILL.md 2. 保存为 ~/.claude/skills/troubleshoot/SKILL.md 3. 装好后重载技能,告诉我可以用了
请分析这份 JSONL 调试日志,说明这次请求为什么这么慢。请按时间线列出各阶段耗时,并指出最主要的延迟来源和可行优化建议。
一份按时间线整理的耗时分析,包含瓶颈定位与优化建议。
根据这份 JSONL 调试日志,解释为什么代理没有调用预期的工具。请指出相关判断依据、触发条件是否满足,以及被跳过的具体原因。
对工具未被调用原因的清晰说明,并标出关键日志证据。
请检查这份 JSONL 调试日志,分析为什么某个技能、子代理或系统指令没有成功加载。请给出加载流程中的失败点、影响范围和修复建议。
一份加载失败排查报告,包含失败节点、影响说明与修复方向。
This skill investigates and explains unexpected chat agent behavior using direct log files.
Use this skill for questions like:
Base conclusions on evidence from logs. Do not guess.
{{VSCODE_TARGET_SESSION_LOG}}Use direct debug log files written by Copilot Chat:
debug-logs/<sessionId>/
main.jsonl — always start here; primary conversation log
models.json — (optional) snapshot of available models at session start
system_prompt_0.json — (optional) full system prompt sent to the model (untruncated)
system_prompt_1.json — (optional) written when the model changes mid-session
tools_0.json — (optional) tool definitions sent to the model
tools_1.json — (optional) written when the model changes mid-session
runSubagent-<agentName>-<uuid>.jsonl — (optional) subagent's tool calls & LLM requests
searchSubagent-<uuid>.jsonl — (optional) search subagent work
title-<uuid>.jsonl — (optional, UI-only) title generation
categorization-<uuid>.jsonl — (optional, UI-only) prompt categorization
summarize-<uuid>.jsonl — (optional, UI-only) conversation summarization
Always read first — it has the full conversation flow. Child files only appear when those operations occurred. contains entries that link to each child file by name. Title, categorization, and summarize files are UI housekeeping and rarely relevant to troubleshooting. When investigating model availability or selection issues, read — it contains the full list of models (with capabilities, billing, and limits) that were available when the session started.
main.jsonlmain.jsonlchild_session_refmodels.jsonWhen investigating what the model was told (system prompt, instructions), read the system_prompt_*.json file referenced by a system_prompt_ref entry in main.jsonl. The file contains the full untruncated system prompt as { "content": "..." }. When investigating which tools were available, read the tools_*.json file similarly. If the model changed mid-session, multiple numbered files exist — each llm_request entry has a systemPromptFile attr indicating which file was active for that request.
Each line is a JSON object. Common fields: ts (epoch ms), dur (duration ms), sid (session ID), type, name, spanId, parentSpanId, status (ok|error), attrs (type-specific details).
{"ts":1773200251309,"dur":0,"sid":"62f52dec","type":"discovery","name":"Load Instructions","spanId":"2cb1f2f4","status":"ok","attrs":{"details":"Resolved 0 instructions in 0.0ms | folders: [/c:/Users/user/.copilot/instructions, /workspace/.github/instructions]","category":"discovery","source":"core"}}
{"ts":1773200251415,"dur":0,"sid":"62f52dec","type":"discovery","name":"Load Agents","spanId":"38a897d8","status":"ok","attrs":{"details":"Resolved 3 agents in 0.0ms | loaded: [Plan, Ask, Explore] | folders: [/workspace/.github/agents]","category":"discovery","source":"core"}}
{"ts":1773200251431,"dur":0,"sid":"62f52dec","type":"discovery","name":"Load Skills","spanId":"472eb225","status":"ok","attrs":{"details":"Resolved 6 skills in 0.0ms | loaded: [agent-customization, troubleshoot, ...]","category":"discovery","source":"core"}}
Key attrs: details (human-readable summary with folder paths, loaded items, skip reasons), category (always "discovery"), source ("core").
…
帮助开发者验证 Azure DevOps 流水线改动,快速排查构建与 YAML 配置问题。
帮助你用 jq 检索并分析历史会话日志,快速定位上下文与问题线索。