Two agents share state through repository files. One read an old decision file and acted on it; another kept a conflicting copy of a decision. Which two practices prevent stale and conflicting context? (Select TWO.)
- Exam domain
- Manage memory, state, and execution10–15% of the exam
- Difficulty
- Hard
- In this mock
- 8 questions on this domainPractise this domain
Why the exam asks this
Objective in the exam guide: Prevent conflicting context.
Shared state across agents breaks in two ways: staleness and conflict. The exam checks both fixes.
Why C and D are the answers
A multiple-response question. Choose two. There is no credit for picking only some of them.
Keep one source of truth for each decision, and update it rather than copying it
Re-read shared state at the start of each step, and record when it was last updated
A single source of truth prevents conflicts; refreshing state before each step and tracking freshness prevents acting on stale information.
How it works
Conflicting context comes from several copies of the same fact that diverge.
Stale context comes from reading state once and not refreshing it.
One source of truth, refreshed before each step, fixes both.
Clues in the question
The words that point to the answer, and what each one tells you.
- Read an old decision file
- Stale context.
- Kept a conflicting copy
- Conflicting context.
In detail
- Use pull requests to change shared decision files, so updates are reviewed.
- Include a version or date in shared state files.
Side by side with look-alikes
| Problem | Fix |
|---|---|
| Conflicting copies | Single source of truth |
| Stale reads | Refresh before each step |
| Unreviewed changes | Change via pull requests |
| Unknown freshness | Record last-updated dates |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Never update decisions once writtenWrong
Frozen decisions go stale as the work changes.
B. Share state only through chat messagesWrong
Chat messages are not durable shared state.
C. Keep one source of truth for each decision, and update it rather than copying itRight
A single source of truth prevents conflicts; refreshing state before each step and tracking freshness prevents acting on stale information.
D. Re-read shared state at the start of each step, and record when it was last updatedRight
A single source of truth prevents conflicts; refreshing state before each step and tracking freshness prevents acting on stale information.
E. Let each agent keep its own private copy of every decisionWrongMost tempting
Private copies diverge, causing conflicts.
Why it tempts: Private copies avoid interference. But they diverge, which is the conflict in the scenario.
In practice
- Store shared decisions in one folder and forbid copies in agent instructions.