The alpha, twice a week
That was 3 min.
Get the best new moments in your inbox every Wednesday and Saturday. It's free.
Check your inbox
We sent a link to your address. Click it to finish signing up. Not there in a minute? Look in spam.
or
Lightcone · 3 min · Nov 14, 2026
Agents improve when they can run and check their own code
Lauren Tan explains how to close the coding loop by having agents run the application and inspect their results.
The episode’s best minutes
Full analysis- 16:09Bots should earn broader access as people learn to trust them7 min
- 40:06Agents improve when they can run and check their own code3 min
- 52:17Product direction becomes the bottleneck as execution gets cheap4 min
- 5 more moments in the full episode
“the agent now has the ability to check its own work so you can find the issues with the code that it wrote then it can write better code”
Lauren Tanat 41:06 · LightconeTakeaways
- Teach agents to run code like a real user would.
- Let agents find issues and iterate on their own work.
- Add alert-triggered workflows after the basic loop works.
About this segment
Lauren Tan explains how to close the coding loop by having agents run the application and inspect their results. Once they can find and fix issues themselves, they need less supervision.
Principal engineer, SpaceXAI
Created pstack and co-authored React Compiler 1.0; now builds Grok Bot's agent workflows and runs 20+ agents.

Garry Tan, Host · President & CEO, Y Combinator
Co-founded Posterous and Initialized Capital, an early Coinbase backer.

Harj Taggar, Host · Managing partner, Y Combinator
Co-founded Auctomatic with the Collison brothers and later Triplebyte.

Diana Hu, Host · Managing partner, Y Combinator
CTO of Escher Reality; after Niantic bought it, ran AR for Pokémon GO.

Jared Friedman, Host · Managing partner, Y Combinator
Co-founded Scribd, which YC funded in 2006; has advised 20+ YC unicorns.
From “The Rise Of AI Coworkers”, Nov 14, 2026. Watch the full episode
Answers “Are AI agents ready for real work?” See all 157 answers
Thanks. We'll look at and fix what's off.
Transcript
Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.
- 40:11
I mean, your video is pretty impressive. Is there like one super important, just like if you do this, you'll get started? Like I think, was it like, you know, what's the minimal form of a loop? This is the smallest loop essentially. Like so agents already are able to write code. Maybe it's not good. Let me scratch it out for now. So naively, if you're using agents, you can definitely write code. You can run the code.
- 40:36
And today, if you haven't spent a lot of time in your agent setup, you may be the person running the code. And so this isn't actually a loop, really, because right now this is the missing piece. The agent can't do this, but you are doing it. So the smallest loop, I find, is actually focus on this part. how do you teach your agent to you know run the code empirically uh you know take cpu traces you know like performance metrics like run the code and run the application like a real user would the reason why i think it provides a loop is because the agent now has the ability to check its own work so you can find the issues with the code that it wrote then it can write better code or more correct code and then it can keep looping until it produces a result that you want i took out the good part for a reason because i think that you know when you have a loop like this it
- 41:29
doesn't guarantee that the quality of the code is is good but it certainly will be correct you know correct in the sense that it does the thing that you want it to but maybe it's like very slow or very resource inefficient and that's where you know the engineers sort of come into play is like the new job of the software engineer is to figure out how to get this to happen right how do you get agents to write good code by default. And so the loop gets smarter and smarter. And when you're happy with it, I think that's the point where you can start thinking about, you know, the other parts of the loop, like, you know, the outer loop part, where, you know, like, once this part is really good, you can now do things like, for example, just a simple example here, you have an alert for some metric or monitor that's uh you know going below a certain threshold now an agent like a
- 42:22
graph bot a cursor automation uh could be fired off as a result of that alert and then you can go off and use the same you know tools and skills that you've provided for the basic loop and it can repro you know reproduce the issue and it's on machine and then you know like it runs the code and then it finds the issues of the code and it writes good code and then now you have this like self uh sustaining loop and that frees up my time right from uh you know being babysitting every agent to now orchestrating multiple agents and i even now have my bots or i've gone another level where i you know in cursor we have this new feature called projects that lets you have a project coordinator agent that can orchestrate and manage like subagents i don't even manage the project myself anymore i have my bots do that i feel like uh since we have you know some of the