Files
thedotmack__claude-mem/docs
Alex Newman 28c84255fe feat(telemetry): report observed model, source, and billing tier to PostHog (#3836)
PostHog only knew the observer model (the model claude-mem uses to write
observations). It now also carries, per observed session:

- observed_model: the model the user's IDE session is running, read from the
  transcript's last assistant entry on every Stop hook
- observed_billing: closed enum (max | pro | team | enterprise | subscription |
  api_key | bedrock | vertex | foundry | unknown) detected in the hook process
  from Claude Code's env and ~/.claude.json oauthAccount.organizationType
- ide and provider are now actually carried on observer_turn_rollup (the docs
  already claimed this; the rollup was dropping them)

The Stop hook sends both fields to /api/sessions/summarize; the worker persists
them on sdk_sessions (observed_model, observed_billing; schema version 50) and
mirrors them onto the in-memory ActiveSession so every per-turn
session_compressed record carries them into the rollup (last-seen semantics,
'unknown' when never learned).

Privacy: only oauthAccount.organizationType, oauthAccount presence, and
customApiKeyResponses.approved are read from .claude.json, projected
immediately after parse; parse errors log only the error class name. Both new
keys are added to the scrub whitelist and documented in telemetry.mdx.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019NoBPqpo7YaR3HKipExjAT
2026-09-01 12:09:53 -07:00
..