Agent Host Log Investigator
Trace session, transport, and host failures in Agent Host debug exports.
The skill explicitly treats logs as sensitive, requires local analysis, and prohibits quoting secrets or unrelated user content. The extractor adds substantial ZIP safety checks for entry counts, sizes, paths, symlinks, encryption, and special files. Points are deducted because it runs a local script and deletes a temporary directory without explicit user confirmation, detailed redaction rules, privilege scoping, or recovery guarantees.
The instructions, log taxonomy, correlation fields, and investigation order are internally coherent, and the extractor has substantial preflight validation and cleanup on failure. Static evidence provides no skill-specific tests, cross-platform verification, or abnormal-analysis examples, so actual key-path execution remains unconfirmed; the static cap requires a conservative deduction.
Trigger conditions are reasonably specific and cover several Agent Host export formats, with guidance on which log is relevant to each symptom. Points are deducted because missing-input behavior, non-fit boundaries, output expectations, and Chinese-language usage are unspecified, and there is no evidence of mainland-China environment adaptation; the core analysis does not inherently require overseas services.
The documentation is well organized with overview, file meanings, startup guidance, and practical tips. Repository README, LICENSE, and SECURITY.md establish MIT licensing, Microsoft attribution, and a security-reporting path. Points are deducted because the skill lacks its own version, changelog, named maintenance responsibility, installation/dependency notes, FAQ, and explicit Python or shell portability requirements.
The skill gives a directly usable investigation workflow from symptom, time, and identifiers through adjacent log layers, including concrete correlation fields. Points are deducted because it defines no fixed output template, representative findings, or verified result format, leaving substantial judgment and synthesis to the user.
The SKILL.md and extractor are auditable primary materials, and the extractor's safety constraints can be checked statically. Points are deducted because there are no skill-specific tests, sample bundles, CI coverage, or third-party execution records; static reading cannot independently reproduce diagnostic effectiveness.
- Logs may contain tokens, prompts, file contents, terminal output, paths, and settings; users must redact them before sharing results or using shared environments.
- Temporary extraction-directory deletion is not recoverable, and the skill does not define result retention, rollback, or audit behavior.
- The instructions assume python3 and Unix-like shell commands; native Windows execution compatibility is not established by the supplied material.
- There is no fixed output format or skill-specific test coverage, so conclusions require human review.
What it does & when to use it
This skill analyzes Agent Host debug bundles produced by “Developer: Export Agent Host Debug Logs...”. It targets ZIP archives or unpacked folders commonly named ah-logs or ahp-logs, and correlates Copilot SDK events with AHP traffic, Agent Host, client, and remote-host logs. The material must be handled as sensitive because bundles may contain tokens, prompts, file contents, terminal output, paths, and settings. It is a good fit for developers investigating Agent Host behavior by time, session ID, request ID, or tool ID.
Reads files such as events.jsonl, ahp/*.jsonl, Agent Host.log, copilot-logs/*.log, Window.log, Shared.log, and remote-host logs; runs the repository's scripts/extract.py to unpack a ZIP archive; selects the most relevant log layer from the reported symptom, time, host type, and known identifiers; correlates records using session IDs, turnId, interactionId, tool or request IDs, JSON-RPC ids, serverSeq, and event id/parentId; reconstructs the order of rotated AHP logs from their timestamps; and uses matching failed responses, missing completions, or user-visible consequences as evidence when assessing a failure.
- A developer has exported Agent Host logs and needs to investigate turns, messages, tools, or permissions in a particular session.
- An engineer is debugging client/server state or ordering issues and needs to trace AHP requests, responses, subscriptions, and notifications.
- A team is investigating Agent Host startup, authentication, sessions, providers, tools, Git/worktrees, or host-side errors.
- A developer needs to correlate Copilot SDK process logs with local or remote Agent Host behavior across potentially different time zones.
- An investigator has a valid but incomplete export and needs to distinguish causal failure evidence from standalone warnings or error-level records.
Pros & cons
- Covers several correlation layers: SDK events, AHP transport, Agent Host, client, shared-process, and remote-host logs.
- Provides concrete guidance for choosing a starting log, correlating IDs, and reconstructing rotated log order.
- Accounts for valid bundles with missing files and warns against treating warning or error severity alone as proof of causality.
- Includes explicit handling guidance for tokens, prompts, file contents, and terminal output.
- Its scope is Agent Host debug export bundles rather than a general workflow for the normal timestamped Code OSS log directory.
- Collection is best-effort, so missing files may limit the investigation.
- Time handling is not uniform: events.jsonl, Copilot SDK logs, and AHP logs are normally UTC, while ordinary .log files may use local machine time.
- The source provides no standalone installation procedure, test suite, or structured report format.
How to install
The source does not document a standalone installation procedure for this skill. It is located at .github/skills/agent-host-logs/ in the repository and should be loaded by an Agent Skills-compatible client together with its SKILL.md. The README documents the MIT license and maintenance context of the overall VS Code repository, but provides no separate installation command for this skill.
How to use
Provide an ah-logs or ahp-logs ZIP archive or unpacked folder, and describe the symptom, approximate time, local or remote host, and any known session, chat, turn, request, or tool ID. For example: "Analyze this ah-logs.zip and investigate why a session did not complete around 2025-01-01; correlate the turnId and request ID." When a ZIP must be unpacked and the repository is available, run: python3 .github/skills/agent-host-logs/scripts/extract.py "<archive>.zip". Start from the temporary path printed by the command and, when finished, delete only that exact temporary directory.
Compared to similar skills
Unlike the normal timestamped Code OSS log directory, this skill is specifically organized around bundles produced by “Export Agent Host Debug Logs...” and explains how to relate events.jsonl, AHP JSONL, Copilot SDK, and remote Agent Host logs.