#109010·posthog

self-driving: let users create and edit inbox reports through the MCP

Author: andrewm4894Created Sep 30, 2026Updated Sep 30, 2026
Labelsself-driving

Why

Only a scout run can author an inbox report today. A person using their own agent over the PostHog MCP can edit parts of a report, but cannot create one, so findings from their own harness either stay outside PostHog or go through a scout they do not need. There is no strong reason to keep report authoring scout-only: a report created by a named user through the MCP has a clear audit trail (the user and the API key), and it passes the same safety judge and validation a scout report does.

This issue specs letting users create reports through the MCP and bringing report edits to parity with what a scout can do.

Where it stands

Editing is mostly available already, on task:write:

MCP tool Covers
inbox-reports-update title and summary
inbox-report-artefacts-create note, priority, actionability, suggested_reviewers, repo_selection (status types are latest-wins)
inbox-reports-set-state / inbox-reports-bulk-set-state resolve, dismiss, snooze
inbox-reports-merge, inbox-reports-claim merge duplicates, record ownership or a PR

Only scout-edit-report can:

  • append evidence (append_evidence, written as bound signals that move signal_count and total_weight)
  • replace charts and metrics
  • set supersedes_implementation
  • re-run autostart after a reviewer or repository change (not verified whether the artefact path does this)

Creating is blocked in three places:

  1. Scope. scout-emit-report requires signal_scout_report:write, which is server-mint-only (posthog/scopes.py, next to signal_scout_internal). A personal API key cannot carry it.
  2. Run. SignalScoutRunViewSet._resolve_in_progress_run (products/signals/backend/scout_harness/views.py) requires an in-progress SignalScoutRun whose skill lists emit_report in allowed_tools.
  3. Code. emit_report_sync and edit_report_sync (products/signals/backend/scout_harness/tools/report.py) take run: SignalScoutRun and use it throughout:
    • the idempotency key is scoped to run.id
    • capture events use distinct_id=signals_scout:{skill_name} plus run and task ids
    • artefacts are written with author=run.skill_name
    • reviewer provenance is stamped with the skill name
    • record_report_edit(run_id=...) tracks edits per run

What to build

1. An author abstraction for the report channel

Refactor emit_report_sync / edit_report_sync to take an author instead of a bare run: either a scout run (today's behavior, unchanged) or a user, attributed through resolve_request_attribution like artefact writes already are. Everything that reads run.* today reads from the author: idempotency scope, capture distinct_id and properties, artefact author, reviewer provenance, edit tracking. This is the base PR and changes no behavior on its own.

2. A create endpoint on SignalReportViewSet

  • create reusing EmitReportRequestSerializer (title, summary, evidence, actionability, priority, reviewers, repository, charts, metrics, links, idempotency key).
  • Same safety judge and status mapping as emit-report: immediately_actionable → READY, requires_human_input → PENDING_INPUT, not_actionable → suppressed; unsafe → suppressed.
  • Idempotency keyed on the user plus idempotency_key, or the content hash when none is given.
  • Declared with @validated_request so the OpenAPI spec and generated MCP tool pick it up.

3. Edit parity

Extend partial_update (or add an edit action) with the fields only scout-edit-report has today: append_note, append_evidence, charts, metrics, reviewers and repository with the autostart re-run, supersedes_implementation. Same caps and judges as the scout path.

4. A user-grantable scope

Add a public scope object, for example signal_report:write, instead of reusing task:write, so granting report authoring to a key is a deliberate choice. Existing edit tools can stay on task:write or move over; decide in review.

5. Autostart

A report with repository + priority + suggested_reviewers opens a draft PR automatically today. For a user-authored report, gate this on the author's signal autonomy setting (users-signal-autonomy), or default it off. Decide before the create endpoint ships.

6. Limits

A per-user daily cap on created reports, through the existing quota.py / daily_limit.py, so an agent loop cannot flood the inbox.

7. Attribution in the UI

Show "Created by via MCP" on the report and its Slack card, and "edited by" on edits. The same gap exists for scout-authored reports edited by another scout.

8. MCP and docs

  • inbox-reports-create in products/signals/mcp/tools.yaml, plus description updates for the edit tools.
  • products/signals/skills/ (authoring-scouts, exploring-scouts) and the inbox docs.

Suggested PR order

  1. Author abstraction (no behavior change).
  2. Scope + create endpoint + MCP tool, autostart gated.
  3. Edit parity.
  4. UI attribution and docs.

Open questions

  • Autostart default for user-authored reports (step 5).
  • New scope or task:write (step 4).
  • Whether latest-wins status writes (reviewers, priority, actionability) on a report someone else authored should be additive, rejected, or need an explicit override. This applies to user → scout, scout → user and scout → scout edits alike, so settle it once with edit parity.