Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(replay-vision): explain observation-count caps to agents and clarify the scanner limit copy (#115959)

Tue Haulund08d5ad9a63fb
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 8149cad0d02e..0eab3314a7b9 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -13511,9 +13511,9 @@ snapshots:
scenes-app-replay-vision--scanner-alerts-empty--light:
hash: v1.k794b7964.d9ace49fb0b86c802c61268205a8d0a4fec36ee11893addb69f3f382d6413c23.lQIQpu4oUttcUZcu6v656AAUXPTC4X6hzOW1-lLWbdU
scenes-app-replay-vision--scanner-editor-budget--dark:
- hash: v1.k794b7964.37379538a705b9cfdaae3992ffbb357d3f7277abc9b77000c37e5d65d2d9a182.tIr_lkCBHvvxOjUsNFJ_VwNzAkD_MY2q-fN7anGin90
+ hash: v1.k794b7964.fc115f9b472561e1a7464b75405a09aea3cad690d4489bb5571466730cdafed8.H8IE0r67APlDwXvHJYTonS5KAn1KWZNw1YglrdU5E8w
scenes-app-replay-vision--scanner-editor-budget--light:
- hash: v1.k794b7964.092d0c888421a72264c4a608fe726353d7526f77b7ad1cfbef8de96f7c93cc82.AFcQ6LQbNB6EJWNAxAgptev4Tft57cam4gCwpGDFYx8
+ hash: v1.k794b7964.c0b580ca3bba7d80b1dd4811f52cc6f46544d03a3b727fcceb572b2b2e3fd3b6.EwqoyogmEud1JvYjU8Uo7cDpqzTFJ0macesvvd4VByQ
scenes-app-replay-vision--scanner-editor-configure--dark:
hash: v1.k794b7964.07148958cd17ddb6f5e92153e6020b88a5c0faadd1d30453af7dcd3842efe1be.mbfalsNTUY56lRXxDljiT-ZQ19WP2LSF7Ngnn21lRsw
scenes-app-replay-vision--scanner-editor-configure--light:
diff --git a/products/replay_vision/frontend/replay_scanners/components/ScannerCreditLimit.tsx b/products/replay_vision/frontend/replay_scanners/components/ScannerCreditLimit.tsx
index 4795991fa76f..937499dc68df 100644
--- a/products/replay_vision/frontend/replay_scanners/components/ScannerCreditLimit.tsx
+++ b/products/replay_vision/frontend/replay_scanners/components/ScannerCreditLimit.tsx
@@ -59,7 +59,8 @@ export function ScannerCreditLimit({ scannerId }: ScannerCreditLimitProps): JSX.
<div className="space-y-1">
<LemonLabel>Scanner limit</LemonLabel>
<div className="text-xs text-muted">
- Cap what this scanner spends in a billing period, on top of your organization's limit.
+ Cap what this scanner spends in a billing period. Your organization's limit still
+ applies.
</div>
</div>
<LemonSwitch
diff --git a/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md b/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md
index 35abd80e9a8d..a34692734cc6 100644
--- a/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md
+++ b/products/replay_vision/skills/creating-replay-vision-scanners/SKILL.md
@@ -9,7 +9,7 @@ A scanner is a standing LLM probe over session recordings. Once created and enab
**Temporal schedule that sweeps every 5 minutes**, applying its prompt to each new matching recording and
recording the result as an observation (a queryable `$recording_observed` event). Each observation spends
**credits** (1 credit = $0.01) from the org's budget for the current billing period, and an observation's
-price depends on the scanner's `model` — so budget in credits, not in observation counts.
+price depends on the scanner's `model` — so size spend in credits, and convert any observation count a user gives you into credits at that model's price.
That schedule is exactly why creation needs a gut-check: a scanner with a permissive query and full sampling
starts spending automatically and can drain the whole period's budget within its first few sweeps.
@@ -131,6 +131,11 @@ Then decide on `rest_of_period` against `remaining`:
per-scanner cap: set `credit_limit` on create so this scanner can only ever spend that many credits per
billing period. It stops scanning once the credits left can't cover another observation, then resumes
when the period resets. Sessions it skipped while capped are not scanned later.
+- If the user states the cap as an observation count ("stop after 200 observations"), there is no count
+ field. Set `credit_limit` to the count times `credits_per_observation` for the scanner's `model` (the
+ estimate and scanner responses both return it), and tell the user the credit figure you set.
+ The cap stays in credits, so a later model change keeps the credits and changes how many observations
+ they cover.
Confirmation here is a conversation step, not an API capability — surface the trade-off and let the user
choose. When the projected volume is clearly small relative to the budget, you don't need to ask.
@@ -186,7 +191,10 @@ observations they have to go read.
`vision-scanners-update` is a partial update — send only changed fields. **Re-run the Step 3 gut-check
whenever you widen scope or raise the price**: a broader `query`, a higher `sampling_rate`, a looser
`sampling_mode`, or a pricier `model` all raise the monthly spend just like a fresh broad scanner would.
-Toggling `enabled`, tweaking the prompt, or narrowing the query don't need a re-estimate. Editing config bumps
+Toggling `enabled`, tweaking the prompt, or narrowing the query don't need a re-estimate.
+Changing the `model` of a scanner with a `credit_limit` leaves the credits as they are, so the cap covers a
+different number of observations. Tell the user the new count, and offer to change `credit_limit` if they
+want to keep the old one. Editing config bumps
`scanner_version`; past observations keep a snapshot of the old config.
## Gotchas