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): default PR auto-start threshold to P4 and remove threshold UI (#65263)

Joshua Snyder02a4a71fb16b
diff --git a/frontend/snapshots.yml b/frontend/snapshots.yml
index 7f7e5d05d91e..020a3049fc8a 100644
--- a/frontend/snapshots.yml
+++ b/frontend/snapshots.yml
@@ -5467,9 +5467,9 @@ snapshots:
scenes-app-inbox-detail--run-ready--light:
hash: v1.k794b7964.4050eb15b9d9c5ac9e2783ff55bdb3db37852d43f71832a59f308396a01c5a14.a5dDQZ2UQnE2VDGVWxSmlofmqd3niKKdxyrO1KQ9YKU
scenes-app-inbox-scene--empty--dark:
- hash: v1.k794b7964.7294afe8f41728a213a9bd48eb918ec4902887b5b39a94d03fa2c0b48c0d032f.HrAifApnGeL2Y60UklnooAEi4ah0uvR7Q5SUCkjPJXM
+ hash: v1.k794b7964.5e028d969ab0fde2b308bbc3bbc78ef671a5892454486d07739b43dd9a11fe2f.-cAwhDDmKAi9Ps2rzFpfUBl7Dc5RaHFxzLfHDR2XJRo
scenes-app-inbox-scene--empty--light:
- hash: v1.k794b7964.3a6ce65683bc9764a08ec055328b6962ae4b00769fb380fa1d054eced1fbae8f.I-sQDDqLKSgM2bjN6f2kjSFb0d20htIXWwumGqOqR78
+ hash: v1.k794b7964.9e7ec94a31e2f894d70eec79f0747b51ae66f97fddd11a9cafbaf4570ad58d0f.vNN8ruYbbKTfj_3Do3q7R_XvQJfilsTZl8cL8YDJaM0
scenes-app-inbox-scene--inbox--dark:
hash: v1.k794b7964.7ac4cd509a3cc40957183200e2055e8ee10fa7ebb4638b886edec47956f3d69a.Kue4fX-RZ4gJowrkDXGSM_LvrLNTzeG98HLiXWgyf84
scenes-app-inbox-scene--inbox--light:
diff --git a/frontend/src/scenes/inbox/components/config/AgentsTab.tsx b/frontend/src/scenes/inbox/components/config/AgentsTab.tsx
index bff5402544fc..a7cdacb32f0d 100644
--- a/frontend/src/scenes/inbox/components/config/AgentsTab.tsx
+++ b/frontend/src/scenes/inbox/components/config/AgentsTab.tsx
@@ -17,7 +17,6 @@ import { SourceIcon } from 'products/data_warehouse/frontend/shared/components/S
import { SessionAnalysisSetup } from '../../SessionAnalysisSetup'
import { signalSourcesLogic } from '../../signalSourcesLogic'
import { AgentsRoster } from './AgentsRoster'
-import { AutoStartThresholdSection } from './AutoStartThresholdSection'
import { ConnectionsSection } from './ConnectionsSection'
import { McpServersSection } from './McpServersSection'
import { ScoutsFleetSection } from './scouts/ScoutsFleetSection'
@@ -64,7 +63,7 @@ function BackLink({ onClick }: { onClick: () => void }): JSX.Element {
/**
* Full-page Agents tab body for cloud Inbox – a high-fidelity port of the
* PostHog Code desktop Agents view. Composes Connections, the agent roster,
- * Slack, auto-start, and MCP servers. Session-analysis and data-source setup
+ * Slack, and MCP servers. Session-analysis and data-source setup
* render inline (replacing the roster) when their sub-flow is open.
*/
export function AgentsTab(): JSX.Element {
@@ -140,13 +139,6 @@ export function AgentsTab(): JSX.Element {
</Subsection>
)}
- <Subsection
- title="Auto-start"
- description="Self-driving can start coding tasks automatically when a report is immediately actionable and assigned to you."
- >
- <AutoStartThresholdSection />
- </Subsection>
-
<Subsection
title="MCP servers"
description="External tools agents can read from. PostHog data is always available; this is everything else."
diff --git a/frontend/src/scenes/inbox/components/config/AutoStartThresholdSection.tsx b/frontend/src/scenes/inbox/components/config/AutoStartThresholdSection.tsx
deleted file mode 100644
index b31d80ef3b92..000000000000
--- a/frontend/src/scenes/inbox/components/config/AutoStartThresholdSection.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { useActions, useMountedLogic, useValues } from 'kea'
-import { useEffect } from 'react'
-
-import { IconBolt, IconPeople } from '@posthog/icons'
-import { LemonSelect, LemonSkeleton } from '@posthog/lemon-ui'
-
-import { signalTeamConfigLogic } from '../../logics/signalTeamConfigLogic'
-import { userAutonomyLogic } from '../../logics/userAutonomyLogic'
-import { SignalReportPriority } from '../../types'
-
-const NEVER_AUTOSTART_VALUE = '__never__'
-
-/** P0–P4, matching desktop `AUTOSTART_PRIORITY_OPTIONS`. The team default is non-nullable, so no "Never". */
-const TEAM_AUTOSTART_OPTIONS: { value: SignalReportPriority; label: string }[] = [
- { value: 'P0', label: 'P0 – Critical only' },
- { value: 'P1', label: 'P1 – High and above' },
- { value: 'P2', label: 'P2 – Medium and above' },
- { value: 'P3', label: 'P3 – Low and above' },
- { value: 'P4', label: 'P4 – All priorities' },
-]
-
-/** Per-user override adds "Never – review everything first" on top of the team options. */
-const USER_AUTOSTART_OPTIONS: { value: string; label: string }[] = [
- { value: NEVER_AUTOSTART_VALUE, label: 'Never – review everything first' },
- ...TEAM_AUTOSTART_OPTIONS,
-]
-
-function TeamDefaultRow(): JSX.Element {
- useMountedLogic(signalTeamConfigLogic)
- const { teamConfig, teamConfigLoading } = useValues(signalTeamConfigLogic)
- const { loadTeamConfig, setDefaultAutostartPriority } = useActions(signalTeamConfigLogic)
-
- useEffect(() => {
- loadTeamConfig()
- }, []) // eslint-disable-line react-hooks/exhaustive-deps
-
- // Backend defaults this to P2, but the row may be unloaded; fall back to P2 for display.
- const value = teamConfig?.default_autostart_priority ?? 'P2'
-
- return (
- <div className="flex items-center justify-between gap-4 rounded border bg-bg-light px-3 py-2.5">
- <div className="flex items-start gap-3 min-w-0">
- <IconPeople className="size-5 shrink-0 mt-0.5 text-secondary" />
- <div className="min-w-0">
- <div className="font-medium text-sm text-default">Team default auto-create PR threshold</div>
- <p className="text-xs text-secondary mt-0.5 mb-0 max-w-xl">
- The starting point for everyone on this team. Individuals can override it for themselves below.
- </p>
- </div>
- </div>
- {teamConfigLoading && teamConfig === null ? (
- <LemonSkeleton className="h-8 w-[260px] shrink-0" />
- ) : (
- <LemonSelect
- className="min-w-[260px] shrink-0"
- value={value}
- options={TEAM_AUTOSTART_OPTIONS}
- onChange={(next) => setDefaultAutostartPriority(next as SignalReportPriority)}
- />
- )}
- </div>
- )
-}
-
-function UserOverrideRow(): JSX.Element {
- useMountedLogic(userAutonomyLogic)
- const { autonomyConfig, autonomyConfigLoading } = useValues(userAutonomyLogic)
- const { setAutostartPriority } = useActions(userAutonomyLogic)
-
- const value = autonomyConfig?.autostart_priority ?? NEVER_AUTOSTART_VALUE
-
- return (
- <div className="flex items-center justify-between gap-4 rounded border bg-bg-light px-3 py-2.5">
- <div className="flex items-start gap-3 min-w-0">
- <IconBolt className="size-5 shrink-0 mt-0.5 text-secondary" />
- <div className="min-w-0">
- <div className="font-medium text-sm text-default">Your auto-create PR threshold</div>
- <p className="text-xs text-secondary mt-0.5 mb-0 max-w-xl">
- Reports at or above this priority automatically open a pull request for you. The backend
- deduplicates per report, and these runs count toward usage.
- </p>
- </div>
- </div>
- {autonomyConfigLoading && autonomyConfig === null ? (
- <LemonSkeleton className="h-8 w-[260px] shrink-0" />
- ) : (
- <LemonSelect
- className="min-w-[260px] shrink-0"
- value={value}
- options={USER_AUTOSTART_OPTIONS}
- onChange={(next) =>
- setAutostartPriority(next === NEVER_AUTOSTART_VALUE ? null : (next as SignalReportPriority))
- }
- />
- )}
- </div>
- )
-}
-
-export function AutoStartThresholdSection(): JSX.Element {
- return (
- <div className="flex flex-col gap-3">
- <TeamDefaultRow />
- <UserOverrideRow />
- </div>
- )
-}
diff --git a/frontend/src/scenes/inbox/components/shell/AgentSetupColumn.tsx b/frontend/src/scenes/inbox/components/shell/AgentSetupColumn.tsx
index eaa9c5b71104..5080640cc682 100644
--- a/frontend/src/scenes/inbox/components/shell/AgentSetupColumn.tsx
+++ b/frontend/src/scenes/inbox/components/shell/AgentSetupColumn.tsx
@@ -1,14 +1,6 @@
import { useActions, useMountedLogic, useValues } from 'kea'
-import {
- IconBolt,
- IconCheckCircle,
- IconChevronRight,
- IconCompass,
- IconGithub,
- IconPullRequest,
- IconServer,
-} from '@posthog/icons'
+import { IconBolt, IconCheckCircle, IconChevronRight, IconCompass, IconGithub, IconServer } from '@posthog/icons'
import { LemonModal, LemonSkeleton, LemonTag, Link } from '@posthog/lemon-ui'
import { mcpStoreLogic } from '@posthog/products-mcp-store/frontend/mcpStoreLogic'
import { ServerIcon } from '@posthog/products-mcp-store/frontend/scene/icons'
@@ -20,10 +12,8 @@ import { cn } from 'lib/utils/css-classes'
import { urls } from 'scenes/urls'
import { scoutFleetLogic } from '../../logics/scoutFleetLogic'
-import { signalTeamConfigLogic } from '../../logics/signalTeamConfigLogic'
import { userAutonomyLogic } from '../../logics/userAutonomyLogic'
import { signalSourcesLogic } from '../../signalSourcesLogic'
-import { AutoStartThresholdSection } from '../config/AutoStartThresholdSection'
import { ScoutsFleetSection } from '../config/scouts/ScoutsFleetSection'
import { SignalSourcesPanel } from '../config/SignalSourcesPanel'
import { SlackNotificationsSection } from '../config/SlackNotificationsSection'
@@ -258,25 +248,6 @@ function NotificationsWidget(): JSX.Element {
)
}
-function AutoStartWidget(): JSX.Element {
- useMountedLogic(signalTeamConfigLogic)
- const { autonomyConfig, autonomyConfigLoading } = useValues(userAutonomyLogic)
- const { openSetupModal } = useActions(agentSetupModalLogic)
-
- const userPriority = autonomyConfig?.autostart_priority ?? null
- return (
- <SetupWidgetCard
- icon={<IconPullRequest />}
- title="Auto-create PR"
- size="sm"
- tone="neutral"
- loading={autonomyConfigLoading && autonomyConfig === null}
- status={userPriority ? `${userPriority}+` : 'Off for you'}
- onClick={() => openSetupModal('auto-start')}
- />
- )
-}
-
/** Section heading styled like a LemonTabs label (same 14px scale, tertiary color) so the
* rail reads as a sibling of the tab bar rather than a louder header. */
function SetupSection({ title, children }: { title: string; children: React.ReactNode }): JSX.Element {
@@ -310,13 +281,6 @@ const SETUP_MODALS: Record<
width: 560,
body: <SlackNotificationsSection />,
},
- 'auto-start': {
- title: 'Auto-create PR',
- description:
- 'Automatically open a pull request for an actionable report at or above a priority threshold – set the team default and your personal override.',
- width: 560,
- body: <AutoStartThresholdSection />,
- },
}
function SetupModal(): JSX.Element {
@@ -337,9 +301,9 @@ function SetupModal(): JSX.Element {
}
/**
- * The agent-setup widgets, grouped into Agents / Connections / Preferences. Each widget shows
+ * The agent-setup widgets, grouped into Agents / Connections. Each widget shows
* status and nudges the user to finish that part of the setup. Signal sources and Scout troop
- * (most edited) are largest; connections medium; Auto-create PR compact. Code access and MCP link
+ * (most edited) are largest; connections medium. Code access and MCP link
* out to settings; the rest open a management modal.
*
* Rendered two ways: `rail` (a column to the right of the tabs on wide viewports) and
@@ -365,9 +329,6 @@ export function AgentSetupColumn({ layout }: { layout: 'rail' | 'stacked' }): JS
<NotificationsWidget />
<McpServersWidget />
</SetupSection>
- <SetupSection title="Preferences">
- <AutoStartWidget />
- </SetupSection>
<SetupModal />
</div>
)
diff --git a/frontend/src/scenes/inbox/components/shell/agentSetupModalLogic.ts b/frontend/src/scenes/inbox/components/shell/agentSetupModalLogic.ts
index 6787835afb0f..39af9253b243 100644
--- a/frontend/src/scenes/inbox/components/shell/agentSetupModalLogic.ts
+++ b/frontend/src/scenes/inbox/components/shell/agentSetupModalLogic.ts
@@ -3,7 +3,7 @@ import { actions, kea, path, reducers } from 'kea'
import type { agentSetupModalLogicType } from './agentSetupModalLogicType'
/** Setup widgets whose management UI opens in a modal. GitHub and MCP servers link out instead. */
-export type AgentSetupModalKey = 'signal-sources' | 'scout-troop' | 'slack' | 'auto-start'
+export type AgentSetupModalKey = 'signal-sources' | 'scout-troop' | 'slack'
/** Tracks which agent-setup widget's modal is open (one at a time), driven from the widget strip. */
export const agentSetupModalLogic = kea<agentSetupModalLogicType>([
diff --git a/products/signals/ARCHITECTURE.md b/products/signals/ARCHITECTURE.md
index dc921240dcc8..ac33c9b3b1d2 100644
--- a/products/signals/ARCHITECTURE.md
+++ b/products/signals/ARCHITECTURE.md
@@ -429,8 +429,8 @@ Per-team singleton config for Signals settings, including the default autonomy p
Notes:
- Auto-created as a team extension via `register_team_extension_signal`
-- `default_autostart_priority` defaults to `P0`
-- Individual users can override this threshold via `SignalUserAutonomyConfig.autostart_priority`
+- `default_autostart_priority` defaults to `P4` (every report priority auto-starts). The threshold is no longer user-configurable in the inbox UI; everyone runs on this default.
+- `SignalUserAutonomyConfig.autostart_priority` can still hold a per-user override at the data layer (`null` = use the team default), but there is no UI to set it.
### `SignalUserAutonomyConfig`
diff --git a/products/signals/backend/auto_start.py b/products/signals/backend/auto_start.py
index db394837d698..c2ee69b732d0 100644
--- a/products/signals/backend/auto_start.py
+++ b/products/signals/backend/auto_start.py
@@ -173,7 +173,7 @@ async def maybe_autostart_implementation_task(
team = await Team.objects.select_related("organization").aget(id=team_id)
team_config = await SignalTeamConfig.objects.filter(team_id=team_id).afirst()
- team_default_priority = Priority(team_config.default_autostart_priority) if team_config else Priority.P2
+ team_default_priority = Priority(team_config.default_autostart_priority) if team_config else Priority.P4
task_user = await database_sync_to_async(_resolve_autostart_assignee, thread_sensitive=False)(
team_id, priority.priority, reviewers_content, team_default_priority
diff --git a/products/signals/backend/migrations/0045_signalteamconfig_default_autostart_priority_p4.py b/products/signals/backend/migrations/0045_signalteamconfig_default_autostart_priority_p4.py
new file mode 100644
index 000000000000..bbeb538904a6
--- /dev/null
+++ b/products/signals/backend/migrations/0045_signalteamconfig_default_autostart_priority_p4.py
@@ -0,0 +1,19 @@
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("signals", "0044_alter_signalscoutconfig_run_interval_minutes"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="signalteamconfig",
+ name="default_autostart_priority",
+ field=models.CharField(
+ choices=[("P0", "P0"), ("P1", "P1"), ("P2", "P2"), ("P3", "P3"), ("P4", "P4")],
+ default="P4",
+ max_length=2,
+ ),
+ ),
+ ]
diff --git a/products/signals/backend/migrations/0046_signalteamconfig_backfill_default_autostart_p4.py b/products/signals/backend/migrations/0046_signalteamconfig_backfill_default_autostart_p4.py
new file mode 100644
index 000000000000..93d1533ab82c
--- /dev/null
+++ b/products/signals/backend/migrations/0046_signalteamconfig_backfill_default_autostart_p4.py
@@ -0,0 +1,33 @@
+from django.db import migrations
+
+
+def reset_everyone_to_p4_default(apps, schema_editor):
+ """Land everyone on the new P4 auto-start default.
+
+ The per-user / per-team threshold UI is being removed, so there's no longer a
+ way to pick a value — everyone runs on the team default, which is now P4.
+
+ 1. Move every team config up to P4. The threshold was previously editable, so
+ a row may hold any value (P0–P4); a single unfiltered UPDATE is cheap since
+ SignalTeamConfig has one row per team.
+ 2. Clear any per-user override (set ``autostart_priority`` to NULL) so it falls
+ back to the team default of P4. We leave the rest of the row intact, so Slack
+ notification settings on the same model are preserved. Users who explicitly
+ opted out delete their whole config row, so they have no row here and stay
+ opted out — this only touches rows that already exist.
+ """
+ SignalTeamConfig = apps.get_model("signals", "SignalTeamConfig")
+ SignalTeamConfig.objects.exclude(default_autostart_priority="P4").update(default_autostart_priority="P4")
+
+ SignalUserAutonomyConfig = apps.get_model("signals", "SignalUserAutonomyConfig")
+ SignalUserAutonomyConfig.objects.exclude(autostart_priority__isnull=True).update(autostart_priority=None)
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("signals", "0045_signalteamconfig_default_autostart_priority_p4"),
+ ]
+
+ operations = [
+ migrations.RunPython(reset_everyone_to_p4_default, migrations.RunPython.noop),
+ ]
diff --git a/products/signals/backend/migrations/max_migration.txt b/products/signals/backend/migrations/max_migration.txt
index ad4634035661..33653aebac2a 100644
--- a/products/signals/backend/migrations/max_migration.txt
+++ b/products/signals/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0044_alter_signalscoutconfig_run_interval_minutes
+0046_signalteamconfig_backfill_default_autostart_p4
diff --git a/products/signals/backend/models.py b/products/signals/backend/models.py
index cb42c2518ef2..8e9c14d1de75 100644
--- a/products/signals/backend/models.py
+++ b/products/signals/backend/models.py
@@ -105,7 +105,7 @@ class SignalTeamConfig(UUIDModel):
on_delete=models.CASCADE,
related_name="signal_team_config",
)
- default_autostart_priority = models.CharField(max_length=2, choices=AutonomyPriority, default=AutonomyPriority.P2)
+ default_autostart_priority = models.CharField(max_length=2, choices=AutonomyPriority, default=AutonomyPriority.P4)
default_slack_notification_channel = models.CharField(max_length=255, null=True, blank=True)
autostart_base_branches = models.JSONField(default=dict, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
diff --git a/products/signals/backend/test/test_signal_team_config_api.py b/products/signals/backend/test/test_signal_team_config_api.py
index 8fb7c9804213..b089ad21eef1 100644
--- a/products/signals/backend/test/test_signal_team_config_api.py
+++ b/products/signals/backend/test/test_signal_team_config_api.py
@@ -20,7 +20,7 @@ class TestSignalTeamConfigAPI(APIBaseTest):
data = response.json()
assert response.status_code == status.HTTP_200_OK, data
assert data["default_slack_notification_channel"] is None
- assert data["default_autostart_priority"] == "P2"
+ assert data["default_autostart_priority"] == "P4"
def test_get_config_lazily_creates_when_no_config_exists(self):
self.config.delete()
@@ -28,7 +28,7 @@ class TestSignalTeamConfigAPI(APIBaseTest):
response = self.client.get(self._url())
data = response.json()
assert response.status_code == status.HTTP_200_OK, data
- assert data["default_autostart_priority"] == "P2"
+ assert data["default_autostart_priority"] == "P4"
assert data["default_slack_notification_channel"] is None
assert SignalTeamConfig.objects.filter(team=self.team).exists()