Getting Started

Introduction

Trenchcoat monitors, meters, and reports on your team's AI agent usage.

Trenchcoat is a SaaS platform that gives engineering teams visibility into how they use AI agents. It ingests telemetry from Claude Code via a lightweight plugin, stores it in a managed database, and surfaces analytics through a dashboard — sessions, tool usage, token attribution, and cost.

What Trenchcoat tracks

  • Sessions — every time a developer opens Claude Code, a session is created
  • Tools — every tool call (Read, Edit, Bash, etc.) is captured with name and duration
  • Agents — subagent invocations are tracked separately so you can see which agents your team runs most
  • Tokens & cost — input/output token counts per session, mapped to current model pricing

Who is this for?

How it works

Claude Code → Plugin hooks → Local JSONL → Batch push → Trenchcoat API → Dashboard

The plugin runs Python hooks on each Claude Code lifecycle event. Events are written locally first, under ~/.claude/trenchcoat/, and pushed to the Trenchcoat API when a session ends — not on a timer. Local recording works with no account at all.

By default only metadata is captured: prompt length rather than prompt text, result size rather than tool output, and no git branch. Content capture is opt-in twice over — you enable it locally and the key's scopes must permit it, or the server strips it on arrival.

On this page