CertSafari
    Databricks Certified Context Engineer Associate· Lessons

    Domain 7 · Lesson 40/45

    Diagnosing Shared-Context Failures in Multi-Agent Systems

    Diagnose failure modes in multi-agent systems caused by insufficient shared context: inconsistent outputs, conflicting decisions, degraded reliability.

    12 min read
    2.17% of exam
    9 sources
    Published 3 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Explain why splitting work across a supervisor and subagents creates separate contexts that can drift apart
    • Trace inconsistent outputs back to how much routing context the orchestrator has: subagent descriptions and orchestrator instructions
    • Tell when conflicting decisions come from state that lives in one interaction and when they come from durable knowledge that every agent is meant to share
    • Use traces to separate shared-context failures from look-alike causes such as missing permissions or timeouts

    Key concept

    Shared-context gap — In a multi-agent system, each subagent reasons only over the context it is given. When the facts, constraints or decisions that matter to the whole task do not reach every agent that needs them, the agents act on different pictures of the same task. The result is inconsistent outputs, contradictory actions and reliability that gets worse as the task grows.

    1.Why multi-agent systems lose shared context

    Databricks describes agent design as a continuum. It runs from deterministic chains, through a single dynamic agent, to multi-agent systems in which several specialized agents work together. The thing that sets the multi-agent end apart is that the specialists do not share one context window. Each has its own instructions, its own tools and its own view of the conversation. That separation is the point of the design: it keeps each specialist focused. It is also where this subdomain's failures come from. Any fact that only one agent can see is a fact the others will contradict sooner or later.

    In a single agent, everything the model has learned during the task sits in one transcript, so later steps naturally stay consistent with earlier ones. Once the task is split, that consistency has to be designed in. The supervisor or orchestrator decides what each subagent receives and how the results come back together. When that hand-off leaves something out, the system fails in one of three ways. Inconsistent outputs: the same question gets different answers depending on which agent handled it. Conflicting decisions: agents take actions that contradict each other. Degraded reliability: quality slips as tasks get longer or span more agents. The design-patterns guide is candid about the cost: multi-agent systems are harder to orchestrate and harder to debug than a single agent.

    Checkpoint 1 of 7· Check yourself

    According to the Databricks design-pattern comparison, which drawback is specifically listed for multi-agent systems?

    Sources12

    2.Inconsistent outputs: when the orchestrator lacks routing context

    The first context every multi-agent system needs is the orchestrator's knowledge of what each subagent is for. In the Databricks Apps orchestrator pattern, every subagent is exposed to the orchestrator as a tool. The orchestrator picks one based on its own instructions and the subagent descriptions. If those descriptions are vague or overlap, the orchestrator cannot tell which specialist owns a question. Semantically identical requests then land on different subagents, and each one answers from different data. A Genie Agent working over structured tables and a knowledge assistant working over documents can return two different, equally confident numbers for the same metric.

    The symptom is inconsistency between runs or between similar phrasings. The cause is missing routing context, not a weak model. The fix is to give the orchestrator that context: say what each subagent covers, what kind of question it handles, and what to do when it is unsure.

    Orchestrator instructions in the Databricks Apps multi-agent template. This is the routing context every routing decision depends on.python
    Agent(
        name="Orchestrator",
        instructions=(
            "You are an orchestrator agent. Route the user's request to the "
            "most appropriate tool or data source:\n"
            "- Use the Genie MCP tools for questions about structured data in <dataset_name> that contains information about <topic>\n"
            "- Use query_app_agent for questions or tasks that the specialist app agent handles for ...\n"
            "- Use query_knowledge_assistant for knowledge-base lookups about <topic>.\n"
            "If unsure, ask the user for clarification."
        ),

    Checkpoint 2 of 7· Check yourself

    Users report that the same metrics question sometimes gets a Genie-based answer and sometimes a document-based answer, and the numbers differ. Which change targets the root cause most directly?

    Checkpoint 3 of 7· Exam question

    Which of the following best defines the "shared context failure" category of multi-agent failure modes, as distinct from a single-agent context failure such as context poisoning or context clash?

    Sources3

    3.Conflicting decisions: state that never reached the other agents

    Inconsistent answers are irritating. Conflicting decisions do real damage. Say one subagent decides to escalate a return to a human, and another subagent, unaware of that, triggers the return and issues a shipping label. Each agent acted reasonably on what it knew. The fault is that a decision made in one place never reached the others.

    To diagnose this, ask what kind of state was missing. Databricks separates two stores, both backed by Lakebase. Session state holds the working transcript of one interaction: messages, tool calls and results. Memory holds durable facts, preferences and decisions that should still apply in later, unrelated conversations. A conflict inside a single task usually means the current interaction's state was not passed to the agent that acted. A conflict across conversations, such as one agent honoring a customer preference that another ignores, usually means a durable fact was never written to memory, or was written under a scope the other agent never reads.

    Two kinds of agent state, and the conflict each one prevents when it is shared
    StoreScopeTypical contentsMissing it causes
    Managed agent sessionsOne interaction (actor_id, optional session_id)Conversation history: messages, tool calls, resultsAgents within one task acting on different views of what has already happened
    Managed agent memoryA subject, across conversationsDurable facts, preferences, past decisionsAgents in later conversations contradicting decisions or preferences established earlier

    Checkpoint 4 of 7· Match them up

    Match each symptom to the missing context most likely behind it

    Tap a term, then the definition that fits it.

    Checkpoint 5 of 7· Exam question

    A Databricks multi-agent supervisor routes a customer's question about Q3 revenue to a Genie agent, which answers using a Delta table. Two turns later, a follow-up question is routed to a function-calling agent, which retrieves an older quarterly report via vector search and gives a different revenue figure. Neither agent was aware of what the other had already told the customer. What is the most likely root cause of the contradictory answers?

    Sources45

    4.Degraded reliability: confirming the diagnosis with traces

    The third failure mode is gradual. As a task runs longer or passes through more agents, accuracy drops, agents redo work they have already done, and summaries handed back up to the supervisor lose the detail that later steps needed. Databricks' own writing on agent harnesses calls this pattern out: unmanaged, growing context degrades performance on long-running tasks. In a multi-agent system, the result summary is a hand-off. Whatever the summary leaves out is gone for every agent downstream.

    The symptoms in this lesson also have look-alike causes, so a diagnosis has to rest on evidence. MLflow Tracing records every intermediate step, including subagent calls, as spans. Open a failing trace and compare what each subagent actually received with what the task required. If the needed fact is absent from that span's inputs, you have a shared-context failure. Rule out the impostors as well. A supervisor returns poor subagent answers when the end user lacks explicit permission on that subagent. A long-running supervisor task can still time out inside a single slow tool call. Neither is a context problem, and fixing context will not help. Across many traces, Detect Issues clusters recurring failures and computes per-agent cost baselines. A recurring cluster tied to one hand-off points to where context is being dropped.

    Checkpoint 6 of 7· Check yourself

    A supervisor gives unhelpful answers whenever a particular group of users asks about one subagent's domain. Traces show the subagent was routed correctly and given full task context. What should you check next?

    Checkpoint 7 of 7· Exam question

    A support-ticket triage system routes a ticket to a billing agent, which decides the issue is technical and hands it to a technical agent, which decides it is a billing issue and sends it back. This bounce continues for many turns without resolution, consuming an increasing share of the context window. Which failure mode does this scenario best illustrate?

    Sources6789

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Splitting an overloaded agent into more subagents automatically makes the system more reliable.Why is that wrong?

      Multi-agent designs add orchestration and debugging cost, and every hand-off is a new place for context to be lost. Splitting only helps if shared context is propagated on purpose.

      Covered in Why multi-agent systems lose shared context

    2. 2.Persisting conversation history in a session store gives every agent shared knowledge of past decisions across conversations.Why is that wrong?

      Sessions are scoped to one interaction. Decisions and preferences that should outlive a conversation have to be distilled into memory, which is scoped to a subject.

      Covered in Conflicting decisions: state that never reached the other agents

    3. 3.Any unhelpful subagent answer relayed by a supervisor is a shared-context failure.Why is that wrong?

      Missing end-user permissions on a subagent produce the same symptom. Check traces and permissions before you redesign context propagation.

      Covered in Degraded reliability: confirming the diagnosis with traces

    Sources

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “with distinct logic or conversation contexts”
      ↩︎ Why multi-agent systems lose shared context
      “with distinct logic or conversation contexts”
      ↩︎ Key concept
      “Complex to orchestrate Harder to trace and debug”
      ↩︎ Exam trap 1
      “Complex to orchestrate Harder to trace and debug”
      ↩︎ Checkpoint
    2. 2.
      “Supervisor Agent uses advanced AI orchestration patterns to manage agent interactions, task delegation, and result synthesis”
      ↩︎ Why multi-agent systems lose shared context
      “Without explicit access, the supervisor cannot return helpful responses from a subagent.”
      ↩︎ Exam trap 3
      “Without explicit access, the supervisor cannot return helpful responses from a subagent.”
      ↩︎ Checkpoint
    3. 3.
      “The orchestrator treats each subagent as a tool and uses its instructions to route requests to the right one.”
      ↩︎ Inconsistent outputs: when the orchestrator lacks routing context
      “The more specific the orchestrator instructions, the more accurately it routes requests.”
      ↩︎ Inconsistent outputs: when the orchestrator lacks routing context
      “Description quality is directly related to how well the orchestrator can route requests to the correct subagent”
      ↩︎ Checkpoint
    4. 4.
      “Sessions are scoped to one interaction”
      ↩︎ Exam trap 2
      “Memories are scoped to a subject, not an interaction”
      ↩︎ Checkpoint
    5. 6.
      “Tracing records the inputs, outputs, latency, token usage, and cost of every intermediate step”
      ↩︎ Degraded reliability: confirming the diagnosis with traces
    6. 9.
      “Without a strategy to trim or summarize older context, performance often breaks down on long-running tasks.”
      ↩︎ Degraded reliability: confirming the diagnosis with traces

    Ready to test yourself?

    Practise Databricks Certified Context Engineer Associate in quiz mode.

    Spotted a mistake, or was something unclear? Tell us.