In a pipeline where a test-writing agent passes its output to a code-review agent, the code-review agent receives a handoff artifact with a malformed schema — the required testCoverage field is missing. What is the correct behavior for the receiving agent?
Select an answer to reveal the explanation.
Short Explanation and Infographic
If a relay runner hands off a baton that is cracked, the next runner should not keep running and hope it holds — they should stop and tell the referee. On the exam: receiving agents must reject malformed handoffs with structured error signals to the orchestrator, not silently compensate for upstream failures.
Full explanation below image
Full Explanation
The correct behavior for a receiving agent encountering a malformed handoff (option B) is to reject the artifact immediately, log a structured error that identifies the specific schema violation and attributes it to the sending agent, and signal the orchestrator. This is critical for two reasons: first, proceeding with incomplete data can cascade errors forward in the pipeline, making the final output incorrect in ways that are hard to trace back; second, surfacing the error to the orchestrator allows it to apply the appropriate recovery pattern (re-run the sending agent, escalate to human review, or apply a fallback).
Option A (using defaults for missing fields) is dangerous because testCoverage is a required field — it is required precisely because the review logic depends on it. Substituting a default value silently introduces an incorrect assumption into the review and produces a result that appears complete but is not. This is a form of silent failure.
Option C (inferring the missing value) makes the receiving agent take on the responsibility of the sending agent. This creates tight coupling — the code-review agent must now understand the test-coverage measurement logic that belongs to the test-writing agent. It also means the error in the sending agent is masked rather than corrected.
Option D (completing with a note) is better than A or C in terms of transparency, but it still produces a partial output that downstream consumers may incorrectly treat as complete. The orchestrator is not notified in a structured way, making recovery difficult. A structured rejection signal is the correct mechanism for escalating handoff failures.