A lookup poisons an agent when the API cannot filter on the field the task needs, so the model pages through records and fills the window with noise. Match the entity and materialize those rows before the model reasons, then pass only the match. In Michel Tricot's Gong demo, Claude was already at about 16K tokens at startup, before he asked it for one user's Gong calls since February 1st.

Tricot, CEO and co-founder of Airbyte, covered this on Chain of Thought in March 2026. He was showing Airbyte's agent engine, then in public beta, and a context store in front of it: source data replicated into a store the agent can search, with a direct API read reserved for when you already know the object id.

How do you tell poisoned context from a weak model?

Inspect the tool payload before you retune the prompt. Extra or mismatched rows make a capable model answer badly, because the model reasons over what you fed it. Warehouses exist so analysis does not depend on a live API call. Rate limits show up, and many endpoints do not offer the access the question needs. An agent wired straight at those endpoints inherits the same limits, then stuffs the extra pages into context.

you cannot run an analysis by connecting through an API. you will have issues with API rate limits, you will have issues with, hey, maybe they don't offer the right way to access that data.

Michel Tricot, CEO and co-founder of Airbyte, on Chain of Thought ep 52

Context Poisoning is Killing Y… - Chain of Thought | AI Agents, Infrastructure & Engineering - Apple Podcasts

Podcast Episode · Chain of Thought | AI Agents, Infrastructure & Engineering · March 25 · 44m

favicon podcasts.apple.com

Gate every tool result before you trust the answer:

  1. Write down the filter the question implies (user, company, date, or status).
  2. Check whether the API supports that filter. If it does not, expect pagination.
  3. Count how many returned rows match the entity. If almost none do, mark the run poisoned and stop.

Why does one user lookup turn into pages of API calls?

The source API often has no filter for the person in the question. Tricot configured a Gong connector and exposed it through MCP. He asked for one user's calls since February 1st. Through the API alone, that lookup paginates, because Gong cannot filter by user.

when you want to search and get calls for a particular users, well, you cannot filter by the user. So you end up pulling like lists and pages and pages of calls

Michel Tricot, CEO and co-founder of Airbyte, on Chain of Thought ep 52

MCP does not remove that limit. He called it an interconnect, a way to connect an LLM to an external system. A thin wrapper still returns records the task does not need, and those records pollute the window. Replicate into a store and search that copy. Hourly is the default he described, and faster syncs are available on other plans.

Keep the live API for one object once the id is known. On Stripe, Tricot said that without the id you walk every user, but if the cache says Conor is ID 123 you fetch that id. Put retrieval in its own step so the answering step sees those rows, not the whole block.

How do you resolve the same company across Zendesk and Salesforce?

Normalize names and join in your own code, then give the agent the joined rows. Tricot used Airbyte as the example. Zendesk might hold a misspelling or "Airbyte Inc." while Salesforce holds "Airbyte". Hitting both APIs to learn that mapping may fail: the API might kick you off, and it might not offer fuzzy search or embeddings.

maybe it's misspelled on Zendesk, or maybe someone put Airbyte Inc., but on Salesforce it's called Airbyte. doing this type of correlation by just hitting APIs, your agent is in for a treat here. Because it might not work, the API might kick you off, the API might not have fuzzy searches, etc.

Michel Tricot, CEO and co-founder of Airbyte, on Chain of Thought ep 52

A minimal sketch to adapt, not a drop-in library.

def normalize_company(name): cleaned = " ".join(name.lower().replace(".", "").replace(",", "").split()) for suffix in (" inc", " llc", " ltd"): if cleaned.endswith(suffix): cleaned = cleaned[: -len(suffix)].strip() return cleaned def _resolve(left, right): paired = [ (a, b) for a in left for b in right if a["domain"] and a["domain"] == b["domain"] ] if len(paired) == 1: return [paired[0][0]], [paired[0][1]] if len(left) == 1 and len(right) == 1: a, b = left[0], right[0] if not (a["domain"] and b["domain"]): return left, right # name-only match, no conflicting evidence return None # conflicting domains or several candidates: send to review def join_accounts(zendesk_rows, salesforce_rows): grouped = {} for source_name, rows in ( ("zendesk", zendesk_rows), ("salesforce", salesforce_rows), ): for row in rows: key = normalize_company(row["company"]) slot = grouped.setdefault( key, {"company_key": key, "zendesk": [], "salesforce": []} ) slot[source_name].append( {"id": row["id"], "name": row["company"], "domain": row.get("domain")} ) resolved, needs_review = [], [] for slot in grouped.values(): if not slot["zendesk"] or not slot["salesforce"]: continue picked = _resolve(slot["zendesk"], slot["salesforce"]) if picked is None: needs_review.append(slot) continue resolved.append( { "company_key": slot["company_key"], "zendesk": picked[0], "salesforce": picked[1], } ) return resolved, needs_review 

Call join_accounts before call_model and pass only resolved as context. Groups with conflicting domains or several candidates land in needs_review, not in front of the model. "Airbyte Inc." and "Airbyte" share one key, with both ids attached. The sketch only strips a few suffixes. A typo that misses the key still needs review. Fuzzy matching on structured data already works well, Tricot said, because metadata on a transcript is enough to pull the right one. A RAG chunk needs the same kind of note: the call was about pricing, and who was on it. Without that annotation, reliable filtering on those fields fails and retrieval quality can drop.

FAQ

How do I spot context poisoning in a trace?
Look for pages of records when the question named one entity, or a filter the API does not support. Gong has no user filter, so the client pulls pages of calls. If those pages fill the window, fix the lookup before you swap models.

Is chunk-and-embed enough on its own?
Attach the structured fields you will filter on. He walked through a pricing conversation annotated with who was on the call. Without that metadata, search misses. Fuzzy matching can carry structured records, with embeddings added later for unstructured text.

Should memory live in a separate system from other context?
He tries not to separate them too early. Memory is a form of context: data that lands in your agent and that you can query and update. The window over which it is remembered may differ.

Takeaway

  • Confirm the API can filter on the field in the question. If it cannot, do not send the agent off to page.
  • Replicate source data on a schedule. Hourly was the default he described. Search that copy to resolve the entity.
  • Normalize company names and join systems in code. Pass the joined ids, not both raw extracts.
  • When you need a fresh record, fetch one object by id from the API.
  • Keep retrieval in its own step so unused pages stay out of the answer window.

The full conversation, with the transcript, is on Chain of Thought.

Subscribe to the Chain of Thought newsletter for new episodes and write-ups like this one.

Drafted with AI assistance from the episode transcripts.