Rensei docs
Performance

Rework & Escalation

Rework loop counts and escalation-strategy distribution on the Performance dashboard.

Partially implemented. The rework counters are live (the session-lifecycle hooks emit work-item.rework / work-item.completed events). The escalation-strategy distribution is a reader without a producer: nothing currently writes an escalationStrategy field onto completion events, so the chart shows 100% "Normal" until that producer lands. There is no per-phase rework table, rework timeline, or rework-cost metric.

Track where work fails and must be redone. Rework & Escalation shows how often issues loop back from QA to development, and (once the producer lands) how escalations are handled.

What the panel shows

The Rework Loops & Escalation panel on the Performance dashboard renders three cards and one bar chart:

  • Avg Cycles/Issue - 1 + total reworks ÷ total completed; >1.5 is flagged
  • Total Reworks - count of work-item.rework events in the window
  • Completed - count of work-item.completed events
  • Escalation strategy distribution - four bars: Normal, Context-enriched, Decompose, Escalate-human

Data sources

  • Rework counts - factory_events rows with eventType = 'work-item.rework', emitted by the platform event emitter when a work item loops back (e.g. QA fails a dev session and the issue re-enters development).
  • Completions - factory_events rows with eventType = 'work-item.completed'.
  • Escalation distribution - groups completion events by payload.escalationStrategy, defaulting missing values to normal. Because no dispatch path stamps that field today, all completions land in the "Normal" bucket.

Interpreting rework

Healthy benchmarks (Avg Cycles/Issue):

  • ≤1.2 - most issues pass on first attempt
  • 1.2-1.5 - some iteration; acceptable for complex work
  • >1.5 - high rework; investigate workflow quality or agent configuration

When rework is high:

  • Check whether QA failures cluster on one workflow or provider (see Provider Benchmarks)
  • Inspect rejected sessions for credential or spec-ambiguity failures
  • Tighten the issue template / spec quality feeding the dev stage

API access

The panel's data arrives with the phase metrics payload:

curl -H "Authorization: Bearer $RENSEI_API_KEY" \
  "https://app.rensei.ai/api/factory/metrics?metricType=phase&timeRange=30d"

The response's reworkLoops object carries { totalReworks, totalCompleted, avgCyclesPerIssue } and escalationDistribution carries [{ strategy, count, percentage }] for the four strategies.

On this page