: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(tasks): start inbox discuss and detail-page runs in interactive mode (#72813)
Georgiy Tarasovb02be9484004
diff --git a/frontend/src/scenes/inbox/inboxTaskKickoffLogic.ts b/frontend/src/scenes/inbox/inboxTaskKickoffLogic.tsindex 370a9ef5755a..0905c5424547 100644--- a/frontend/src/scenes/inbox/inboxTaskKickoffLogic.ts+++ b/frontend/src/scenes/inbox/inboxTaskKickoffLogic.ts@@ -7,7 +7,7 @@ import api from 'lib/api'import { urls } from 'scenes/urls'import { OriginProduct } from 'products/posthog_ai/frontend/types/taskTypes'-import { RunSourceEnumApi } from 'products/tasks/frontend/generated/api.schemas'+import { RunSourceEnumApi, TaskExecutionModeEnumApi } from 'products/tasks/frontend/generated/api.schemas'import {SIGNAL_REPORT_TASK_DISCUSSION_RELATIONSHIP,@@ -93,6 +93,10 @@ async function createReportTask(await api.tasks.run(task.id, {run_source: RunSourceEnumApi.SignalReport,signal_report_id: report.id,+ // Interactive, not the default background: the user lands on the run page right away, and the+ // agent-server only relays AskUserQuestion (and other approval prompts) to the client on+ // non-background runs — a background run's questions are parked and never rendered as a form.+ mode: TaskExecutionModeEnumApi.Interactive,})router.actions.push(urls.taskDetail(task.id))diff --git a/products/posthog_ai/frontend/logics/taskLogic.ts b/products/posthog_ai/frontend/logics/taskLogic.tsindex 230b3271ecb1..6603fc992894 100644--- a/products/posthog_ai/frontend/logics/taskLogic.ts+++ b/products/posthog_ai/frontend/logics/taskLogic.ts@@ -4,6 +4,8 @@ import { router } from 'kea-router'import api from 'lib/api'+import { TaskExecutionModeEnumApi } from 'products/tasks/frontend/generated/api.schemas'+import { isApiNotFound, loadErrorMessage } from '../lib/load-error'import { phDebugQueryParams } from '../lib/ph-debug'import { Task, type TaskUpsertProps } from '../types/taskTypes'@@ -115,7 +117,10 @@ export const taskLogic = kea<taskLogicType>([}},runTask: async () => {- return await api.tasks.run(props.taskId)+ // Interactive, not the default background: this run starts from the detail page the user+ // is watching, and the agent-server only relays AskUserQuestion (and other approval+ // prompts) to the client on non-background runs.+ return await api.tasks.run(props.taskId, { mode: TaskExecutionModeEnumApi.Interactive })},deleteTask: async () => {await api.tasks.delete(props.taskId)