Agent SkillsasJEI/vscode › agent-host-logs

agent-host-logs

GitHub

用于分析 Agent Host 调试日志导出包,支持解压并解读 events.jsonl、AHP 流量及各类进程日志。指导用户按症状定位文件,追踪会话、工具调用及客户端交互状态,协助排查 AI 代理相关故障。

.github/skills/agent-host-logs/SKILL.md asJEI/vscode

触发场景

用户提供 ah-logs 或 ahp-logs 压缩包/文件夹 请求分析 Export Agent Host Debug Logs 导出的事件日志 需要解析 AHP JSONL 传输日志或 Agent Host.log

安装

npx skills add asJEI/vscode --skill agent-host-logs -g -y
更多选项

非标准路径

npx skills add https://github.com/asJEI/vscode/tree/main/.github/skills/agent-host-logs -g -y

不安装直接使用

npx skills use asJEI/vscode@agent-host-logs

指定 Agent (Claude Code)

npx skills add asJEI/vscode --skill agent-host-logs -a claude-code -g -y

安装 repo 全部 skill

npx skills add asJEI/vscode --all -g -y

预览 repo 内 skill

npx skills add asJEI/vscode --list

SKILL.md

Frontmatter
{
    "name": "agent-host-logs",
    "description": "Analyze Agent Host debug log exports. Use when given an ah-logs or ahp-logs zip\/folder, an Export Agent Host Debug Logs bundle, events.jsonl, AHP JSONL transport logs, Agent Host.log, remote-agenthost.log, or copilot-logs."
}

Agent Host Debug Logs

Use this skill to orient to bundles produced by Developer: Export Agent Host Debug Logs.... These are different from the normal timestamped Code OSS log directory.

Treat the bundle as sensitive: it can contain tokens, prompts, file contents, terminal output, paths, and settings. Keep analysis local and avoid quoting secrets or unrelated user content. Timestamps, event names, IDs, status values, and general property values are fine.

Open the Bundle

The export name usually starts with ah-logs and may be a zip or an already-unpacked folder. For a zip, use the bundled extractor:

python3 .github/skills/agent-host-logs/scripts/extract.py "<archive>.zip"

The final line gives the temporary extraction path. Work from that folder and delete only that exact folder when finished.

Files are collected best-effort, so a valid bundle may contain only some of these:

events.jsonl
Agent Host.log
Window.log
Shared.log
ahp/*.jsonl
copilot-logs/*.log
remote-agenthost.log

What the Files Mean

The basic flow is:

Window/client <-> AHP <-> Agent Host process <-> Copilot SDK
Path What it shows
events.jsonl Persisted Copilot SDK events for the selected session: turns, messages, tools, permissions, hooks, skills, and subagents. It can cover a much longer period than the other logs.
ahp/*.jsonl AHP traffic for a client connection. _ahpLog.dir is c2s or s2c; _ahpLog.ts is the wire timestamp. Use this to see requests, responses, subscriptions, actions, notifications, and client-visible ordering.
Agent Host.log Local Agent Host process behavior: startup, auth, sessions, provider events, tools, Git/worktrees, and host-side errors.
copilot-logs/*.log Copilot SDK process logs that mention the selected session ID. A process log may contain other sessions too.
Window.log Renderer/client behavior: connections, session adapters, UI state, permissions, rendering, and client-side errors.
Shared.log Shared-process activity. Usually secondary evidence and often noisy.
Agent Host (<name>).log Forwarded logs from a named remote Agent Host.
remote-agenthost.log A directly downloaded remote agenthost.log, when available.

How to Start

  1. List the files and note their sizes.
  2. Identify the reported symptom, approximate time, local or remote host, and any known session, chat, turn, request, or tool ID.
  3. Start with the file closest to the symptom:
    • Turn or provider behavior: events.jsonl
    • Client/server state or ordering: ahp/*.jsonl
    • Host implementation failure: Agent Host.log
    • SDK behavior: copilot-logs/*.log
    • UI behavior: Window.log
  4. Search by the known time or ID, then follow the same operation into the adjacent layer.

Useful correlation fields include the raw session ID, session/chat URI, turnId, interactionId, tool/request IDs, JSON-RPC request id, AHP serverSeq, and event id/parentId.

Important Tips

  • events.jsonl, Copilot SDK logs, and AHP timestamps are normally UTC. The plain .log files may use local machine time; remote logs may use another timezone.
  • An AHP log is connection-scoped and can contain multiple sessions. A Copilot SDK process log can also contain multiple sessions.
  • AHP files rotate as .jsonl, .1.jsonl, .2.jsonl, and so on. Use _ahpLog.ts to reconstruct order.
  • A subscribe result can contain a full snapshot; its contents did not necessarily change at subscription time.
  • _ahpLog.truncated: true means large values were omitted from that log record.
  • Warning or error severity alone does not prove causality. Look for the matching failed response, missing completion, or user-visible consequence.
  • Missing files are normal because export collection is best-effort.

版本历史

  • ce4db66 当前 2026-07-19 08:56

同 Skill 集合

.agents/skills/launch/SKILL.md
.github/skills/accessibility/SKILL.md
.github/skills/add-policy/SKILL.md
.github/skills/agent-host-e2e-tests/SKILL.md
.github/skills/author-contributions/SKILL.md
.github/skills/auto-perf-optimize/SKILL.md
.github/skills/azure-pipelines/SKILL.md
.github/skills/chat-customizations-editor/SKILL.md
.github/skills/chat-perf/SKILL.md
.github/skills/code-oss-logs/SKILL.md
.github/skills/component-fixtures/SKILL.md
.github/skills/cpu-profile-analysis/SKILL.md
.github/skills/design-philosophy/SKILL.md
.github/skills/fix-ci-failures/SKILL.md
.github/skills/fix-errors/SKILL.md
.github/skills/heap-snapshot-analysis/SKILL.md
.github/skills/hygiene/SKILL.md
.github/skills/integrated-browser/SKILL.md
.github/skills/integration-tests/SKILL.md
.github/skills/memory-leak-audit/SKILL.md
.github/skills/otel/SKILL.md
.github/skills/sessions/SKILL.md
.github/skills/smoke-tests/SKILL.md
.github/skills/symbolicate-crash-dump/SKILL.md
.github/skills/tool-rename-deprecation/SKILL.md
.github/skills/unit-tests/SKILL.md
.github/skills/update-screenshots/SKILL.md
.github/skills/ux-css-layout/SKILL.md
.github/skills/ux-theming/SKILL.md
.github/skills/vscode-dev-workbench/SKILL.md
extensions/copilot/.agents/skills/anthropic-sdk-upgrader/SKILL.md
extensions/copilot/.agents/skills/launch/SKILL.md
src/vs/sessions/skills/act-on-feedback/SKILL.md
src/vs/sessions/skills/code-review/SKILL.md
src/vs/sessions/skills/commit/SKILL.md
src/vs/sessions/skills/create-draft-pr/SKILL.md
src/vs/sessions/skills/create-pr/SKILL.md
src/vs/sessions/skills/fix-ci/SKILL.md
src/vs/sessions/skills/generate-run-commands/SKILL.md
src/vs/sessions/skills/merge/SKILL.md
src/vs/sessions/skills/sync-upstream/SKILL.md
src/vs/sessions/skills/sync/SKILL.md
src/vs/sessions/skills/troubleshoot/SKILL.md
src/vs/sessions/skills/update-pr/SKILL.md
src/vs/sessions/skills/update-skills/SKILL.md
extensions/copilot/.agents/skills/github-copilot-upgrader/SKILL.md

元信息

文件数
0
版本
ce4db66
Hash
da5ab841
收录时间
2026-07-19 08:56

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-20 14:17
浙ICP备14020137号-1 $访客地图$