Performance monitor
A read-only agent that inspects query performance, blocking sessions, and Performance Advisor findings once per hour.
What it watches#
- Long-running sessions and the PIDs blocking other sessions
- Query execution-time regressions across saved hourly measurements
- Performance Advisor findings at warning and error level
It uses get_advisors and read-only execute_sql on project-scoped Supabase MCP. It does not create indexes, rewrite queries, or cancel sessions.
When it watches#
Once per hour
Run it on demand after a latency regression or a schema change.
What it will output#
Performance monitor reports new or changed findings with the affected query, session, or object, plus an investigation and verification step. It does not infer a regression without comparable measurements or recommend cancellation based only on query age. See what triggers a performance report.
If a check cannot run, the agent tells you what is missing. Clear checks and unchanged findings stay quiet.
When the agent finds an issue, it reports in the harness. Send that report wherever you already triage work. Use the connections your harness already has. For example, Codex can open a Linear issue.
Keep the Supabase project read-only. Filing a ticket is work in the harness, not a change to the project.
If you want that routing on every scheduled run, add it to the prompt.
Set up the agent#
Allow the agent to read the documentation linked in its prompt. Configure your harness to save measurements and alert state, then reload them on each run. Query comparisons need three hourly snapshots; the first runs can still report current blockers and advisor findings.