Shared Context Between Agents
Databricks Context Engineer Associate · Lesson 17 of 18 · 2:07:51
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the Databricks Certified Context Engineer Associate exam. In this lesson: multi-agent failures caused by too little shared context (inconsistent outputs, conflicting decisions), sharing full agent traces or compressed summaries at dispatch, propagating decisions, and choosing what to share. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Three styles, two figures
Thistledown's coordinator agent splits the yearly tenant report into parts, and sends each part to a sub-agent. The parts come back in three different styles, and two of them give different occupancy figures for the same building. This lesson covers the failures caused by too little shared context, sharing traces at dispatch, and propagating decisions.
When agents share too little
A coordinating agent splits a task, and dispatches sub-agents to do the parts. If each sub-agent only receives a short task message, it fills the gaps with its own assumptions. The symptoms are inconsistent outputs, like two styles or two units for the same figures, conflicting decisions, like two suppliers booked for one job, and reliability that degrades as tasks grow. The root cause is usually not the model, but the context each agent was given.
Full traces at dispatch
Every action an agent takes carries implicit decisions, and those decisions must reach the agents that build on them. So at dispatch time, give each sub-agent the full agent trace, or the parts of it that matter, not just an individual task message: the overall goal, the decisions made so far with their reasons, the assumptions, and the constraints. To avoid expanding each sub-agent's context window, attach a compressed summary of the trace, built for this purpose, rather than the raw history. Each sub-agent then works from the same picture as the coordinator, and its choices fit with the others.
Propagating decisions
Conflicts also appear when decisions change during the run. If one sub-agent picks a supplier, and another books a different one in parallel, neither knew about the other's choice. Give shared decisions a single source of truth, like a decision log or a state table that every agent reads before acting, and writes to after deciding. Have the coordinator propagate each new decision to the agents it affects, before they act on the old one. And when parts of the work must stay consistent, run the dependent steps in sequence, rather than in parallel.
Choosing what to share
Sharing context does not mean sharing everything. Share what shapes the work: the goal, the constraints, the decisions and their reasons, and the conventions, like formats, units, and tone. Leave out raw tool outputs and exploratory steps that the sub-agent does not need. And when the parts are tightly coupled, consider a single agent with compaction instead, since every handoff loses some context.
Recap
Let's recap. Sub-agents that receive only task messages fill the gaps with their own assumptions. The symptoms are inconsistent outputs, conflicting decisions, and degraded reliability. At dispatch, share the full agent trace, or a compressed summary of its goal, decisions, and assumptions. Propagate shared decisions through a single source of truth, and run dependent steps in sequence. And share what shapes the work, not every raw output.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
A move-in guide is split into three parts; each sub-agent gets one line, like “write the section on parking”. Sections come back in different tones, two with different dates for the same works. What is the root cause?
- The sub-agents’ windows are too small
- Too few sub-agents were used
- Each got a task message, not the shared context
- The model’s sampling is too random
Show the answer
Each got a task message, not the shared context
Each sub-agent received only its own task message, so it guessed the tone and the dates on its own. “The sub-agents’ windows are too small” is wrong, since the windows were not full, they were missing the shared decisions. “Too few sub-agents were used” is wrong, since more sub-agents would make even more independent guesses. And “The model’s sampling is too random” is wrong, since randomness does not explain dates that were never shared.
Two sub-agents plan the same refit in parallel: one schedules painters for Monday, the other books floor sanding for Monday, in the same rooms. Which change most likely prevents this?
- A shared schedule: read before booking, write after
- A larger context window for each sub-agent
- A third sub-agent that checks the plans afterward
- Shorter plans from both sub-agents
Show the answer
A shared schedule: read before booking, write after
A single shared schedule propagates each booking, so the second agent sees the first one before acting. “A larger context window for each sub-agent” is wrong, since a larger window holds nothing about the other agent's booking. “A third sub-agent that checks the plans afterward” is wrong, since a checker after the fact adds cost, and the conflict still happens. And “Shorter plans from both sub-agents” is wrong, since shorter plans do not share the bookings.
A coordinator dispatches three sub-agents with the same short instruction; their reports conflict. The team must not expand each sub-agent’s context window. Which configuration resolves this?
- Give each sub-agent a larger model
- Paste the full raw history into each dispatch
- Rerun the sub-agents until they agree
- Attach a compressed trace: goal, decisions, assumptions
Show the answer
Attach a compressed trace: goal, decisions, assumptions
A compressed trace gives each sub-agent the shared goal, decisions, and assumptions, at a small cost in tokens. “Give each sub-agent a larger model” is wrong, since a larger model still lacks the shared context. “Paste the full raw history into each dispatch” is wrong, since the full raw history expands each context, which the team must avoid. And “Rerun the sub-agents until they agree” is wrong, since rerunning without shared context leaves agreement to chance.