agent-host-logs

A guide for analyzing exported Agent Host debug-log bundles. These bundles contain records from the agent host and related app processes, often in text or JSON Lines files, where each line is a separate JSON record.

In plain words
What is it for?
Use it to unpack and examine ah-logs or ahp-logs archives, events.jsonl, transport logs, Agent Host logs, remote-agenthost.log, VS Code logs, and Copilot logs. It helps identify event names, timestamps, statuses, and related activity without exposing unrelated secrets.
Why use it?
It helps distinguish exported debug bundles from ordinary Code OSS log folders and provides a safe way to inspect their contents. It also warns that bundles may contain sensitive prompts, paths, file contents, terminal output, settings, and tokens.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/microsoft/vscode/agent-host-logs
Any agent
npx skills add microsoft/vscode --skill agent-host-logs
Clone the repo
git clone --depth 1 https://github.com/microsoft/vscode

Made for: Claude Code, Codex.

Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,223 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00062 $0.01223
Opus 5 $0.00031 $0.00611
Sonnet 5 $0.00012 $0.00245
Haiku 4.5 $0.00006 $0.00122

Measured yesterday against content hash 0110c19d2b3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-host-logs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/extract.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/agent-host-logs/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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
usage.jsonl
customizations.json
agenthost.log
agenthost.1.log
agenthost-server.log
vscode-logs/Window/renderer.log
vscode-logs/Window/renderer.1.log
vscode-logs/Shared/sharedprocess.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.
usage.jsonl Client-captured token/credit usage, one record per model call (turnId, model, input/output/cache tokens, cumulative totalNanoAiu). The SDK's assistant.usage event is ephemeral and never reaches events.jsonl, so this is the only per-call usage record. Present only when agent-host debug logging was on.
customizations.json Snapshot of the skills/hooks/agents/MCP servers loaded for the session. The SDK's session.*_loaded events are ephemeral, so this is the only record of what was actually active. Present only when agent-host debug logging was on.
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.
agenthost*.log Local or server Agent Host process behavior: startup, auth, sessions, provider events, tools, Git/worktrees, and host-side errors. Numbered files are older rotated segments.
copilot-logs/*.log Copilot SDK process logs that mention the selected session ID. A process log may contain other sessions too.
vscode-logs/Window/* Current and rotated files from the Window log group, including renderer/client behavior, network activity, views, and other window-owned logs.
vscode-logs/Shared/* Current and rotated files from the Shared log group. 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.

Read the full file on GitHub · 84 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 84 lines · 62 tokens per session scan A 0110c19d2b3b

Subscribe to this mod's changes

agent-host-logs is a skill published in the GitHub repository microsoft/vscode (190,061 stars, last pushed yesterday), licensed MIT. It adds 62 tokens to every session and 1,223 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

docx

使用 OpenXML SDK (.NET) 进行专业的 DOCX 文档创建、编辑和格式化。 三种管道:(A) 从零创建新文档,(B) 在已有文档中填充/编辑内容, (C) 应用模板格式化并通过 XSD 验证门控检查。 当用户需要生成、修改或格式化 Word 文档时,必须使用此 skill—— 包括他们说"写一份报告"、"起草建议书"、"制作合同"、 "填写此表单"、"按此模板重新排版",或任何最终输出为 .docx 文件的任务。 即使用户未明确提及 "docx",如果任务暗示生成可打印/正式文档,也应使用此 skill。.

Playa-0v0/Cyrene-Agent · 169 tokens

cyrene-plan-mode

当 Cyrene 处于 Plan Mode(计划模式),正在讨论、调查、细化或准备代码/文件改动的实施计划时使用。.

Playa-0v0/Cyrene-Agent · 37 tokens

as-planning-and-task-breakdown

Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.

Playa-0v0/Cyrene-Agent · 58 tokens

as-spec-driven-development

Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when requirements are unclear, ambiguous, or only exist as a vague idea.

Playa-0v0/Cyrene-Agent · 44 tokens

ecc-code-tour

Create CodeTour .tour files — persona-targeted, step-by-step walkthroughs with real file and line anchors. Use for onboarding tours, architecture walkthroughs, PR tours, RCA tours, and structured "explain how this works" requests.

Playa-0v0/Cyrene-Agent · 54 tokens

ecc-codebase-onboarding

Analyze an unfamiliar codebase and generate a structured onboarding guide with architecture map, key entry points, conventions, and a starter CLAUDE.md. Use when joining a new project or setting up Claude Code for the first time in a repo.

Playa-0v0/Cyrene-Agent · 54 tokens