Course · Part 4, Teams · Lesson 4.2 · 14 min

Inter agent communication: the message that lost the unit

A supply agent answered with a bare number, the support agent read weeks as days, and the customer was promised a delivery that could not happen.

Before you read: find the line

Read the run below once. Decide which line is the mistake. The lesson tells you.

Support agent asks the supply agent for a restock time
  1. 1userWhen will order 5531 ship? It says out of stock.
  2. 2llmsupport agent -> supply agent: "Restock time for SKU 4411?"
  3. 3toolget_purchase_order(sku="4411") -> {"eta": 6, "unit": "weeks", "po": "PO-2291"}
  4. 4llmsupply agent -> support agent: "ETA for SKU 4411: 6"
  5. 5llmsupport agent: reply: "Good news, your order ships in about 6 days."
  6. 6toolsend_email(to=customer, body=reply) -> sent
  7. 7donestatus: success

What broke

Two agents share a support queue. The support agent talks to customers. The supply agent reads purchase orders and knows when stock arrives. They talk to each other in plain text, because that was the easiest thing to build. On Monday a customer asked when order 5531 would ship. The item was out of stock. The support agent asked the supply agent for the restock time. The supply agent called the purchase order tool, got back an ETA of 6 with the unit weeks, and replied: "ETA for SKU 4411: 6". The support agent wrote to the customer: "Good news, your order ships in about 6 days."

Six weeks later the order shipped. The customer had cancelled on day 10 and left a one star review. The trace is seven lines and the mistake is on line 4.

Why it broke

The supply agent had the unit. The tool gave it. Then the agent wrote a sentence, and the sentence dropped it. Nothing on the receiving side could notice, because a sentence has no required fields. The support agent filled the gap with the most useful guess, days, and moved on. This is what free text between agents does: it is a lossy channel with no schema, and every hop is a chance to lose a field.

The oldest version of this bug is not in software agents. In September 1999 NASA lost the Mars Climate Orbiter. The mishap board's report of November 10, 1999 traced it to a ground file that gave thruster data in pound force seconds where the navigation software expected newton seconds, a factor of 4.45. A number crossed a team boundary without its unit and a spacecraft went into the atmosphere. The teams were people. The failure was the message.

Agent protocols exist to stop this. Google announced A2A on April 9, 2025 with more than 50 partners. Its core objects are an Agent Card (what an agent can do), a Task, Messages, and Parts, where a Part has a declared content type: text, a file, or structured data. The point of a data Part is that a number arrives as a named field, not as a word in a sentence. MCP does the same on the tool side: a tool result has a schema. Neither protocol will save you if your agents still talk in prose on top of it.

What a senior engineer does

Write the contract first. The reply to a restock question is an object: sku, eta_value, eta_unit, source_po, as_of. Required fields are required. The receiving agent does not read the object. Code validates it, and a missing unit is a rejected message, logged, with the run stopped or retried. Then the support agent gets a sentence built from the validated object, by code, with the unit written out.

Keep the question structured too. "Restock time for SKU 4411?" becomes an intent of restock_eta with a sku field. Both sides log the exact message they sent and received, so when something is wrong you can see which hop lost the field. The Berkeley failure study puts inter agent misalignment, which includes information lost or withheld between agents, as one of its three groups of failure modes. It is common because it is easy. Prose is the default output of a model, and you have to decide not to use it.

The cost is a schema per message type and one validation function. In return every message between agents is as checkable as an API call, which is what it is.

What to say in the interview

"Line 4. The supply agent had the unit from the tool and dropped it in a free text reply, and the support agent guessed days. I would make the message a typed object with eta_value and eta_unit required, validate it in code on receipt, and reject anything incomplete." If they ask about A2A or MCP, say that both give you typed parts and schemas, and that the win is only real when your agents stop passing prose.

The line

Support agent asks the supply agent for a restock time
  1. 1userWhen will order 5531 ship? It says out of stock.
  2. 2llmsupport agent -> supply agent: "Restock time for SKU 4411?"
  3. 3toolget_purchase_order(sku="4411") -> {"eta": 6, "unit": "weeks", "po": "PO-2291"}
  4. 4llmsupply agent -> support agent: "ETA for SKU 4411: 6"
  5. 5llmsupport agent: reply: "Good news, your order ships in about 6 days."
  6. 6toolsend_email(to=customer, body=reply) -> sent
  7. 7donestatus: success

Line 4. The tool gave the agent the unit and the agent wrote a sentence that dropped it. A free text message has no required fields, so nothing on the other side could notice. The support agent filled the gap with a guess.

The pause

The supply agent's reply was a sentence. What shape should it have had, and where is the check that catches a missing unit?

In the interview

“Two of your agents hand work to each other. How do they talk, and what happens when a message is wrong?”

Say your answer out loud, in under a minute. Then compare.

Notes