Quiz 16 Question 20 of 20

An orchestrator runs 5 parallel documentation-writing agents, each assigned to document a different API endpoint. All 5 agents write their output to a shared JSON file (api-docs.json) by reading the current file, adding their section, and writing the file back. During testing, the team observes that the final api-docs.json sometimes contains only 2 or 3 of the 5 sections — the rest are silently overwritten. Which root cause and fix BEST addresses this?

Select an answer to reveal the explanation.

Motivation