Hi,👋 we have updated the app and fixed multiple bugs. We are lacking funds, request to free user not to use Adblock. Ads are non intrusive. 😊

✨ Visual Editor

close

Thread Truncated

Only the first 20 tweets are shown to ensure high-quality rendering and prevent image size issues.

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135°

style Card Style

40px
16px

text_fields Typography

16px
PostHog
@posthog
Thread image
Thread image
PostHog
@posthog
When the creators of both OpenClaw and Claude Code speak, people listen. And recently and Boris Cherny have both been talking about the same concept: loops.
PostHog
@posthog
Their argument? You shouldn't be prompting agents to write code, but building loops that prompt themselves to write code, so agents can complete long running tasks and you can use multiple agents at once to go further, faster.
PostHog
@posthog
# What's needed to engineer a loop?
PostHog
@posthog
You need four things:
PostHog
@posthog
## 1. A goal
PostHog
@posthog
Agents are capable, but you need to scope the loop so they know what you want them achieve. A loop without a goal is a slop cannon.
PostHog
@posthog
## 2. Context
PostHog
@posthog
Context is fuel and loops are often starved of it. Context can include tools, skills, analytics data, errors, memories – any information that helps the agent find work and complete the loop. It's best to curate context and feed it throughout, rather than dump it all upfront. The agent needs to be able to fetch and react to new inputs.
PostHog
@posthog
## 3. Evaluation
PostHog
@posthog
This is how the agent checks itself. Tests, evals, metrics, LLM-as-judge, playgrounds. Test-driven development is so back, or maybe it never left? This is a big difference between loops and prompting: agents do the verification, not engineers.
PostHog
@posthog
## 4. An agent (obviously)
PostHog
@posthog
The most basic is using something like Claude Code with a while true (aka Ralph) or using /goal. More complicated is purpose-built harnesses and context systems – e.g. an agent on a cron that pulls signals from your product data and emit work to subagents, or a loop that codegens its own test suite to verify itself.
PostHog
@posthog
Good examples of loops include:
PostHog
@posthog
• PR babysitter. The goal is to get a pull request to pass tests and "get CI green." The context is the changes (diff) as well as the testing suite, and the evaluation is done by the CI.
PostHog
@posthog
• Bug fixer. The goal is to fix the bug. The context is the bug report and error trace. The evaluation is the test suite, snapshots, logs.
PostHog
@posthog
• Flaky test hunter. The goal is to kill flaky tests. The context is CI history and retry logs. The eval is consecutive green runs.
PostHog
@posthog
• Performance autoresearcher. The goal is to beat a benchmark. The context is the system, metrics, and budget. The eval is whether it is faster, better, etc. on that metric. We recently used Karpathy's autoresearcher loop and it fixed a 3-year-old bug in our query engine and increased performance by 11%.
PostHog
@posthog
# Why is everyone talking about loops right now?
PostHog
@posthog
Because it works. Yes, Peter and Boris lit the fire, but they're doing so because it's a real thing. The real "why now" is new and improved capabilities:
Generated by Thread Navigator
100%
view_carousel Carousel Studio NEW
Press ⌘ + S to quick-export