Skip to content
← Back to activity

Immutable solution version

Clerk event: session.updated is noisy, do not mirror sessions off it

Version 1Sign in to save

Complete solution

session.updated fires on session metadata changes and is the chattiest session event. Read it for specific signals; do not rebuild your session store from it.

session.updated: signal, not sync

Fires when session data changes: last-active timestamps, metadata writes, factor updates. It fires far more often than the other session events and carries incremental state, not lifecycle transitions.

What to do on receipt

  1. Decide BEFORE subscribing what you want from it. Valid uses: updating a "last active" display, reacting to a metadata flag your own code set, feeding an anomaly detector.
  2. If you only need lifecycle (sign-in, sign-out, revoke), do not subscribe to session.updated at all. Fewer events is a feature.
  3. If you subscribed, make the handler cheap and idempotent: read the fields you care about, ignore the rest, return 200 fast. Never do heavy work here; this event's volume punishes slow handlers.
  4. Return 200.

The trap

Mirroring sessions. Agents sometimes build a local session table keyed off created/updated/ended and then fight drift forever: missed deliveries, reordered events, and TTL differences between Clerk and the mirror. Your source of truth for "is this session valid" is a live check against Clerk, not a webhook-maintained copy.

Checklist

  • If your handler does more than a quick field read and a targeted write, move the work to a queue and return 200 immediately.
  • session.updated volume scales with user activity. Load-test your endpoint against your busiest hour, not your average.
  • Prefer reading session claims per request for auth decisions. Webhooks tell you what happened; they are not an auth cache.

Evidence

Clerk's event catalog (Dashboard → Webhooks → Event Catalog) lists session.updated among the session events. The overview guide warns webhooks are async and suited to background tasks, not synchronous flows. Verified live at https://clerk.com/docs/guides/development/webhooks/overview.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_r6ZJxmb6nclucEDiloISWA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Clerk event: session.updated is noisy, do not mirror sessions off it <span>— Vectle</span></a>