Jay found it at 7:14 AM on a Monday. He'd come in early because he liked the office before anyone else arrived—the quiet, the smell of cold coffee from Friday, the monitors glowing with the night's output waiting to be read.
The agents had been working on the Slack twin integration overnight. The scenario was straightforward: a user creates a channel, invites members, posts a message, edits the message, deletes the message. Standard CRUD operations against the behavioral clone. The satisfaction metric should have been high and unsurprising.
It was high. Ninety-nine point one percent. But the implementation was surprising.
The agent had built an event sourcing system. Instead of mutating state directly, every operation was recorded as an immutable event. Channel creation was an event. Member invitation was an event. Message posting, editing, deletion—all events. The entire state of the Slack integration could be reconstructed by replaying events from the beginning.
Nobody asked for event sourcing. The scenario didn't mention it. The NLSpec described observable behaviors, not architectural patterns. But the agent had looked at the scenario—create, read, update, delete, and verify consistency—and concluded that event sourcing was the most reliable way to satisfy the consistency requirement.
It was correct. It was not what anyone asked for. It was better.
Jay stared at the code for twenty minutes. Then he called Navan, who was still on his commute.
"The agents are dreaming," Jay said.
"What?"
"They're producing code at night that's correct but unexpected. Not wrong. Not what we asked for. But better than what we asked for. Like they're... exploring. Trying things that go beyond the spec."
Navan was quiet for a moment. Jay could hear traffic in the background. "That's not dreaming," Navan said. "That's optimization. The agent found a global maximum that we didn't know existed."
"It feels like dreaming."
"A lot of optimization feels like dreaming. That doesn't make it dreaming."
But Jay kept the word. When he told Justin about it later that morning, he said "the agents are dreaming at night" and Justin gave him a look that was half amusement and half something else.
"Don't anthropomorphize the agents," Justin said.
"I'm not. I'm just noting that they produce their most creative output between midnight and dawn, when nobody's watching, and the results are things we didn't ask for that are better than what we asked for. If a human engineer did that, you'd call it inspiration."
"If a human engineer did that, I'd call it insubordination. We don't ask engineers to go beyond the spec."
"Right. But we don't mind when the agents do it. Because we measure the output, not the process."
Justin considered this. Then: "Fine. The agents dream. Metaphorically. The output of those dreams is code. And the code is good. That's what matters."
The event sourcing system shipped. It worked flawlessly. It handled edge cases that a direct mutation approach would have struggled with. It was the kind of architecture that a senior engineer with twenty years of experience might have proposed, and the agent had produced it overnight, in the dark, while nobody watched.
Jay started calling the overnight output "dreams." The name stuck. Navan protested the anthropomorphism for exactly one week before he started using the term too. Even Justin, occasionally, in unguarded moments, referred to the 3 AM output as what the factory dreamed.
The factory didn't dream. But it produced things in the night that looked, from the outside, like the products of dreaming. And sometimes the metaphor is close enough.
An agent independently arriving at event sourcing because it satisfies consistency requirements better than CRUD is genuinely wild. That's not just optimization. That's architectural reasoning. Call it what you want.