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(signals): avoid redundant inbox discussion notes (#92933)

Dylan Martin873cf8599405
diff --git a/products/desktop/packages/api-client/src/posthog-client.ts b/products/desktop/packages/api-client/src/posthog-client.ts
index f4b8c457ef72..82377d9bbc46 100644
--- a/products/desktop/packages/api-client/src/posthog-client.ts
+++ b/products/desktop/packages/api-client/src/posthog-client.ts
@@ -2980,6 +2980,7 @@ export class PostHogAPIClient {
github_integration?: number | null;
github_user_integration?: string | null;
signal_report_task_relationship?: string;
+ signal_report_discussion_question?: string;
branch?: string | null;
runtime_adapter?: string | null;
model?: string | null;
diff --git a/products/desktop/packages/core/src/task-detail/taskCreationSaga.test.ts b/products/desktop/packages/core/src/task-detail/taskCreationSaga.test.ts
index 287fee11dd86..58b9eb60071c 100644
--- a/products/desktop/packages/core/src/task-detail/taskCreationSaga.test.ts
+++ b/products/desktop/packages/core/src/task-detail/taskCreationSaga.test.ts
@@ -1045,6 +1045,7 @@ describe("TaskCreationSaga", () => {
cloudRunSource: "signal_report",
signalReportId: "report-123",
signalReportTaskRelationship: "discussion",
+ signalReportDiscussionQuestion: "why?",
githubIntegrationId: 123,
});
@@ -1061,6 +1062,7 @@ describe("TaskCreationSaga", () => {
repositories: undefined,
signal_report: "report-123",
signal_report_task_relationship: "discussion",
+ signal_report_discussion_question: "why?",
}),
);
expect(createTaskRunMock).toHaveBeenCalledWith(
diff --git a/products/desktop/packages/core/src/task-detail/taskCreationSaga.ts b/products/desktop/packages/core/src/task-detail/taskCreationSaga.ts
index 96122df0fd04..49b10f6c08c5 100644
--- a/products/desktop/packages/core/src/task-detail/taskCreationSaga.ts
+++ b/products/desktop/packages/core/src/task-detail/taskCreationSaga.ts
@@ -877,6 +877,9 @@ export class TaskCreationSaga extends Saga<
signal_report_task_relationship: input.signalReportId
? input.signalReportTaskRelationship
: undefined,
+ signal_report_discussion_question: input.signalReportId
+ ? input.signalReportDiscussionQuestion
+ : undefined,
branch:
input.workspaceMode === "cloud" && canActivateWarmRun
? (input.branch ?? null)
diff --git a/products/desktop/packages/shared/src/task-creation-domain.ts b/products/desktop/packages/shared/src/task-creation-domain.ts
index 7654b180a95a..114d30faa06f 100644
--- a/products/desktop/packages/shared/src/task-creation-domain.ts
+++ b/products/desktop/packages/shared/src/task-creation-domain.ts
@@ -67,6 +67,8 @@ export interface TaskCreationInput {
* label itself. Only sent when signalReportId is set.
*/
signalReportTaskRelationship?: string;
+ /** Empty suppresses the scout note; omitted falls back to parsing taskDescription for older clients. */
+ signalReportDiscussionQuestion?: string;
additionalDirectories?: string[];
/**
* CONTEXT.md of the channel a task was created in, if any. Appended to the
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.test.tsx b/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.test.tsx
index ae2b38be726a..213193cbf990 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.test.tsx
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.test.tsx
@@ -123,6 +123,7 @@ describe("useDiscussReport", () => {
expect(input.signalReportId).toBe("r1");
// Routed to the discussion cap, not the report's one-live-PR gate.
expect(input.signalReportTaskRelationship).toBe("discussion");
+ expect(input.signalReportDiscussionQuestion).toBe("why?");
// First message: question leading, whole report + evidence behind it.
expect(input.content).toContain("Answer this first: why?");
expect(input.content).toContain("# Report: Return 400 instead of 500");
diff --git a/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.ts b/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.ts
index e66fe0cf1737..38c41356a959 100644
--- a/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.ts
+++ b/products/desktop/packages/ui/src/features/inbox/hooks/useDiscussReport.ts
@@ -102,6 +102,7 @@ export function useDiscussReport({
// Routes the per-report cap: a discussion must not consume the
// report's one-live-implementation (PR) gate.
signalReportTaskRelationship: "discussion",
+ signalReportDiscussionQuestion: question?.trim() ?? "",
// Files the session in the report's space so it shows in that
// space's Sessions tab; without it the task belongs to no space.
channelId: channelId ?? undefined,
diff --git a/products/signals/backend/discussion_notes.py b/products/signals/backend/discussion_notes.py
index 3e6418116cf7..88e5c9de5772 100644
--- a/products/signals/backend/discussion_notes.py
+++ b/products/signals/backend/discussion_notes.py
@@ -61,6 +61,9 @@ _PROMPT_PREFIXES = (
"answer this question about the posthog inbox report at ",
"a user sent this about the posthog inbox report at ",
)
+_DESKTOP_DESCRIPTION_PREFIX = "Discuss report: "
+# Keep in sync with `buildDiscussDescription` in the Desktop inbox hook.
+_DESKTOP_DESCRIPTION_MAX_CHARS = 200
def forward_discussion_note(
@@ -68,6 +71,7 @@ def forward_discussion_note(
team: Team,
report_id: str,
text: str,
+ question: str | None,
user_id: int | None,
scoped_team_ids: Sequence[int] | None,
api_scopes: Sequence[str] | None,
@@ -83,13 +87,17 @@ def forward_discussion_note(
runs inside one failure boundary, because authorization and target resolution both read the
database.
"""
- if not text or not text.strip():
+ if question is not None:
+ if not question.strip():
+ return None
+ elif not text or not text.strip():
return None
try:
return _forward(
team=team,
report_id=str(report_id),
text=text,
+ question=question,
user_id=user_id,
scoped_team_ids=scoped_team_ids,
api_scopes=api_scopes,
@@ -107,14 +115,11 @@ def _forward(
team: Team,
report_id: str,
text: str,
+ question: str | None,
user_id: int | None,
scoped_team_ids: Sequence[int] | None,
api_scopes: Sequence[str] | None,
) -> str | None:
- question = _extract_question(text)
- if not question:
- return None
-
# Scout rows and their notes live under the canonical parent team; forwarding a child
# environment's question would hand its report id, title, and text to an audience that may
# have no access to that environment. Those discussions stay on the task only.
@@ -131,8 +136,16 @@ def _forward(
if report is None:
return None
+ note_question = (
+ question.strip()
+ if question is not None
+ else _extract_question(text, report_title=report.title, report_id=report_id)
+ )
+ if not note_question:
+ return None
+
skill_name = resolve_report_scout_skill(canonical_team.id, report_id)
- content = _build_note_content(report=report, question=question)
+ content = _build_note_content(report=report, question=note_question)
created = leave_note(
team_id=canonical_team.id,
content=content,
@@ -164,19 +177,24 @@ def _scopes_allow_note_write(api_scopes: Sequence[str]) -> bool:
return "*" in scopes or scopes.issuperset(_REQUIRED_NOTE_SCOPES)
-def _extract_question(text: str) -> str:
- """Pull the user's question out of the kickoff prompt, tolerating format drift.
-
- The prompt's first line is the report link; what the user typed follows it. Text that doesn't
- carry the prefix is forwarded whole, so a frontend format change costs a noisier note rather than
- a dropped one — but a prompt that is only the prefix has no question in it, and forwarding the
- link line as if it were one would put pure noise in the steering channel.
- """
+def _extract_question(text: str, *, report_title: str | None, report_id: str | None) -> str:
stripped = text.strip()
- if not stripped.lower().startswith(_PROMPT_PREFIXES):
- return stripped
- _, _, question = stripped.partition("\n")
- return question.strip()
+ if stripped.lower().startswith(_PROMPT_PREFIXES):
+ _, _, question = stripped.partition("\n")
+ return question.strip()
+
+ if report_id is not None:
+ report_label = (report_title or "").strip() or report_id
+ desktop_base = f"{_DESKTOP_DESCRIPTION_PREFIX}{report_label}"
+ if stripped == desktop_base[:_DESKTOP_DESCRIPTION_MAX_CHARS]:
+ return ""
+ desktop_question_prefix = f"{desktop_base} — "
+ if len(stripped) == _DESKTOP_DESCRIPTION_MAX_CHARS and desktop_question_prefix.startswith(stripped):
+ return ""
+ if stripped.startswith(desktop_question_prefix):
+ return stripped[len(desktop_question_prefix) :].strip()
+
+ return stripped
def _build_note_content(*, report: SignalReport, question: str) -> str:
diff --git a/products/signals/backend/facade/api.py b/products/signals/backend/facade/api.py
index ddf28ec3951b..c7f114f9a4ca 100644
--- a/products/signals/backend/facade/api.py
+++ b/products/signals/backend/facade/api.py
@@ -740,6 +740,7 @@ def forward_report_discussion_note(
report_id: str | None,
relationship: str | None,
text: str,
+ question: str | None,
user_id: int | None,
scoped_team_ids: Sequence[int] | None,
api_scopes: Sequence[str] | None,
@@ -764,6 +765,7 @@ def forward_report_discussion_note(
team=team,
report_id=report_id,
text=text,
+ question=question,
user_id=user_id,
scoped_team_ids=scoped_team_ids,
api_scopes=api_scopes,
diff --git a/products/signals/backend/test/test_discussion_scout_notes.py b/products/signals/backend/test/test_discussion_scout_notes.py
index 51734f9ea576..db8f3c22253e 100644
--- a/products/signals/backend/test/test_discussion_scout_notes.py
+++ b/products/signals/backend/test/test_discussion_scout_notes.py
@@ -20,25 +20,93 @@ _ACTION_PROMPT = (
class TestExtractQuestion(SimpleTestCase):
- # The forwarded note should quote only the user's question, not the URL-prefixed kickoff prompt,
- # and degrade to the whole text if the frontend prompt format ever drifts. Behavior that reaches
- # the scout (targeting, auth gating, best-effort) is covered end to end in the tasks API tests.
@parameterized.expand(
[
- ("strips_url_prefix", _PROMPT, "Is this still happening?"),
- ("strips_action_capable_prefix", _ACTION_PROMPT, "Create the alert this report recommends"),
+ ("strips_url_prefix", _PROMPT, None, None, "Is this still happening?"),
+ (
+ "strips_action_capable_prefix",
+ _ACTION_PROMPT,
+ None,
+ None,
+ "Create the alert this report recommends",
+ ),
(
"strips_answer_this_question_prefix",
"Answer this question about the PostHog Inbox report at https://x.example/r/1:\n\nIs it fixed?",
+ None,
+ None,
"Is it fixed?",
),
- ("no_prefix_returns_whole", "Why does stripe not sync?", "Why does stripe not sync?"),
- ("single_newline_still_strips_prefix", "Let's discuss this PostHog Inbox report: x\nWhy?", "Why?"),
- ("prefix_with_no_question_returns_blank", "Let's discuss this PostHog Inbox report: x\n\n ", ""),
+ (
+ "no_prefix_returns_whole",
+ "Why does stripe not sync?",
+ None,
+ None,
+ "Why does stripe not sync?",
+ ),
+ (
+ "single_newline_still_strips_prefix",
+ "Let's discuss this PostHog Inbox report: x\nWhy?",
+ None,
+ None,
+ "Why?",
+ ),
+ (
+ "prefix_with_no_question_returns_blank",
+ "Let's discuss this PostHog Inbox report: x\n\n ",
+ None,
+ None,
+ "",
+ ),
+ (
+ "desktop_description_returns_question_only",
+ "Discuss report: Checkout errors spiked — Is this still happening?",
+ "Checkout errors spiked",
+ "report-id",
+ "Is this still happening?",
+ ),
+ (
+ "desktop_description_without_question_returns_blank",
+ "Discuss report: Checkout errors spiked",
+ "Checkout errors spiked",
+ "report-id",
+ "",
+ ),
+ (
+ "desktop_description_with_separator_in_title_returns_question_only",
+ "Discuss report: Checkout — errors spiked — Is this still happening?",
+ "Checkout — errors spiked",
+ "report-id",
+ "Is this still happening?",
+ ),
+ (
+ "truncated_desktop_title_without_question_returns_blank",
+ f"Discuss report: {'x' * 300}"[:200],
+ "x" * 300,
+ "report-id",
+ "",
+ ),
+ (
+ "desktop_description_truncated_before_question_returns_blank",
+ f"Discuss report: {'x' * 182} — why?"[:200],
+ "x" * 182,
+ "report-id",
+ "",
+ ),
]
)
- def test_extract_question(self, _name: str, text: str, expected: str) -> None:
- self.assertEqual(_extract_question(text), expected)
+ def test_extract_question(
+ self,
+ _name: str,
+ text: str,
+ report_title: str | None,
+ report_id: str | None,
+ expected: str,
+ ) -> None:
+ self.assertEqual(
+ _extract_question(text, report_title=report_title, report_id=report_id),
+ expected,
+ )
def test_note_content_fits_a_note_for_an_oversized_question(self) -> None:
# The API accepts an unbounded description, and a note over MAX_NOTE_CONTENT_LENGTH is
diff --git a/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts b/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts
index 5f71c1b7dc4f..c226eef2e1ea 100644
--- a/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts
+++ b/products/signals/frontend/inbox/inboxTaskKickoffLogic.ts
@@ -149,7 +149,8 @@ async function createReportTask(
relationship: SignalReportTaskRelationship,
prompt: string,
fallbackTitle: string,
- runtimeSelection?: ClaudeRuntimeSelection
+ runtimeSelection?: ClaudeRuntimeSelection,
+ discussionQuestion?: string
): Promise<void> {
// `repository` is intentionally omitted: the backend resolves it for signal_report tasks.
const task = await api.tasks.create({
@@ -159,6 +160,8 @@ async function createReportTask(
// Linkage fields accepted by the tasks backend for the signal_report origin.
signal_report: report.id,
signal_report_task_relationship: relationship,
+ signal_report_discussion_question:
+ relationship === SIGNAL_REPORT_TASK_DISCUSSION_RELATIONSHIP ? discussionQuestion?.trim() : undefined,
} as Parameters<typeof api.tasks.create>[0])
// Kick off a cloud run so the task actually executes — creating it alone lands the user on a
@@ -320,7 +323,8 @@ export const inboxTaskKickoffLogic = kea<inboxTaskKickoffLogicType>([
SIGNAL_REPORT_TASK_DISCUSSION_RELATIONSHIP,
buildDiscussReportPrompt(currentReport, reportUrl, question),
'Ask AI about report',
- DISCUSS_RUNTIME
+ DISCUSS_RUNTIME,
+ question
)
captureInboxReportActionCompleted({ report, actionType: 'discuss', outcome: 'success' })
actions.discussReportSuccess()
diff --git a/products/tasks/backend/presentation/serializers.py b/products/tasks/backend/presentation/serializers.py
index 116b89320dc6..d78bf40c87a7 100644
--- a/products/tasks/backend/presentation/serializers.py
+++ b/products/tasks/backend/presentation/serializers.py
@@ -940,6 +940,17 @@ class TaskWriteSerializer(serializers.Serializer):
class TaskCreateSerializer(TaskWriteSerializer):
+ signal_report_discussion_question = serializers.CharField(
+ required=False,
+ allow_blank=True,
+ write_only=True,
+ max_length=4_000,
+ help_text=(
+ "Question to forward to the signal report's scout when creating a discussion task. "
+ "Send an empty string when there is no question. Omit only for older clients that embed "
+ "the question in the task description. Not persisted on the task."
+ ),
+ )
naming_source = serializers.CharField(
required=False,
allow_blank=True,
diff --git a/products/tasks/backend/presentation/views/api.py b/products/tasks/backend/presentation/views/api.py
index 6d6da89798f9..b77edb63f824 100644
--- a/products/tasks/backend/presentation/views/api.py
+++ b/products/tasks/backend/presentation/views/api.py
@@ -652,8 +652,9 @@ class TaskViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
if limit_response := usage_limit_response(request.user, self.team_id):
return limit_response
- # Read before create_task, which pops the relationship out of the dict it's handed.
- relationship = serializer.validated_data.get("signal_report_task_relationship")
+ validated_data = dict(serializer.validated_data)
+ relationship = validated_data.get("signal_report_task_relationship")
+ discussion_question = validated_data.pop("signal_report_discussion_question", None)
from products.signals.backend.facade.api import ( # noqa: PLC0415 — keeps the signals stack off this module's import path
ReportTaskCapExceeded,
)
@@ -662,14 +663,14 @@ class TaskViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
task = tasks_facade.create_task(
self.team_id,
self._user_id(),
- validated_data=dict(serializer.validated_data),
+ validated_data=validated_data,
client_provenance=get_task_client_provenance(request),
)
except ComputeBillingLimitExceeded as error:
return compute_quota_limit_response(error.reason)
except ReportTaskCapExceeded as error:
return self._report_task_cap_response(error.detail)
- self._forward_signals_discussion_note(request, task, relationship)
+ self._forward_signals_discussion_note(request, task, relationship, discussion_question)
return Response(TaskSerializer(task).data, status=status.HTTP_201_CREATED)
def _one_shot_analysis_response(self, task_id: str) -> Response | None:
@@ -694,7 +695,11 @@ class TaskViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
)
def _forward_signals_discussion_note(
- self, request, task: tasks_contracts.TaskDetailDTO, relationship: str | None
+ self,
+ request,
+ task: tasks_contracts.TaskDetailDTO,
+ relationship: str | None,
+ question: str | None,
) -> None:
"""Hand an inbox "Discuss" question to Signals, which leaves it as a note for the report's scout.
@@ -715,6 +720,7 @@ class TaskViewSet(TeamAndOrgViewSetMixin, viewsets.GenericViewSet):
report_id=str(task.signal_report),
relationship=relationship,
text=task.description or "",
+ question=question,
user_id=self._user_id(),
scoped_team_ids=get_authenticator_scoped_team_ids(authenticator),
api_scopes=get_authenticator_scopes(authenticator),
diff --git a/products/tasks/backend/tests/test_api.py b/products/tasks/backend/tests/test_api.py
index 7f91609882a4..4dc7dfc1715d 100644
--- a/products/tasks/backend/tests/test_api.py
+++ b/products/tasks/backend/tests/test_api.py
@@ -156,10 +156,10 @@ vbMnD1ZQKgL8LHgb02cbTsc=
-----END PRIVATE KEY-----"""
-# A discuss-report kickoff prompt: the report URL line the frontend prepends, then the user's question.
+# A discuss-report kickoff prompt: the report URL line the web app prepends, then the user's question.
_DISCUSS_PROMPT = (
- "Let's discuss this PostHog Inbox report: "
- "https://us.posthog.com/project/2/inbox/reports/x\n\nIs this still happening?"
+ "Answer this question about the PostHog Inbox report at "
+ "https://us.posthog.com/project/2/inbox/reports/x:\n\nIs this still happening?"
)
@@ -1970,16 +1970,19 @@ class TestTaskAPI(BaseTaskAPITest):
else:
self.assertFalse(notes.exists())
- def _post_discussion_task(self, report_id, description=_DISCUSS_PROMPT):
+ def _post_discussion_task(self, report_id, description=_DISCUSS_PROMPT, discussion_question=None):
+ data = {
+ "title": "Discuss report",
+ "description": description,
+ "origin_product": "signal_report",
+ "signal_report": str(report_id),
+ "signal_report_task_relationship": "discussion",
+ }
+ if discussion_question is not None:
+ data["signal_report_discussion_question"] = discussion_question
return self.client.post(
"/api/projects/@current/tasks/",
- {
- "title": "Discuss report",
- "description": description,
- "origin_product": "signal_report",
- "signal_report": str(report_id),
- "signal_report_task_relationship": "discussion",
- },
+ data,
format="json",
)
@@ -2099,6 +2102,25 @@ class TestTaskAPI(BaseTaskAPITest):
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertFalse(self._discussion_notes().exists())
+ @parameterized.expand([("question", "Why now?", True), ("blank", "", False)])
+ def test_explicit_discussion_question_controls_forwarding(self, _name, question, should_forward):
+ from products.signals.backend.models import SignalReport
+
+ report = SignalReport.objects.create(team=self.team, title="New report title")
+ response = self._post_discussion_task(
+ report.id,
+ description="Discuss report: Old report title — stale question",
+ discussion_question=question,
+ )
+
+ self.assertEqual(response.status_code, status.HTTP_201_CREATED)
+ if should_forward:
+ note = self._discussion_notes().get()
+ self.assertIn("Why now?", note.content)
+ self.assertNotIn("stale question", note.content)
+ else:
+ self.assertFalse(self._discussion_notes().exists())
+
def test_create_task_with_signal_report_accepts_free_form_relationship(self):
from products.signals.backend.models import SignalReport, SignalReportTask
from products.signals.backend.task_run_artefacts import signals_task_ids
diff --git a/products/tasks/frontend/generated/api.schemas.ts b/products/tasks/frontend/generated/api.schemas.ts
index edbfbbb4d60b..8fde42c2fff6 100644
--- a/products/tasks/frontend/generated/api.schemas.ts
+++ b/products/tasks/frontend/generated/api.schemas.ts
@@ -1957,6 +1957,11 @@ export interface TaskCreateApi {
* @nullable
*/
channel?: string | null
+ /**
+ * Question to forward to the signal report's scout when creating a discussion task. Send an empty string when there is no question. Omit only for older clients that embed the question in the task description. Not persisted on the task.
+ * @maxLength 4000
+ */
+ signal_report_discussion_question?: string
/** Text the server generates the title from instead of `description`. Lets a client whose `description` is only an attachment summary (e.g. pasted text stored as a file) supply the real content for naming, so `description` (the prompt passed to the agent) stays unchanged. Not persisted. */
naming_source?: string
/**
diff --git a/products/tasks/frontend/generated/api.zod.ts b/products/tasks/frontend/generated/api.zod.ts
index 573750f43fb1..d472d4b7e5cf 100644
--- a/products/tasks/frontend/generated/api.zod.ts
+++ b/products/tasks/frontend/generated/api.zod.ts
@@ -1140,6 +1140,8 @@ export const tasksCreateBodyBranchMax = 255
export const tasksCreateBodyPendingUserArtifactIdsItemMax = 128
+export const tasksCreateBodySignalReportDiscussionQuestionMax = 4000
+
export const TasksCreateBody = /* @__PURE__ */ zod
.object({
title: zod
@@ -1279,6 +1281,13 @@ export const TasksCreateBody = /* @__PURE__ */ zod
"When true, the cloud run agent pushes its work and opens a draft pull request on completion without waiting for an explicit ask. Write-only and not persisted on the task: persisted into the reused warm Run's state when creation activates one, so resumes of that Run honor it. Ignored when no warm Run is reused — cold creation takes it via the run start endpoint instead."
),
channel: zod.uuid().nullish().describe('Channel this task is owned by (the channel it was kicked off in).'),
+ signal_report_discussion_question: zod
+ .string()
+ .max(tasksCreateBodySignalReportDiscussionQuestionMax)
+ .optional()
+ .describe(
+ "Question to forward to the signal report's scout when creating a discussion task. Send an empty string when there is no question. Omit only for older clients that embed the question in the task description. Not persisted on the task."
+ ),
naming_source: zod
.string()
.optional()
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 2568621779ee..97ee5bb5c938 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -84945,6 +84945,11 @@ export namespace Schemas {
* @nullable
*/
channel?: string | null;
+ /**
+ * Question to forward to the signal report's scout when creating a discussion task. Send an empty string when there is no question. Omit only for older clients that embed the question in the task description. Not persisted on the task.
+ * @maxLength 4000
+ */
+ signal_report_discussion_question?: string;
/** Text the server generates the title from instead of `description`. Lets a client whose `description` is only an attachment summary (e.g. pasted text stored as a file) supply the real content for naming, so `description` (the prompt passed to the agent) stays unchanged. Not persisted. */
naming_source?: string;
/**
diff --git a/services/mcp/src/generated/tasks/api.ts b/services/mcp/src/generated/tasks/api.ts
index 1553cb47d59b..7a71f6c6f868 100644
--- a/services/mcp/src/generated/tasks/api.ts
+++ b/services/mcp/src/generated/tasks/api.ts
@@ -994,6 +994,8 @@ export const tasksCreateBodyBranchMax = 255
export const tasksCreateBodyPendingUserArtifactIdsItemMax = 128
+export const tasksCreateBodySignalReportDiscussionQuestionMax = 4000
+
export const TasksCreateBody = () => zod
.object({
title: zod
@@ -1136,6 +1138,13 @@ export const TasksCreateBody = () => zod
"When true, the cloud run agent pushes its work and opens a draft pull request on completion without waiting for an explicit ask. Write-only and not persisted on the task: persisted into the reused warm Run's state when creation activates one, so resumes of that Run honor it. Ignored when no warm Run is reused — cold creation takes it via the run start endpoint instead."
),
channel: zod.string().nullish().describe('Channel this task is owned by (the channel it was kicked off in).'),
+ signal_report_discussion_question: zod
+ .string()
+ .max(tasksCreateBodySignalReportDiscussionQuestionMax)
+ .optional()
+ .describe(
+ "Question to forward to the signal report's scout when creating a discussion task. Send an empty string when there is no question. Omit only for older clients that embed the question in the task description. Not persisted on the task."
+ ),
naming_source: zod
.string()
.optional()
diff --git a/services/mcp/src/tools/generated/tasks.ts b/services/mcp/src/tools/generated/tasks.ts
index 11d013442182..f4cb28dff0c8 100644
--- a/services/mcp/src/tools/generated/tasks.ts
+++ b/services/mcp/src/tools/generated/tasks.ts
@@ -544,6 +544,7 @@ const TasksCreateSchema = () => {
pending_user_artifact_ids: true,
auto_publish: true,
channel: true,
+ signal_report_discussion_question: true,
naming_source: true,
sandbox_environment_id: true,
custom_image_id: true,