agent-host-logs

Analyze Agent Host debug log bundles for VS Code sessions.

190k|41.9k|Updated Sep 3, 2015
One-click install
npx skills add https://github.com/microsoft/vscode --skill agent-host-logs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-host-logs
Source: https://github.com/microsoft/vscode/tree/main/.github/skills/agent-host-logs
Command: npx skills add https://github.com/microsoft/vscode --skill agent-host-logs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Debugging Agent Host issues in VS Code requires correlating events across multiple log files, transports, and processes, which is time-consuming and error-prone without a structured approach.

Core Features & Use Cases

  • Bundle Extraction: Safely unpack ah-logs or ahp-logs zip archives into a temporary directory using a hardened Python extractor.
  • Log File Mapping: Identify the purpose of each file in the bundle, including events.jsonl, usage.jsonl, ahp/*.jsonl, agenthost*.log, and copilot-logs/*.log.
  • Correlation Guidance: Follow session IDs, turn IDs, and timestamps across the Window client, AHP transport, Agent Host process, and Copilot SDK layers.
  • Use Case: When a user reports a failed tool call or missing token usage, use this Skill to locate the relevant session in events.jsonl, trace the request through ahp/*.jsonl, and inspect the host-side behavior in agenthost*.log.

Quick Start

Analyze the attached ah-logs bundle to find why the last Copilot session failed and report the relevant session ID, turn ID, and root cause.

Frequently Asked Questions about agent-host-logs

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

FAQPage Schema
How do I analyze VS Code Agent Host debug logs?

Extract the ah-logs zip using the bundled Python script, then start with events.jsonl for turn and provider behavior. Follow session IDs, turnId, and timestamps across ahp/*.jsonl and agenthost*.log to trace the full request lifecycle.

What files are in an Agent Host debug log export?

A typical bundle contains events.jsonl, usage.jsonl, customizations.json, ahp/*.jsonl, agenthost*.log, copilot-logs/*.log, vscode-logs/Window/*.log, vscode-logs/Shared/*.log, and remote-agenthost.log. Collection is best-effort, so some files may be missing.

How to find token usage records in Agent Host logs?

Open usage.jsonl, which contains one record per model call with turnId, model name, input/output/cache tokens, and cumulative totalNanoAiu. This file is the only persistent per-call usage record because the SDK assistant.usage event is ephemeral.

Why are timestamps inconsistent across Agent Host log files?

events.jsonl, Copilot SDK logs, and AHP JSONL files use UTC timestamps, while plain .log files may use local machine time. Remote Agent Host logs may use a different timezone, so always confirm the timezone before correlating events.

Can I use this skill on remote Agent Host log bundles?

Yes. Remote bundles include Agent Host (<name>).log forwarded logs and a directly downloaded remote-agenthost.log. Treat them like local bundles but account for potential timezone differences and connection-scoped AHP logs.