New to Claude Skills? Learn how to install them →

posthog on GitHub

Diagnosing Missing Recordings

Free

Identify why session recordings are missing or not captured.

by posthog37.6k stars on posthog/posthog
3 views
Updated Aug 11, 2026
Get this skill

Free · Opens the source repo

What Diagnosing Missing Recordings does

The Diagnosing Missing Recordings skill provides a structured approach to troubleshoot issues related to missing session recordings in PostHog. This skill is essential for developers and product teams who rely on session replays for user behavior analysis and debugging. When users encounter questions such as 'Why wasn't this session recorded?' or 'Why don't I have any recordings?', this skill guides them through a systematic diagnosis of the problem.

The skill utilizes several tools to gather information about session recordings. It starts by checking if a recording exists for a given session ID. If a recording is found, the issue may lie in user interface filtering rather than in the capture process. If no recording exists, the skill then queries diagnostic signals emitted by the PostHog SDK during event tracking. These signals provide insights into the state of the recording, such as whether it was blocked by an ad blocker, disabled in project settings, or sampled out due to low capture rates.

After gathering the necessary data, users can interpret the results using the provided logic references. The skill outlines a clear workflow that includes checking project-level settings if no specific session ID is provided. This is particularly useful for identifying broader issues affecting multiple sessions, such as overly aggressive sampling rates or configuration problems.

Ultimately, this skill not only helps diagnose the root causes of missing recordings but also offers actionable recommendations based on the findings. By following the outlined steps, users can efficiently resolve issues and ensure that session recordings are captured as intended, leading to better insights into user interactions and product usage.

When to use it

Use this skill when users report missing session recordings or when troubleshooting session replay capture issues for specific session IDs or across an entire project.

When not to use it

This skill is not suitable for general session recording setup or configuration; it focuses specifically on diagnosing issues after recordings are expected to occur.

What you can build with it

User Reports Missing Recording

A user asks why a specific session recording is missing. Utilize the skill to check if the recording exists and diagnose the issue.

Project-Wide Recording Issues

When multiple users report missing recordings, use the skill to analyze project settings and identify patterns in session statuses.

Ad Blocker Impact on Recordings

If recordings are blocked due to ad blockers, the skill provides recommendations to mitigate this issue for users.

How to install Diagnosing Missing Recordings

View source

1. Install with the skills CLI

npx skills add posthog/posthog/diagnosing-missing-recordings --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by posthog

Diagnosing missing session recordings

When a user asks "why wasn't this session recorded?" or "why don't I have any recordings?", follow this workflow to systematically diagnose the cause.

Available tools

ToolPurpose
posthog:execute-sqlQuery session event properties for diagnostic signals
posthog:session-recording-getCheck if a recording actually exists for the session
posthog:query-session-recordings-listSearch for recordings matching criteria

Diagnostic signals

The PostHog SDK emits diagnostic properties on every event that explain the recording state. See the diagnostic signals reference for the full list.

The key signals are:

  • $has_recording — whether PostHog has a stored recording for this session
  • $recording_status — SDK state: active, buffering, disabled, sampled, paused
  • $session_recording_start_reason — why recording started or didn't
  • $sdk_debug_recording_script_not_loaded — recorder script blocked (ad blocker)
  • $sdk_debug_replay_*_trigger_status — trigger states (URL, event, linked flag)
  • $replay_sample_rate — configured sample rate at capture time

Workflow

Step 1 — Check if the recording exists

If the user provides a session ID, first check whether a recording actually exists:

posthog:session-recording-get
{
  "id": "<session_id>"
}

If this returns data, the recording exists — the issue is likely UI/filtering, not capture. If it returns 404, proceed to diagnose why.

Step 2 — Query diagnostic signals from events

Query the most recent event for the session to get SDK diagnostic properties:

posthog:execute-sql
SELECT
    properties.$has_recording AS has_recording,
    properties.$recording_status AS recording_status,
    properties.$session_recording_start_reason AS start_reason,
    properties.$sdk_debug_recording_script_not_loaded AS script_not_loaded,
    properties.$sdk_debug_replay_url_trigger_status AS url_trigger,
    properties.$sdk_debug_replay_event_trigger_status AS event_trigger,
    properties.$sdk_debug_replay_linked_flag_trigger_status AS flag_trigger,
    properties.$replay_sample_rate AS sample_rate,
    properties.$sdk_debug_replay_internal_buffer_length AS buffer_length,
    properties.$sdk_debug_replay_flushed_size AS flushed_size,
    properties.$lib AS sdk_library,
    properties.$lib_version AS sdk_version
FROM events
WHERE $session_id = '<session_id>'
ORDER BY timestamp DESC
LIMIT 1

Step 3 — Diagnose the verdict

Use the diagnosis logic reference to interpret the signals. The verdicts in priority order:

  1. Recording exists ($has_recording = true) — recording is captured, issue is elsewhere
  2. Ad blocked (script) ($sdk_debug_recording_script_not_loaded = true) — browser extension blocking the recorder script from loading
  3. Disabled ($recording_status = 'disabled') — replay turned off in settings or SDK config
  4. Trigger pending (trigger statuses are trigger_pending, none matched) — recording gated on trigger that never fired
  5. Sampled out ($session_recording_start_reason = 'sampled_out') — excluded by sample rate
  6. Buffering empty ($recording_status = 'buffering', buffer length = 0, nothing flushed) — initialized but no snapshots produced
  7. Flush blocked (buffer length climbs across events while flushed_size stays at 0) — snapshots are produced but the /s/ ingestion endpoint is blocked by an ad blocker or misconfigured reverse proxy. Detecting this requires querying the trend across the session's events — see example 3 in examples.md
  8. Unknown — signals don't match a known pattern

Step 4 — Check project-level settings (if no session ID)

When the user asks about recordings missing project-wide (no specific session), query for recent sessions to check the pattern:

posthog:execute-sql
SELECT
    $session_id,
    properties.$recording_status AS recording_status,
    properties.$session_recording_start_reason AS start_reason,
    properties.$sdk_debug_recording_script_not_loaded AS script_not_loaded,
    properties.$replay_sample_rate AS sample_rate
FROM events
WHERE event = '$pageview'
    AND timestamp > now() - INTERVAL 1 DAY
GROUP BY
    $session_id,
    recording_status,
    start_reason,
    script_not_loaded,
    sample_rate
ORDER BY max(timestamp) DESC
LIMIT 10

Look for patterns:

  • All disabled → replay is turned off in project settings
  • All sampled_out with low sample rate → sample rate too aggressive
  • All script_not_loaded → likely a CSP or deployment issue, not just one user's ad blocker
  • Mix of statuses → per-session issue, dig into specifics

Step 5 — Provide actionable recommendations

Based on the verdict, recommend specific actions:

VerdictRecommendation
Ad blockedUser's browser extension is blocking rrweb. Suggest trying without ad blocker, or using a proxy/custom domain for the recorder script
DisabledCheck project replay settings — recording may be turned off. Link to Settings > Session replay
Trigger pendingThe configured trigger (URL pattern, event, or feature flag) never matched. Review trigger configuration
Sampled outIncrease the sample rate in project settings, or use a trigger to guarantee capture for important sessions
Buffering emptyPage closed before first snapshot. Common with very short sessions or single-page navigations. Consider lowering minimum duration
UnknownDirect user to troubleshooting docs: https://posthog.com/docs/session-replay/troubleshooting

Examples

See real-world diagnostic examples showing how signal combinations map to verdicts. Use these to calibrate your interpretation of query results.

Tips

  • If $lib_version is very old, some diagnostic signals won't be present. Note this to the user — upgrading the SDK will provide better diagnostics.
  • A session might have events but no recording if the recording was deleted due to retention. Check the session's timestamp against the project's retention period.
  • If $has_recording is true but the user can't find it, check if it's filtered out by duration, activity threshold, or playlist filters.

Frequently asked questions about Diagnosing Missing Recordings

Similar skills