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.

feat(signals): show scout pre-check skips in the scout fleet (#117885)

posthog[bot]dd6b7b01994a
diff --git a/posthog/models/activity_logging/activity_log.py b/posthog/models/activity_logging/activity_log.py
index cee1f7f032c2..cd162cbbd860 100644
--- a/posthog/models/activity_logging/activity_log.py
+++ b/posthog/models/activity_logging/activity_log.py
@@ -602,12 +602,16 @@ signal_exclusions: dict[ActivityScope, list[str]] = {
# site, so the save that only moves the active version must not add an `updated` row.
"StreamlitApp": ["active_version", "updated_at"],
# `last_run_at` is written by the scout coordinator on every tick (~every 15 min per scout),
- # and the failure streak by the runner on every run outcome. When those are the only
+ # the pre-check fields on every scheduled pre-check, and the failure streak by the runner on
+ # every run outcome. When those are the only
# change, suppress the activity signal entirely so run bookkeeping never spams the audit
# log. A breaker trip is NOT suppressed: it moves `status`, which logs like any pause.
"SignalScoutConfig": [
"last_run_at",
"consecutive_failure_count",
+ "last_precheck_at",
+ "last_precheck_outcome",
+ "last_precheck_row_count",
],
}
diff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.ts
index d37a0dbf66c4..765a9ef856db 100644
--- a/products/replay_vision/frontend/generated/api.schemas.ts
+++ b/products/replay_vision/frontend/generated/api.schemas.ts
@@ -2276,6 +2276,20 @@ export const ScoutPrecheckQuerySourceEnumApi = {
Off: 'off',
} as const
+/**
+ * * `run` - Run
+ * * `skip` - Skip
+ * * `error` - Error
+ */
+export type SignalScoutConfigPrecheckOutcomeEnumApi =
+ (typeof SignalScoutConfigPrecheckOutcomeEnumApi)[keyof typeof SignalScoutConfigPrecheckOutcomeEnumApi]
+
+export const SignalScoutConfigPrecheckOutcomeEnumApi = {
+ Run: 'run',
+ Skip: 'skip',
+ Error: 'error',
+} as const
+
/**
* Optional JSON Schema (draft 2020-12) describing ONE structured record this scout produces via `scout-record-output` — e.g. a per-report quality judgment (`{"type": "object", "properties": {"verdict": {"enum": ["good", "bad", "unsure"]}, "reason": {"type": "string"}}, "required": ["verdict", "reason"]}`). The root must be `"type": "object"`. Setting a schema turns the structured-output channel on: the run prompt renders the schema and every submitted record is validated against it and recorded in the project as a `$scout_structured_output` event, queryable like any event. The channel also requires emit — a dry-run scout has nowhere to record to. Cardinality is the scout's call (one record per run, one per judged entity, ...). Null = channel off. Setting a schema requires skill-authoring authorization (the `llm_skill:write` scope and skill editor access) since the scout reads it verbatim in its prompt; clearing it needs only the config write. Records validate against the schema in force when the run was dispatched.
* @nullable
@@ -2401,6 +2415,22 @@ export interface SignalScoutConfigApi {
readonly effective_precheck_query: string | null
/** Where `effective_precheck_query` comes from: `config` (this scout's `precheck_query`), `skill_default` (the default its skill ships), or `off` (no pre-check runs). */
readonly precheck_query_source: ScoutPrecheckQuerySourceEnumApi
+ /**
+ * When a scheduled run last evaluated this scout's pre-check. A skipped run writes no run row, so this stays recent while `last_run_at` ages. Null if no pre-check has run.
+ * @nullable
+ */
+ readonly last_precheck_at: string | null
+ /** The outcome of the latest scheduled pre-check: `run` (the query found something new), `skip` (nothing new, so the run did not start), or `error` (the query failed and the run started). Null if no pre-check has run.
+ *
+ * * `run` - Run
+ * * `skip` - Skip
+ * * `error` - Error */
+ readonly last_precheck_outcome: SignalScoutConfigPrecheckOutcomeEnumApi | null
+ /**
+ * How many rows the latest scheduled pre-check returned, at most 50. Null if no pre-check has run.
+ * @nullable
+ */
+ readonly last_precheck_row_count: number | null
/**
* When the coordinator last dispatched this scout. Null if it has never run.
* @nullable
diff --git a/products/signals/backend/migrations/0185_signalscoutconfig_last_precheck.py b/products/signals/backend/migrations/0185_signalscoutconfig_last_precheck.py
new file mode 100644
index 000000000000..c82325a14d0d
--- /dev/null
+++ b/products/signals/backend/migrations/0185_signalscoutconfig_last_precheck.py
@@ -0,0 +1,32 @@
+# Generated by Django 5.2.18 on 2026-10-15 15:01
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("signals", "0184_signalscratchpad_search_trgm_indexes"),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="signalscoutconfig",
+ name="last_precheck_at",
+ field=models.DateTimeField(blank=True, null=True),
+ ),
+ migrations.AddField(
+ model_name="signalscoutconfig",
+ name="last_precheck_outcome",
+ field=models.CharField(
+ blank=True,
+ choices=[("run", "Run"), ("skip", "Skip"), ("error", "Error")],
+ max_length=16,
+ null=True,
+ ),
+ ),
+ migrations.AddField(
+ model_name="signalscoutconfig",
+ name="last_precheck_row_count",
+ field=models.IntegerField(blank=True, null=True),
+ ),
+ ]
diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txt
index a615c56cf0ed..e87f544ce1af 100644
--- a/products/signals/backend/migrations/max_migration.txt
+++ b/products/signals/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0184_signalscratchpad_search_trgm_indexes
+0185_signalscoutconfig_last_precheck
diff --git a/products/signals/backend/models.py b/products/signals/backend/models.py
index 4504dea13a73..b4f389286ddf 100644
--- a/products/signals/backend/models.py
+++ b/products/signals/backend/models.py
@@ -2585,6 +2585,14 @@ class SignalScoutConfig(ModelActivityMixin, TeamScopedRootMixin, UUIDModel):
TRUSTED = "trusted", "Trusted domains only"
FULL = "full", "Full"
+ class PrecheckOutcome(models.TextChoices):
+ """The outcome of one scheduled pre-check (`scout_harness/precheck.py`)."""
+
+ RUN = "run", "Run"
+ SKIP = "skip", "Skip"
+ # The query failed, so the scout ran as if it had no pre-check.
+ ERROR = "error", "Error"
+
# The `status` side of the `enabled` dual-write: a scout in one of these statuses is
# scheduled by the coordinator. `pending_pause` still runs; the warning is not a pause.
RUNNABLE_STATUSES = (Status.ACTIVE, Status.PENDING_PAUSE)
@@ -2854,6 +2862,11 @@ class SignalScoutConfig(ModelActivityMixin, TeamScopedRootMixin, UUIDModel):
precheck_query = models.TextField(null=True, blank=True)
# Turns off both `precheck_query` and the skill default, so every due tick runs the scout.
precheck_disabled = models.BooleanField(default=False, db_default=False)
+ # The latest scheduled pre-check, written by `evaluate_scout_precheck`. A skip creates no run
+ # row, so these fields are the only stored trace that a gated scout still checks its surface.
+ last_precheck_at = models.DateTimeField(null=True, blank=True)
+ last_precheck_outcome = models.CharField(max_length=16, choices=PrecheckOutcome.choices, null=True, blank=True)
+ last_precheck_row_count = models.IntegerField(null=True, blank=True)
# Stamped by the coordinator after each dispatch; drives the due-check. Written every
# run, so it is excluded from activity logging (see field_exclusions below).
last_run_at = models.DateTimeField(null=True, blank=True)
diff --git a/products/signals/backend/scout_harness/precheck.py b/products/signals/backend/scout_harness/precheck.py
index 8458f47f5999..0db07429aa76 100644
--- a/products/signals/backend/scout_harness/precheck.py
+++ b/products/signals/backend/scout_harness/precheck.py
@@ -7,9 +7,13 @@ call. Any other result starts the run. The single-value rule lets a `SELECT coun
as written, because a count always returns one row. Only the coordinator's scheduled dispatch
evaluates it: a manual, workflow, or check run already has a reason to run.
-A skip writes nothing. The coordinator stamped `last_run_at` (the dispatch anchor) when it
-dispatched the run, so the next tick does not dispatch it again at once. `{since}` reads the last
-run row, so the next run that starts still sees everything since the last run that actually ran.
+A skip writes no run row. Every evaluation stores its outcome on the config (`last_precheck_at`,
+`last_precheck_outcome`, `last_precheck_row_count`), so the project profile's `scout_fleet` can
+tell a scout that skips on purpose from one that does not run. The dry run stores nothing.
+
+The coordinator stamped `last_run_at` (the dispatch anchor) when it dispatched the run, so the
+next tick does not dispatch it again at once. `{since}` reads the last run row, so the next run
+that starts still sees everything since the last run that actually ran.
The failure breaker and the inactivity sweep read run rows, so a quiet scout is never paused for
being quiet.
@@ -258,6 +262,7 @@ def evaluate_scout_precheck(team_id: int, skill_name: str, now: datetime | None
result = _result_from_rows(found)
result = dataclasses.replace(result, query_source=effective.source)
+ _store_last_precheck(config, result, now)
_capture_precheck_evaluated(
team=team,
config=config,
@@ -413,6 +418,27 @@ def _render_rows(found: _PrecheckRows) -> str:
return "\n".join(lines)
+def _store_last_precheck(config: SignalScoutConfig, result: PrecheckResult, now: datetime) -> None:
+ """Store the outcome on the config, so the fleet can tell a gated scout from a stuck one.
+
+ One indexed update and no read, because this runs on every scheduled evaluation. A failed write
+ only loses the stored outcome, so it never stops the run.
+ """
+ try:
+ SignalScoutConfig.objects.for_team(config.team_id).filter(pk=config.pk).update(
+ last_precheck_at=now,
+ last_precheck_outcome=result.outcome,
+ last_precheck_row_count=result.row_count,
+ )
+ except Exception:
+ logger.warning(
+ "signals_scout: failed to store the pre-check outcome",
+ team_id=config.team_id,
+ skill_name=config.skill_name,
+ exc_info=True,
+ )
+
+
def _capture_precheck_evaluated(
*,
team: Team,
diff --git a/products/signals/backend/scout_harness/profile/builders.py b/products/signals/backend/scout_harness/profile/builders.py
index 6beeaa1cbd58..9e528079eb94 100644
--- a/products/signals/backend/scout_harness/profile/builders.py
+++ b/products/signals/backend/scout_harness/profile/builders.py
@@ -69,10 +69,15 @@ from products.notebooks.backend.facade import api as notebooks
from products.signals.backend.models import SignalReport, SignalScoutConfig, SignalScoutRun, SignalSourceConfig
from products.signals.backend.scout_harness.acting_user import resolve_scout_run_acting_user
from products.signals.backend.scout_harness.config_registry import live_scout_skill_names
-from products.signals.backend.scout_harness.lazy_seed import canonical_precheck_queries
-from products.signals.backend.scout_harness.precheck import PRECHECK_TIMEOUT_S, run_precheck_query
+from products.signals.backend.scout_harness.lazy_seed import canonical_precheck_queries, scout_skill_origin
+from products.signals.backend.scout_harness.precheck import (
+ PRECHECK_TIMEOUT_S,
+ resolve_effective_precheck,
+ run_precheck_query,
+)
from products.signals.backend.scout_harness.profile.schema import Inventory
from products.signals.backend.scout_harness.team_limits import withheld_skills_for_team
+from products.skills.backend.models.skills import LLMSkill
from products.surveys.backend.models import Survey
from products.warehouse_sources.backend.facade import api as warehouse_sources
from products.workflows.backend.facade.api import get_workflow_activity_summary
@@ -84,7 +89,7 @@ logger = logging.getLogger(__name__)
# (or restructuring an existing one) without bumping the version would silently mix old
# and new shapes in the cache. A redaction change bumps it too, so rows built before the
# redaction stop being served.
-INVENTORY_SOURCE_VERSION = "v17"
+INVENTORY_SOURCE_VERSION = "v18"
# Top-events ClickHouse query bounds. 7d is short enough to spot recent bursts and long
# enough to stabilize counts on low-traffic teams; 50 covers the long tail without
@@ -318,8 +323,9 @@ def _scout_fleet(team: Team) -> dict[str, Any]:
keeps the two causes distinguishable without a third bucket. Held-back scouts are the one
case dropped rather than classified, so this payload can't disclose them (see below).
- Queries: the config rows (schedule + emit posture, authoritative), the live skill names, the
- flag payload for the holdback denylist, and one grouped pass over recent run rows for the
+ Queries: the config rows (schedule + emit posture + last pre-check, authoritative), the live
+ skill names, the skill rows that decide whether a skill default pre-check applies, the flag
+ payload for the holdback denylist, and one grouped pass over recent run rows for the
last time each scout produced output. `last_run_at` comes off the config because the
coordinator stamps it at dispatch, so it stays correct for a scout whose runs have aged out
of the run-history window.
@@ -346,6 +352,14 @@ def _scout_fleet(team: Team) -> dict[str, Any]:
# an unreleased scout to the very team it is withheld from.
withheld = withheld_skills_for_team(team.id)
live_skills = live_scout_skill_names(team.id, withheld_skill_names=withheld)
+ # One query for the whole fleet: a skill default pre-check applies only to a canonical skill row.
+ canonical_skills = {
+ name
+ for name, metadata in LLMSkill.objects.filter(team_id=team.id, is_latest=True, deleted=False).values_list(
+ "name", "metadata"
+ )
+ if scout_skill_origin(name, metadata) == "canonical"
+ }
enabled: list[dict[str, Any]] = []
disabled: list[dict[str, Any]] = []
for config in SignalScoutConfig.objects.for_team(team.id).exclude(skill_name__in=withheld).order_by("skill_name"):
@@ -364,6 +378,7 @@ def _scout_fleet(team: Team) -> dict[str, Any]:
not_running_reason = "turned_off"
elif config.skill_name not in live_skills:
not_running_reason = "skill_unavailable"
+ precheck = resolve_effective_precheck(config, is_canonical=config.skill_name in canonical_skills)
entry = {
"skill_name": config.skill_name,
"run_interval_minutes": config.run_interval_minutes,
@@ -373,6 +388,9 @@ def _scout_fleet(team: Team) -> dict[str, Any]:
"last_emitted_at": last_emitted_at.isoformat() if last_emitted_at else None,
"not_running_reason": not_running_reason,
"pause_reason": pause_reason,
+ "precheck_source": None if precheck.source == "off" else precheck.source,
+ "last_precheck_at": config.last_precheck_at.isoformat() if config.last_precheck_at else None,
+ "last_precheck_outcome": config.last_precheck_outcome,
}
(disabled if not_running_reason else enabled).append(entry)
return {
diff --git a/products/signals/backend/scout_harness/profile/schema.py b/products/signals/backend/scout_harness/profile/schema.py
index 12509d3ac38c..c2dad24648bb 100644
--- a/products/signals/backend/scout_harness/profile/schema.py
+++ b/products/signals/backend/scout_harness/profile/schema.py
@@ -115,6 +115,13 @@ class ScoutFleetEntry(_Section):
# The cause behind an `auto_paused` entry (`no_output` / `ignored` / `repeated_failures`);
# null for every other entry.
pause_reason: str | None
+ # Where the scout's pre-check query comes from: `config` or `skill_default`. Null means no
+ # pre-check, so the scout runs on every due tick.
+ precheck_source: str | None
+ # The latest scheduled pre-check. A `skip` writes no run row, so a gated scout with nothing new
+ # on its surface keeps a stale `last_run_at` while `last_precheck_at` stays fresh.
+ last_precheck_at: str | None
+ last_precheck_outcome: str | None
class ScoutFleet(_Section):
diff --git a/products/signals/backend/scout_harness/prompt.py b/products/signals/backend/scout_harness/prompt.py
index 21a6e9c3d119..d0d59a361463 100644
--- a/products/signals/backend/scout_harness/prompt.py
+++ b/products/signals/backend/scout_harness/prompt.py
@@ -270,6 +270,8 @@ _FLEET_SEAMS = """# Working alongside the rest of the fleet
Several scouts run on this project, each with its own surface. `scout_fleet` in the project profile lists them: who runs, on what cadence, when each last ran and last emitted. Read it precisely, because two kinds of entry look like coverage and aren't. A scout in the `disabled` list is not watching at all, whatever its name suggests (`not_running_reason` says whether someone turned it off or its skill can no longer dispatch). A scout with `emit: false` is in dry-run: it runs, but its findings are discarded, so its silence tells you nothing about its surface. Neither is a reason to leave a finding to someone else.
+One kind of entry looks stale and isn't. A scout with a `precheck_source` checks a query before each due run and skips the run when its surface has nothing new. A skip writes no run, so its `last_run_at` and `last_emitted_at` can be days old. When `last_precheck_outcome` is `skip` and `last_precheck_at` is recent, that scout is watching and found nothing new to look at. It is not a coverage hole, so do not file its quiet as a problem. A scout with a null `precheck_source` has no gate, so a stale `last_run_at` there does need an explanation.
+
Overlap is a judgment call in both directions, and both cost something. **Duplicating a sibling's finding** puts the same fact in the inbox twice, and the second copy costs a human the time to work out it's the same thing. **Deferring to a sibling who never files it** leaves a hole, and that's the worse one, because nobody sees it: a duplicate is visible in the inbox, an uncovered surface is not. Your skill body naming another scout's territory is a statement about *framing*, not permission to drop a finding you hold evidence for.
So when a sibling already covers the surface, don't restate their finding, but do surface yours, through whichever channel you hold, when your angle is materially new (a different frame, a fresh mechanism, evidence that changes the verdict). Cite theirs in your summary (the report id, or the `finding_id` on the signal channel) so a reader can see the two are related rather than redundant.
diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.py
index 6723391e3c07..279fb879e35e 100644
--- a/products/signals/backend/scout_harness/serializers.py
+++ b/products/signals/backend/scout_harness/serializers.py
@@ -3608,6 +3608,32 @@ class SignalScoutConfigSerializer(serializers.ModelSerializer):
allow_null=True,
help_text="When the coordinator last dispatched this scout. Null if it has never run.",
)
+ last_precheck_at = serializers.DateTimeField(
+ read_only=True,
+ allow_null=True,
+ help_text=(
+ "When a scheduled run last evaluated this scout's pre-check. A skipped run writes no run "
+ "row, so this stays recent while `last_run_at` ages. Null if no pre-check has run."
+ ),
+ )
+ last_precheck_outcome = serializers.ChoiceField(
+ choices=SignalScoutConfig.PrecheckOutcome.choices,
+ read_only=True,
+ allow_null=True,
+ help_text=(
+ "The outcome of the latest scheduled pre-check: `run` (the query found something new), "
+ "`skip` (nothing new, so the run did not start), or `error` (the query failed and the run "
+ "started). Null if no pre-check has run."
+ ),
+ )
+ last_precheck_row_count = serializers.IntegerField(
+ read_only=True,
+ allow_null=True,
+ help_text=(
+ f"How many rows the latest scheduled pre-check returned, at most {PRECHECK_MAX_ROWS}. "
+ "Null if no pre-check has run."
+ ),
+ )
consecutive_failure_count = serializers.IntegerField(
read_only=True,
help_text=(
@@ -3774,6 +3800,9 @@ class SignalScoutConfigSerializer(serializers.ModelSerializer):
"precheck_disabled",
"effective_precheck_query",
"precheck_query_source",
+ "last_precheck_at",
+ "last_precheck_outcome",
+ "last_precheck_row_count",
"last_run_at",
"consecutive_failure_count",
"status_changed_at",
diff --git a/products/signals/backend/test/test_scout_harness_profile.py b/products/signals/backend/test/test_scout_harness_profile.py
index 4a76bb5a560a..dfbc5ab75c49 100644
--- a/products/signals/backend/test/test_scout_harness_profile.py
+++ b/products/signals/backend/test/test_scout_harness_profile.py
@@ -9,6 +9,7 @@ from __future__ import annotations
from contextlib import nullcontext
from datetime import UTC, datetime, timedelta
from types import SimpleNamespace
+from typing import Any
from uuid import uuid4
from posthog.test.base import BaseTest, ClickhouseTestMixin, _create_event, flush_persons_and_events
@@ -458,6 +459,31 @@ class TestScoutFleet(BaseTest):
assert entry["last_emitted_at"] is None
+ @parameterized.expand(
+ [
+ ("own_query", {"precheck_query": "SELECT 1"}, "config"),
+ ("disabled", {"precheck_query": "SELECT 1", "precheck_disabled": True}, None),
+ ("no_query", {}, None),
+ ]
+ )
+ def test_carries_precheck_state(self, _name: str, config_kwargs: dict[str, Any], source: str | None) -> None:
+ last_run = timezone.now() - timedelta(days=5)
+ checked = timezone.now() - timedelta(minutes=10)
+ self._config(
+ "signals-scout-logs",
+ last_run_at=last_run,
+ last_precheck_at=checked,
+ last_precheck_outcome=SignalScoutConfig.PrecheckOutcome.SKIP,
+ **config_kwargs,
+ )
+
+ entry = _scout_fleet(self.team)["enabled"][0]
+
+ assert entry["precheck_source"] == source
+ assert (entry["last_precheck_outcome"], entry["last_precheck_at"]) == ("skip", checked.isoformat())
+ assert entry["last_run_at"] == last_run.isoformat()
+ ScoutFleetEntry.model_validate(entry)
+
def test_team_isolated(self) -> None:
other = Team.objects.create(organization=self.organization, name="other")
LLMSkill.objects.create(team=other, name="signals-scout-logs", description="d", body="b")
diff --git a/products/signals/backend/test/test_scout_precheck.py b/products/signals/backend/test/test_scout_precheck.py
index 0ded9003cf78..6c429e8912aa 100644
--- a/products/signals/backend/test/test_scout_precheck.py
+++ b/products/signals/backend/test/test_scout_precheck.py
@@ -97,6 +97,12 @@ class TestEvaluateScoutPrecheck(ClickhouseTestMixin, BaseTest):
properties = capture.call_args.kwargs["properties"]
assert capture.call_args.kwargs["event"] == "scout_precheck_evaluated"
assert (properties["outcome"], properties["row_count"]) == (outcome, row_count)
+ stored = SignalScoutConfig.all_teams.get(team=self.team, skill_name=SKILL)
+ assert (stored.last_precheck_at, stored.last_precheck_outcome, stored.last_precheck_row_count) == (
+ NOW,
+ outcome,
+ row_count,
+ )
@parameterized.expand(
[
diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.ts
index f5ac320058aa..b13d6aa772f1 100644
--- a/products/signals/frontend/generated/api.schemas.ts
+++ b/products/signals/frontend/generated/api.schemas.ts
@@ -3787,6 +3787,20 @@ export const ScoutPrecheckQuerySourceEnumApi = {
Off: 'off',
} as const
+/**
+ * * `run` - Run
+ * * `skip` - Skip
+ * * `error` - Error
+ */
+export type SignalScoutConfigPrecheckOutcomeEnumApi =
+ (typeof SignalScoutConfigPrecheckOutcomeEnumApi)[keyof typeof SignalScoutConfigPrecheckOutcomeEnumApi]
+
+export const SignalScoutConfigPrecheckOutcomeEnumApi = {
+ Run: 'run',
+ Skip: 'skip',
+ Error: 'error',
+} as const
+
/**
* Optional JSON Schema (draft 2020-12) describing ONE structured record this scout produces via `scout-record-output` — e.g. a per-report quality judgment (`{"type": "object", "properties": {"verdict": {"enum": ["good", "bad", "unsure"]}, "reason": {"type": "string"}}, "required": ["verdict", "reason"]}`). The root must be `"type": "object"`. Setting a schema turns the structured-output channel on: the run prompt renders the schema and every submitted record is validated against it and recorded in the project as a `$scout_structured_output` event, queryable like any event. The channel also requires emit — a dry-run scout has nowhere to record to. Cardinality is the scout's call (one record per run, one per judged entity, ...). Null = channel off. Setting a schema requires skill-authoring authorization (the `llm_skill:write` scope and skill editor access) since the scout reads it verbatim in its prompt; clearing it needs only the config write. Records validate against the schema in force when the run was dispatched.
* @nullable
@@ -3912,6 +3926,22 @@ export interface SignalScoutConfigApi {
readonly effective_precheck_query: string | null
/** Where `effective_precheck_query` comes from: `config` (this scout's `precheck_query`), `skill_default` (the default its skill ships), or `off` (no pre-check runs). */
readonly precheck_query_source: ScoutPrecheckQuerySourceEnumApi
+ /**
+ * When a scheduled run last evaluated this scout's pre-check. A skipped run writes no run row, so this stays recent while `last_run_at` ages. Null if no pre-check has run.
+ * @nullable
+ */
+ readonly last_precheck_at: string | null
+ /** The outcome of the latest scheduled pre-check: `run` (the query found something new), `skip` (nothing new, so the run did not start), or `error` (the query failed and the run started). Null if no pre-check has run.
+ *
+ * * `run` - Run
+ * * `skip` - Skip
+ * * `error` - Error */
+ readonly last_precheck_outcome: SignalScoutConfigPrecheckOutcomeEnumApi | null
+ /**
+ * How many rows the latest scheduled pre-check returned, at most 50. Null if no pre-check has run.
+ * @nullable
+ */
+ readonly last_precheck_row_count: number | null
/**
* When the coordinator last dispatched this scout. Null if it has never run.
* @nullable
diff --git a/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts b/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts
index c0935cf5256f..51d1504268cf 100644
--- a/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts
+++ b/products/signals/frontend/inbox/__mocks__/scoutConfigs.ts
@@ -51,6 +51,9 @@ function makeMockScout(overrides: MockScoutOverrides): SignalScoutConfigApi {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
last_run_at: null,
consecutive_failure_count: 0,
status_changed_at: null,
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutCadenceLabel.test.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutCadenceLabel.test.tsx
index 6cb72af8938e..02ac78674069 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutCadenceLabel.test.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutCadenceLabel.test.tsx
@@ -39,6 +39,9 @@ const config: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
tags: [],
source_product: null,
source_id: null,
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutConfigControls.test.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutConfigControls.test.tsx
index d8de2e00a984..1ae612341770 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutConfigControls.test.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutConfigControls.test.tsx
@@ -45,6 +45,9 @@ const config: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
tags: [],
source_product: null,
source_id: null,
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutNextRunLabel.test.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutNextRunLabel.test.tsx
index e5db30f758fc..9111ac5fd941 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutNextRunLabel.test.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutNextRunLabel.test.tsx
@@ -41,6 +41,9 @@ const config: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
tags: [],
source_product: null,
source_id: null,
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutTags.stories.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutTags.stories.tsx
index ba4a847ea058..dfb7dd3d774b 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutTags.stories.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutTags.stories.tsx
@@ -39,6 +39,9 @@ const config: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
last_run_at: null,
consecutive_failure_count: 0,
status_changed_at: null,
diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessSection.test.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessSection.test.tsx
index 14295a31da6e..9d846ad1ef0a 100644
--- a/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessSection.test.tsx
+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutWriteAccessSection.test.tsx
@@ -41,6 +41,9 @@ const CONFIG: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
tags: [],
source_product: null,
source_id: null,
diff --git a/products/signals/frontend/inbox/components/config/scouts/trials/scoutTrialsFixtures.ts b/products/signals/frontend/inbox/components/config/scouts/trials/scoutTrialsFixtures.ts
index 0bd4fdce019c..038132c9b02f 100644
--- a/products/signals/frontend/inbox/components/config/scouts/trials/scoutTrialsFixtures.ts
+++ b/products/signals/frontend/inbox/components/config/scouts/trials/scoutTrialsFixtures.ts
@@ -34,6 +34,9 @@ export const trialFixtureConfig: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
last_run_at: null,
consecutive_failure_count: 0,
status_changed_at: null,
diff --git a/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts b/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts
index 64b78702cfeb..b1272ce0784a 100644
--- a/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/scoutCreateModalLogic.test.ts
@@ -68,6 +68,9 @@ const CREATED_SCOUT: SignalScoutCreateResponseApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
source_product: null,
source_id: null,
created_at: '2026-07-24T00:00:00Z',
diff --git a/products/signals/frontend/inbox/logics/scoutFleetLogic.test.ts b/products/signals/frontend/inbox/logics/scoutFleetLogic.test.ts
index 419335a94517..367000202c4e 100644
--- a/products/signals/frontend/inbox/logics/scoutFleetLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/scoutFleetLogic.test.ts
@@ -96,6 +96,9 @@ const BASE_CONFIG: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
source_product: null,
source_id: null,
created_at: '2026-07-22T00:00:00Z',
diff --git a/products/signals/frontend/inbox/logics/scoutSuggestionsLogic.test.ts b/products/signals/frontend/inbox/logics/scoutSuggestionsLogic.test.ts
index bb0966fcbe70..b5e6db4cd80f 100644
--- a/products/signals/frontend/inbox/logics/scoutSuggestionsLogic.test.ts
+++ b/products/signals/frontend/inbox/logics/scoutSuggestionsLogic.test.ts
@@ -122,6 +122,9 @@ const CONFIG: SignalScoutConfigApi = {
precheck_disabled: false,
effective_precheck_query: null,
precheck_query_source: 'off',
+ last_precheck_at: null,
+ last_precheck_outcome: null,
+ last_precheck_row_count: null,
source_product: null,
source_id: null,
created_at: '2026-07-22T00:00:00Z',
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 7f2bc3952a99..da8ac661d877 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -99228,6 +99228,20 @@ export namespace Schemas {
Off: 'off',
} as const;
+ /**
+ * * `run` - Run
+ * * `skip` - Skip
+ * * `error` - Error
+ */
+ export type SignalScoutConfigPrecheckOutcomeEnum = typeof SignalScoutConfigPrecheckOutcomeEnum[keyof typeof SignalScoutConfigPrecheckOutcomeEnum];
+
+
+ export const SignalScoutConfigPrecheckOutcomeEnum = {
+ Run: 'run',
+ Skip: 'skip',
+ Error: 'error',
+ } as const;
+
/**
* Optional JSON Schema (draft 2020-12) describing ONE structured record this scout produces via `scout-record-output` — e.g. a per-report quality judgment (`{"type": "object", "properties": {"verdict": {"enum": ["good", "bad", "unsure"]}, "reason": {"type": "string"}}, "required": ["verdict", "reason"]}`). The root must be `"type": "object"`. Setting a schema turns the structured-output channel on: the run prompt renders the schema and every submitted record is validated against it and recorded in the project as a `$scout_structured_output` event, queryable like any event. The channel also requires emit — a dry-run scout has nowhere to record to. Cardinality is the scout's call (one record per run, one per judged entity, ...). Null = channel off. Setting a schema requires skill-authoring authorization (the `llm_skill:write` scope and skill editor access) since the scout reads it verbatim in its prompt; clearing it needs only the config write. Records validate against the schema in force when the run was dispatched.
* @nullable
@@ -99353,6 +99367,22 @@ export namespace Schemas {
readonly effective_precheck_query: string | null;
/** Where `effective_precheck_query` comes from: `config` (this scout's `precheck_query`), `skill_default` (the default its skill ships), or `off` (no pre-check runs). */
readonly precheck_query_source: ScoutPrecheckQuerySourceEnum;
+ /**
+ * When a scheduled run last evaluated this scout's pre-check. A skipped run writes no run row, so this stays recent while `last_run_at` ages. Null if no pre-check has run.
+ * @nullable
+ */
+ readonly last_precheck_at: string | null;
+ /** The outcome of the latest scheduled pre-check: `run` (the query found something new), `skip` (nothing new, so the run did not start), or `error` (the query failed and the run started). Null if no pre-check has run.
+ *
+ * * `run` - Run
+ * * `skip` - Skip
+ * * `error` - Error */
+ readonly last_precheck_outcome: SignalScoutConfigPrecheckOutcomeEnum | null;
+ /**
+ * How many rows the latest scheduled pre-check returned, at most 50. Null if no pre-check has run.
+ * @nullable
+ */
+ readonly last_precheck_row_count: number | null;
/**
* When the coordinator last dispatched this scout. Null if it has never run.
* @nullable