feat(signals): return Ask AI chat summaries from inbox-reports-retrieve
Problem
Every Ask AI chat on an inbox report is a task linked to that report, and its run keeps a task_summary: what the user asked, what the agent verified, what it could not check, and its verdict. The inbox UI already shows that summary on each row of the report's "Runs" section (ReportTaskRow).
Agents cannot see it through the MCP. inbox-reports-retrieve returns no linked tasks. To reach a summary, an agent must list the report's task_run artefacts and then call tasks-retrieve once per task, and nothing tells it to do so.
As a result, facts a chat establishes stay locked in that chat. Examples are a denominator the report lacked, a recurrence history, or "impact not verified in code". The next research run, implementation run, scout run, or chat on the same report starts from the original report and repeats the work.
Only the opening question of a chat reaches the report's scout today, as a report_discussion scout note (products/signals/backend/discussion_notes.py). Follow-up turns and the findings do not.
Proposal
Add a read-only discussions field to the report detail serializer, so inbox-reports-retrieve returns it.
- One entry per recent chat task on the report (the
discussionrelationship), newest first, capped at a small number such as 5. - Each entry has the task id, who created it, when, the latest run status, and the latest run's
task_summary. - Reuse
_task_run_summary_for_viewerinproducts/tasks/backend/facade/api.pyfor visibility, so a caller sees only the summaries it can already read. Go through the tasks facade, not the tasks models. - Keep it off the list serializer, so
inbox-reports-listpayloads do not grow. - Add
help_textto the field, and add one sentence to theinbox-reports-retrievedescription inproducts/signals/mcp/tools.yaml: earlier chats on the report and what they established. - Run
hogli build:openapi.
Consumers read the field at their own discretion. Nothing is written anywhere new, and nothing is copied into the scratchpad automatically.
Out of scope
- Summaries from research and implementation runs. Those runs already write work-log artefacts. Add them later if chat summaries prove useful.
- Aggregating chat questions across reports as feedback for scouts. That is a follow-up once this data is easy to read.
Acceptance
inbox-reports-retrieveon a report with chats returns their summaries, newest first, capped.- A caller that cannot read a run's summary gets
nullfor that entry's summary. - Reports with no chats return an empty list.
- Generated types and MCP tool schemas are regenerated.
Related: #104500 (task summary tooltip on inbox run rows), #107056 (Ask AI note nudge).
Source: PostHog/posthog