Persist interception starts before forwarding. If start recording fails,
return 500 without contacting upstream.
Record the final outcome asynchronously with a five-second timeout. The
end record carries the categorized error (for upstream error statuses,
the response body truncated to 1024 bytes, or the status text when
empty) and the last pooled key used. Response completion does not wait
for recording. Graceful shutdown waits for inflight recordings.
Model, session ID, and token accounting remain unset.
Generated by Coder Agents on behalf of @pawbana.