session-investigator

session-investigator is a skill for Claude Code, Codex from evalstate/fast-agent. It costs 68 tokens per session (2,292 once invoked), scanned A, original, Apache-2.0.

A troubleshooting guide for fast-agent session and history files. These files record session details, messages, tool calls, results, and timing information.

In plain words
What is it for?
Use it to inspect session metadata and history, trace tool activity, compare saved histories, and diagnose failures or timing issues.
Why use it?
It helps identify why an agent session stopped unexpectedly, repeated tools, or behaved differently from the expected conversation flow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to inspect session metadata and history, trace tool activity, compare saved histories, and diagnose failures or timing issues.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/evalstate/fast-agent/session-investigator
About the project

fast-agent is a command-line framework for creating, running, and evaluating AI agents and workflows, including connections to models, skills, and MCP servers. It is used by developers building coding tools, multimodal agents, automations, and evaluation workflows.

evalstate/fast-agent · 3,943 stars · on GitHub · fast-agent.ai

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.

Any agent
npx skills add evalstate/fast-agent --skill session-investigator
Clone the repo
git clone --depth 1 https://github.com/evalstate/fast-agent

Made for: Claude Code, Codex.

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 session-investigator

README.md
[![agentmods](https://agentmods.dev/badge/skills/evalstate/fast-agent/session-investigator/github.svg)](https://agentmods.dev/skills/evalstate/fast-agent/session-investigator)
Your own site
<a href="https://agentmods.dev/skills/evalstate/fast-agent/session-investigator"><img src="https://agentmods.dev/badge/skills/evalstate/fast-agent/session-investigator/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 session-investigator

Your own site · 80×15
<a href="https://agentmods.dev/skills/evalstate/fast-agent/session-investigator"><img src="https://agentmods.dev/badge/skills/evalstate/fast-agent/session-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,292 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00068 $0.02292
Opus 5.5 $0.00027 $0.00917
Sonnet 5.5 $0.00014 $0.00458
Haiku 4.5 $0.00007 $0.00229

Measured 1mo ago against content hash d8df6fafb1dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

session-investigator 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 1mo 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.

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.

examples/hf-toad-cards/skills/session-investigator/SKILL.md · 229 lines

How it starts

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

Session Investigator

Diagnose fast-agent session issues by examining session and history files.

Session Directory Structure

Sessions are stored in .fast-agent/sessions/<session-id>/:

2601181023-Kob2h3/
├── session.json              # Session metadata
├── history_<agent>.json      # Current agent history
└── history_<agent>_previous.json  # Previous save (rotation backup)

Session IDs encode creation time: YYMMDDHHMM-<random> (e.g., 2601181023 = 2026-01-18 10:23).

Key Files

session.json

{
  "name": "2601181023-Kob2h3",
  "created_at": "2026-01-18T10:23:24.116526",
  "last_activity": "2026-01-18T10:39:42.873467",
  "history_files": ["history_dev_previous.json", "history_dev.json"],
  "metadata": {
    "agent_name": "dev",
    "first_user_preview": "is it possible to override..."
  }
}

history_.json

{
  "messages": [
    {
      "role": "user|assistant",
      "content": [{"type": "text", "text": "..."}],
      "tool_calls": {"<id>": {"method": "tools/call", "params": {"name": "...", "arguments": {}}}},
      "tool_results": {"<id>": {"content": [...], "isError": false}},
      "channels": {
        "fast-agent-timing": [{"type": "text", "text": "{\"start_time\": ..., \"end_time\": ..., \"duration_ms\": ...}"}],
        "fast-agent-tool-timing": [{"type": "text", "text": "{\"<tool_id>\": {\"timing_ms\": ..., \"transport_channel\": ...}}"}],
        "reasoning": [{"type": "text", "text": "..."}]
      },
      "stop_reason": "endTurn|toolUse|error",
      "is_template": false
    }
  ]
}

Investigation Commands

Basic inspection

# Message count
jq '.messages | length' history_dev.json

# Last N messages overview
jq '.messages[-5:] | .[] | {role, stop_reason, has_tool_calls: (.tool_calls != null), has_tool_results: (.tool_results != null)}' history_dev.json

# View specific message
jq '.messages[227]' history_dev.json

Tool call correlation

Tool calls and results are linked by correlation ID. Valid pattern: assistant with tool_calls → user with matching tool_results.

Read the full file on GitHub · 229 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. 1mo ago First seen · 229 lines · 68 tokens per session scan A d8df6fafb1dc

Subscribe to this mod's changes

session-investigator is a skill published in the GitHub repository evalstate/fast-agent (3,943 stars, last pushed today), licensed Apache-2.0. It adds 68 tokens to every session and 2,292 once invoked, about $0.0003 per session on Opus 5.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.