agent-host-logs

Analyze Agent Host debug log export bundles to diagnose session, transport, and SDK issues.

Updated Apr 28, 2026
Ready to run
npx skills add https://github.com/CokiStudios/cokistudios.github.io --skill agent-host-logs-cokistudios
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: agent-host-logs
Source: https://github.com/CokiStudios/cokistudios.github.io/tree/main/vscode-src/.github/skills/agent-host-logs
Command: npx skills add https://github.com/CokiStudios/cokistudios.github.io --skill agent-host-logs-cokistudios

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Agent Host debug log exports contain many heterogeneous files (events.jsonl, AHP JSONL transport logs, agenthost.log, copilot-logs, renderer logs) with no obvious starting point, making root-cause analysis of agent session failures slow and error-prone. ## Core Features & Use Cases - Safe Bundle Extraction: Extract ah-logs zip archives with a hardened Python script that validates entry counts, sizes, paths, symlinks, and Windows portability before writing to a temp directory. - File-to-Symptom Mapping: Route investigation to the right file based on the symptom, whether turn behavior (events.jsonl), token usage (usage.jsonl), client/server ordering (ahp/.jsonl), host failures (agenthost.log), SDK behavior (copilot-logs), or UI issues (renderer.log). - Cross-Layer Correlation: Follow a single operation across the Window/client, AHP, Agent Host process, and Copilot SDK layers using session IDs, turnId, interactionId, JSON-RPC ids, and AHP serverSeq. - Use Case: Given an ah-logs zip from a user reporting a stuck agent turn, extract the bundle, locate the turnId in events.jsonl, then trace the same request through the AHP transport log and agenthost.log to find the missing completion. ## Quick Start Analyze this exported Agent Host debug logs zip and find why the agent turn stalled around the reported time.

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 Agent Host debug log exports?▼

Extract the ah-logs zip with the bundled extract.py script, then start from the file closest to the symptom: events.jsonl for turn behavior, ahp/*.jsonl for client/server ordering, or agenthost.log for host failures. Correlate across files using session IDs, turnId, and timestamps.

How to extract an ah-logs zip file safely?▼

Run python3 scripts/extract.py with the archive path. The script validates entry counts, sizes, paths, symlinks, and Windows reserved names before extracting to a temporary directory, and prints the extraction path on the final line.

What files are in an Agent Host debug log bundle?▼

Bundles may contain events.jsonl (SDK session events), usage.jsonl (per-call token usage), customizations.json (loaded skills and hooks), ahp/*.jsonl (transport traffic), agenthost*.log (host process logs), copilot-logs/*.log (SDK logs), and vscode-logs Window and Shared renderer logs. Missing files are normal since collection is best-effort.

Why is token usage missing from events.jsonl?▼

The SDK's assistant.usage event is ephemeral and never persisted to events.jsonl. Per-call token and credit usage is only recorded in usage.jsonl, which exists only when agent-host debug logging was enabled during the session.

Does an AHP log contain only one session?▼

No. An AHP log is connection-scoped and can contain traffic for multiple sessions. Copilot SDK process logs can also span multiple sessions, so filter by session ID, turnId, or interactionId when correlating events.

Why do log timestamps not line up across files?▼

events.jsonl, Copilot SDK logs, and AHP logs use UTC, while plain .log files may use local machine time and remote logs may use another timezone. Normalize timezones before correlating events across layers.