Every turn in CXDB tracked its depth from root. Turn zero was depth zero. Its children were depth one. Their children, depth two. All the way down, an integer counter incrementing with each generation, a built-in measure of how deep into a conversation the agent had gone.
Jay hadn't thought much about depth as a metric until he started analyzing the migrated data. Two hundred eighty-three thousand turns across nearly five thousand conversations. Each turn tagged with its depth. He wrote a query to correlate depth with outcome and then stared at the results for a long time.
"The sweet spot is between forty and sixty," he said.
Navan pulled up a chair. "What do you mean?"
"I mean the best solutions—the ones that pass all scenarios, the ones with the highest satisfaction scores—come from conversations with depth between forty and sixty turns." Jay showed him the scatter plot. Satisfaction score on the Y axis, conversation depth on the X axis. A clear peak in the 40-60 range, with long tails on both sides.
"Shallow conversations—under twenty turns—don't have enough context. The agent hasn't explored the problem space deeply enough. It's producing first-draft solutions that miss edge cases." Jay pointed to the left side of the chart. Satisfaction scores clustered around 0.6 for conversations under twenty turns deep.
"And deep conversations?" Navan asked, looking at the right tail.
"Over eighty turns, the agent is usually stuck. It's been going around in circles, generating increasingly verbose workarounds, losing coherence. The satisfaction score drops because the agent has accumulated so much context that it's tripping over its own history." The right side of the chart showed scores declining past depth eighty, some of them dipping below 0.4.
"But in that forty-to-sixty range—" Jay zoomed in. "The agent has had enough turns to understand the problem, explore alternatives, implement a solution, test it, and refine it. But it hasn't been going so long that it's lost in its own context. It's the Goldilocks zone."
Navan studied the chart. "Can we use this? Like, as a heuristic? If a conversation hits depth eighty without converging, maybe we should fork it back to depth forty and try a different approach."
"That's exactly what I was thinking." Jay pulled up the CXDB branch API. "We can automate it. Monitor depth in real time. If an agent passes depth eighty without achieving a satisfaction threshold, automatically fork back to the last good checkpoint in the forty-to-sixty range."
"An automatic depth governor," Justin said from behind them. Neither of them had noticed him arrive. "You've rediscovered the concept of a horizon in planning. Don't plan infinitely deep. Plan to a useful depth, evaluate, and replan."
Jay saved the scatter plot. He labeled the peak: The depth window. 40-60. This is where clarity lives.
Navan copied the numbers into his notebook. Depth wasn't just a counter. It was a measure of how much thinking was enough.
The Goldilocks zone for conversation depth is a legitimately useful finding. Too shallow and you get first drafts. Too deep and the agent drowns in its own context. 40-60 is the sweet spot.