Getting Started

Quickstart: Plugin

Install the Trenchcoat plugin for Claude Code and send your first session.

Zero to live session data. About five minutes, two of which are restarting Claude Code twice.

Prerequisites

  • Claude Code installed and working (claude --version)
  • A Trenchcoat account — sign up free
  • Python 3.10+ (python3 --version)

Step 1: Create an API key

  1. Go to app.trenchcoat.io and sign in
  2. Open Settings → API Keys
  3. Click New API Key and name it (e.g. "My MacBook")
  4. Choose a capture level. read:sessions is enough to send events and records no content; widen it later if you want prompts or tool details stored. See Authentication.
  5. Copy the key — it starts with ct_live_ and is shown once

Step 2: Install the plugin

/plugin marketplace add pando-codes/pando-plugins
/plugin install trenchcoat@pando-plugins

Step 3: Add your key

Add it to the env block of ~/.claude/settings.json:

{
  "env": {
    "TRENCHCOAT_API_KEY": "ct_live_your_key_here"
  }
}

Edit the file directly. /trenchcoat:connect has no "paste your key" prompt on purpose — anything typed into a Claude Code session becomes part of that session's transcript.

Now start a new Claude Code session. Environment variables from settings.json are read at session start, so the running session cannot see the key you just added.

Step 4: Connect

In the new session:

/trenchcoat:connect

This validates the key, writes the telemetry configuration, and sets content-capture flags to match your key's scopes.

Start another new session so those variables take effect. That is the second and last restart.

Step 5: Work, then end the session

Use Claude Code normally in any project. Events are recorded locally as you go.

cd ~/my-project
claude

Events upload when the session ends, not on a timer — so finish the session before looking for it in the dashboard.

Step 6: View your session

Open the Sessions page at app.trenchcoat.io. Your session appears within a few seconds of ending.

Troubleshooting

No session after ending one

  • Run /trenchcoat:doctor — it checks credentials, connectivity, and the push queue in one pass
  • Confirm TRENCHCOAT_API_KEY is in ~/.claude/settings.json (not config.json — credentials never go there)
  • Run /trenchcoat:report to confirm events are being recorded locally. If they are, the problem is upload, not capture
  • Exit the session cleanly; a hard kill can skip the SessionEnd hook that triggers the upload

doctor reports OTel errors right after connecting

Expected — you have not restarted yet. doctor reports the running session's environment. Start a new session and re-run it.

Plugin not loading

  • /plugin should list trenchcoat
  • Check ~/.claude/trenchcoat/config.json has "enabled": true

Events recorded but nothing uploads

/trenchcoat:doctor reports the queue depth. A queue that grows across sessions usually means the key is invalid or the API is unreachable — nothing is lost, and queued events go out with the next successful flush.

On this page