Context
collectSessionMetrics (src/perf.ts:50) is exported and wired into fab perf via loadPerf/formatPerfReport, but it is never called anywhere in the workflow execution path. As a result the per-role agent performance table (.fab-perf.json) is always empty — fab perf reads a file nothing writes.
The quality-trend work (#) deliberately scoped this out: the grade trend is transport-agnostic and captured in runMergeGate, whereas collectSessionMetrics is managed-agents-API-specific (api.getSession, api.listEvents) and is not reachable through the AgentRuntime abstraction that the runtimes now go through.
What's needed
Thread per-role session metrics collection through the runtime layer so the per-role table populates regardless of transport — or scope it cleanly to the managed-agents runtime and no-op elsewhere. Either way:
collectSessionMetrics (or an equivalent) fires after each role session.
fab perf's agent table shows real sessions/tokens/cost again.
- A test covers the wiring (today there is no
perf.test.ts).
Why deferred
It is orthogonal to the grade trend (the richer, transport-agnostic signal), and doing it right means deciding how per-session token metrics flow through AgentRuntime — a larger change than the loop-closing wire-up warranted.
Context
collectSessionMetrics(src/perf.ts:50) is exported and wired intofab perfvialoadPerf/formatPerfReport, but it is never called anywhere in the workflow execution path. As a result the per-role agent performance table (.fab-perf.json) is always empty —fab perfreads a file nothing writes.The quality-trend work (#) deliberately scoped this out: the grade trend is transport-agnostic and captured in
runMergeGate, whereascollectSessionMetricsis managed-agents-API-specific (api.getSession,api.listEvents) and is not reachable through theAgentRuntimeabstraction that the runtimes now go through.What's needed
Thread per-role session metrics collection through the runtime layer so the per-role table populates regardless of transport — or scope it cleanly to the managed-agents runtime and no-op elsewhere. Either way:
collectSessionMetrics(or an equivalent) fires after each role session.fab perf's agent table shows real sessions/tokens/cost again.perf.test.ts).Why deferred
It is orthogonal to the grade trend (the richer, transport-agnostic signal), and doing it right means deciding how per-session token metrics flow through
AgentRuntime— a larger change than the loop-closing wire-up warranted.