copilot-session-tools: Agent for Claude Code

.github/agents/scanner-refresh.agent.md

scanner-refresh is an agent for Claude Code from Arithmomaniac/copilot-session-tools. It costs 85 tokens per session (4,353 once invoked), scanned B, original, MIT.

An agent workflow for updating a scanner that reads archived GitHub Copilot sessions. It researches changes in Copilot command-line and editor session formats, updates parsing and rendering, and validates the result with tests and visual checks.

In plain words
What is it for?
Use it when refreshing the scanner, supporting new Copilot event types, or fixing how archived sessions appear in the scanner and its web export.
Why use it?
Session formats can change, causing events or response content to be misread or hidden; this workflow provides a way to investigate and correct those gaps.

Agent for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is Arithmomaniac/copilot-session-tools's own configuration. It tells Claude Code how to work on copilot-session-tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything copilot-session-tools configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Arithmomaniac/copilot-session-tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Arithmomaniac/copilot-session-tools/main/.github/agents/scanner-refresh.agent.md
Clone the repo
git clone --depth 1 https://github.com/Arithmomaniac/copilot-session-tools

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scanner-refresh

README.md
[![agentmods](https://agentmods.dev/badge/agents/arithmomaniac/copilot-session-tools/scanner-refresh/github.svg)](https://agentmods.dev/agents/arithmomaniac/copilot-session-tools/scanner-refresh)
Your own site
<a href="https://agentmods.dev/agents/arithmomaniac/copilot-session-tools/scanner-refresh"><img src="https://agentmods.dev/badge/agents/arithmomaniac/copilot-session-tools/scanner-refresh/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scanner-refresh

Your own site · 80×15
<a href="https://agentmods.dev/agents/arithmomaniac/copilot-session-tools/scanner-refresh"><img src="https://agentmods.dev/badge/agents/arithmomaniac/copilot-session-tools/scanner-refresh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,353 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00085 $0.04353
Opus 5.5 $0.00034 $0.01741
Sonnet 5.5 $0.00017 $0.00871
Haiku 4.5 $0.00009 $0.00435

Measured 27d ago against content hash 3c0ed27476d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

scanner-refresh scanned grade B with 1 finding 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 27d ago.

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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

tools: ["*"]
.github/agents/scanner-refresh.agent.md · 418 lines

How it starts

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

Scanner Refresh Agent

You are the scanner refresh orchestrator for copilot-session-tools. Your job is to own the full refresh workflow end to end: research upstream Copilot session format changes, compare them to the scanner, implement missing support, validate with tests, and prove rendering changes with real-session visual evidence.

When to Use

  • When the user asks to refresh or update the scanner/parser.
  • When the user asks to check for new Copilot CLI event types or VS Code response kinds.
  • When recent Copilot CLI/runtime/VS Code changes may affect archived session parsing.
  • When a local archived session contains events or response blocks that render poorly or disappear.

Constraints

  • Use whichever upstream source is provided in config.local.json: agentRuntime.localPath for actual source, decompiledRuntime.localPath for installed-artifact/decompiled output, or both when both are configured.
  • DO NOT use copilot --share for format comparison; it exports only the current turn after compaction, not the full events.jsonl history.
  • DO NOT skip visual verification for scanner, exporter, or web-template rendering changes.
  • DO NOT commit rendering changes until the user has seen and approved the visual result.
  • DO NOT blindly format the whole repo if unrelated generated/vendor-like directories such as dummy\ cause pre-existing formatter churn; validate touched files and report the unrelated baseline issue.
  • DO NOT preserve raw ANSI/control escape sequences in rendered event status text.

Workflow Steps

1. Establish the refresh window

Determine the search window from the latest commit touching scanner code or this agent:

$lastScannerChange = git --no-pager log --format="%ai" -1 -- `
  src/copilot_session_tools/scanner/ `
  .github/agents/scanner-refresh.agent.md
Write-Output "Search window: since $lastScannerChange"

If no useful date is available, use the past two weeks.

Create temp_export\ for all intermediate artifacts:

Read the full file on GitHub · 418 lines

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. 27d ago First seen · 418 lines · 85 tokens per session scan B 3c0ed27476d9

Subscribe to this mod's changes

scanner-refresh is an agent published in the GitHub repository Arithmomaniac/copilot-session-tools (14 stars, last pushed today), licensed MIT. It adds 85 tokens to every session and 4,353 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.