Codex returns a report while the second reviewer runs past its deadline. By then the author may have prepared another patch. The orchestrator needs to retain the first result, decide whether to retry the second review, and attach every reply to the correct round.
Store the facts that determine the next step
For each round, record the task ID, patch revision, state, and result references. For each review, store the reviewer, attempt number, deadline, and attempt state. After the first result is saved, for example, the round contains one completed report and one unfinished operation. On restart the program reads those records and schedules only the missing work.
Accept a result for a specific attempt
A response carries round, reviewer, and attempt identifiers. In one transaction the coordinator checks that the attempt is active and records the result if it matches. This handles duplicate delivery and concurrent writers. If the first attempt replies after a second has started, its reply can stay in the log. The active attempt governs the round’s state. A new patch starts a new round.
After the retry limit, the round’s policy decides what happens. An optional reviewer can be marked missing and the round can close with one report. When both reviews are required, the task returns to a person. Limit the number of fix rounds as well so a pair of reviewers cannot keep the task open indefinitely.
Reconstruct the decision
The event log shows when a deadline expired, which attempt was retried, and why a late response was discarded. revmux, for instance, saves a round manifest, stall and retry events, and reviewer output. For end-to-end timing, model a review round as a trace and each reviewer invocation as a span. Persisted state supports recovery, and the trace helps locate the delay. revmux · OpenTelemetry