agent-host-logs

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

Updated Sep 3, 2026
One-click install
npx skills add https://github.com/az0512124155azz-sys/CodeForge --skill agent-host-logs-az0512124155azz-sys
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-host-logs
Source: https://github.com/az0512124155azz-sys/CodeForge/tree/main/.github/skills/agent-host-logs
Command: npx skills add https://github.com/az0512124155azz-sys/CodeForge --skill agent-host-logs-az0512124155azz-sys

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. This Skill orients you to the bundle structure, explains what each file records, and guides correlation across layers so you can find the root cause of a reported symptom. ## Core Features & Use Cases - Safe Bundle Extraction: Uses a hardened Python extractor that validates zip structure, rejects symlinks, encrypted entries, path traversal, and oversized archives before unpacking to a temp directory. - File-to-Symptom Mapping: Explains which log file to start with based on the symptom, such as events.jsonl for turn behavior, usage.jsonl for token/credit questions, ahp/.jsonl for client-server ordering, and agenthost.log for host failures. - Cross-Layer Correlation: Documents correlation fields like session ID, turnId, interactionId, JSON-RPC request id, and AHP serverSeq to follow one operation across client, transport, host, and SDK layers. - Use Case: A user reports a failed Copilot session. Extract the ah-logs zip, locate the turnId in events.jsonl, trace the matching AHP request/response, and confirm the host-side error in agenthost.log. ## Quick Start Extract the attached ah-logs zip with the bundled script and analyze events.jsonl to find why the session failed around the reported timestamp.

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 with the file closest to the symptom: events.jsonl for turn behavior, ahp/*.jsonl for client-server ordering, or agenthost.log for host failures. Correlate using session IDs, turnIds, and request IDs.

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

Run python3 scripts/extract.py with the archive path. The script validates the zip structure, rejects symlinks, encrypted entries, path traversal, and oversized archives, then unpacks to a temporary directory and prints its path.

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

Bundles may contain events.jsonl for SDK session events, usage.jsonl for token usage, customizations.json for loaded skills and hooks, ahp/*.jsonl for transport traffic, agenthost*.log for host behavior, copilot-logs for SDK logs, and vscode-logs for renderer output. Collection is best-effort, so missing files are normal.

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.

Can AHP logs contain multiple sessions?▼

Yes, an AHP log is connection-scoped and can contain traffic for multiple sessions. Copilot SDK process logs can also span sessions. Filter by session ID, turnId, or JSON-RPC request id and use _ahpLog.ts timestamps to reconstruct ordering across rotated files.