Fabian Hedin: How Lovable keeps coding agents working for hours

Lovable separates agent history from execution, checkpoints working computers, and feeds verification results back into each task.

FHFabian HedinPonente · Lovable
Canal
AI Engineer
Publicado
19 nov 2026
Vídeo
22:25
Lectura
6 min
Diapositivas
6
Original
inglés
Abrir en YouTube
Al desplazarte, el vídeo se reduce a la esquina inferior derecha y sigue reproduciéndose. Los subtítulos siguen tu idioma de lectura.
Idioma de lecturaDisponible en 2 idiomas
Este artículo aún no está en español, así que se muestra el original en inglés.
RESUMEN

En 30 segundos

Lovable nearly failed after building a multi-agent system before its models were capable enough, says co-founder and CTO Fabian Hedin. Now its agents can work for hours: an append-only task history lets processes restart across deployments, while computer checkpoints preserve running environments and make parallel drafts cheap. Hedin says verification must span both immediate build and browser checks and later signals such as visitor behavior and transactions.

  1. 1An early multi-agent framework made Lovable worseHedin says the team nearly ran out of money after betting on complex agents in 2023, then recovered by returning to a simpler model workflow.
  2. 2An inbox lets people, agents and schedules reach an active agentMessages enter a separate inbox and the agent copies them into its task history between steps.
  3. 3A forkable event log preserves history across parallel agentsEach event points to its predecessor. The same history can be rendered into different prompts while workers restart independently.
  4. 4A saved computer can resume in about 230 millisecondsHedin says a shared checkpoint includes disk, memory and processes; project-specific snapshots allow work to pause and resume quickly.
  5. 5Copy-on-write memory makes parallel drafts cheaperForks share unchanged memory pages and allocate copies only when a draft writes to them.
  6. 6A Rust development server reduces preview startup timeLovable rewrote Vite as OJ; Hedin reports faster cold starts and a smaller memory footprint.
  7. 7Agents need checks now and product feedback laterBuild errors and browser checks give immediate feedback; user behavior and conversions can inform a later turn.

Conclusiones

  1. Separate durable task history from the process running an agent so work can continue through deployments.
  2. Keep a complete event log and build model-specific prompts from it, rather than treating the prompt as the only record.
  3. Checkpoint working environments and share unchanged memory when exploring parallel solutions.
  4. Give agents immediate checks during a turn and product or business feedback between turns.
  5. Hedin says Lovable returned to multi-agent systems only after an earlier attempt made its product worse.
TEXTO COMPLETO

Lee el texto editado por capítulos

Solo la transcripción
01

Why the first multi-agent system failed

Hedin says the team introduced complex agents before models were ready. A simpler system made the product responsive and reliable again.

I am Fabian, co-founder and CTO of Lovable. We have spent the past few years building a platform that lets people create, deploy and operate software. Our experience with agents has been complicated: in 2023 we believed they were the future and built for that future immediately.

That nearly ended the company. The models of the GPT-4 era did not yet have enough intelligence for the complex agent systems we wanted. Today, I think they are capable enough to support more elaborate systems.

Our first product, GPT Engineer, had a chat alongside an application preview. Each user message triggered one model call, which was enough for simple one-page apps. Expecting rapid improvement, we built a much more sophisticated agent framework.

The first multi-agent framework
DIAPOSITIVA 1 / 6The first multi-agent frameworkThe team initially split tasks among specialized agents; Hedin says the system made the product worse.

A main agent spoke to the user and spawned specialists, such as implementation, front-end and back-end agents. They sent messages to one another, but the design did not work in practice: it made the product worse. Before we ran out of money, we went back to something simpler.

In late 2024 we used smaller models for knowledge retrieval and one main model to respond and write code. The result was responsive and reliable, and users could iterate closely with it. Agents are now working for us again, in production at more than a billion tokens per minute.

02

Lovable treats a business as the outcome

The product combines a coding agent, hosting and business capabilities. Hedin says the goal is a working product rather than code alone.

Lovable still presents a chat on the left and a preview of the result on the right. Users can now build much more complex things at this level of abstraction. Developers too are moving toward interfaces where they spend less time looking at code and more time considering architecture and outcomes.

The outcome our users care about is a product or business that creates value, not the code itself. The coding agent can use a browser to check what it builds, connects to GitHub and writes code users can take elsewhere.

We also give the agent cloud capabilities: databases, authentication, storage, backend compute, security scanners, backups and logs. The agent can inspect them without asking a user to assemble services by hand. Beyond hosting, we support payments, email, search optimization, advertising and analytics so the agent can help with the business around the software.

03

An inbox and event history support long-running agents

Messages and a forkable task log let agents receive input and share history. Prompts are derived from that record.

We once limited agents to 30 minutes because we did not trust longer runs. That time bound is gone, and an agent can work for ten hours or more. To support that, we focused on its runtime, the computer where it works, and the feedback it uses to verify its actions.

Each agent has an inbox. A person, another agent or a scheduled system can put a message there, such as a status request. Between actions, the agent can copy a message into its own task history, which we call its trajectory.

Messages enter an agent inbox
DIAPOSITIVA 2 / 6Messages enter an agent inboxA user, another agent or a schedule can send a message that the agent adds to its history between steps.

The task history is also the basis of memory. Inspired by Git, it is an append-only log: each event points to the event before it. Two events can point to the same parent, allowing parallel agents to branch from a shared past without copying the entire history. Unlike Git, we do not merge these trajectories; agents can communicate instead.

Forking task history
DIAPOSITIVA 3 / 6Forking task historyEvents point to earlier events, so parallel histories can share their common past.

The log records everything, including tool calls and whether they succeeded or failed. We then construct the actual model prompt from that history. That separation matters because different models have different context limits and may need earlier events summarized at different points.

Our debugging tool can move a slider through the recorded events and reconstruct what the user interface looked like at each point. Keeping the complete event history gives us control over how to render the state of the task.

04

Processes change while agent tasks continue

Keeping task history separate from workers permits deployments without ending a long task. Updated processes can resume the same work.

The processes that run agents are separate from that history. Between calls and turns, the work is persisted, so a worker process can go away and another can continue the task. This is useful because Lovable deploys roughly 700 times a day, about once every two minutes.

A customer may have an agent working for ten hours while we need to release a feature or fix a serious security issue. Separating task history from execution lets the same task continue under updated processes rather than interrupting it at each deployment.

The second part is the computer where the agent runs a development server and verifies its work. After working through several sandbox approaches, we built a system that checkpoints the entire computer.

05

Checkpointed computers resume and fork quickly

A prepared checkpoint provides the environment for a project. Copy-on-write memory and streaming reduce the cost of parallel drafts.

A new project starts from a prepared golden checkpoint containing the operating system, services, common tools and a development server ready to start. It includes disk, memory and running processes. Hedin says copying that state takes about 230 milliseconds.

As a project gains code and dependencies, its computer is checkpointed too, including at the end of agent turns. We can shut it down after inactivity to save resources and resume it in less than a second when needed. Hedin says requests in transit are not dropped in this setup.

The same mechanism lets us fork a computer, as well as the agent history. Lovable uses this for drafts: separate environments let agents explore different versions of a project. Making many copies practical required optimizations.

Drafts share unchanged memory
DIAPOSITIVA 4 / 6Drafts share unchanged memoryCopy-on-write creates a separate page only when a draft changes it.

One is copy-on-write memory. Forks initially share the same memory pages, so making a branch uses almost no additional RAM. When a process writes to a page, the system copies that page and allocates memory for the changed version.

A sandbox needs hundreds of megabytes of memory, which could take seconds to retrieve from cold object storage. Instead we stream memory and start the machine before every page arrives: the operating system receives what it needs first, and other processes follow as their memory becomes available.

06

A rewritten development server speeds previews

Lovable rewrote Vite in Rust as OJ. Hedin reports faster starts and lower memory use.

We also rewrote the Vite development server in Rust as OJ. Hedin says this doubled cold-start speed and reduced the time to a ready preview from 14 seconds to three, as shown on his slide. Removing Vite’s Node.js dependency also reduced the machines’ memory footprint by a factor of 6.5.

OJ rewrites Vite in Rust
DIAPOSITIVA 5 / 6OJ rewrites Vite in RustThe slide compares cold starts and preview time for the Rust development server.

Controlling the applications inside these computers also lets us control how they write to memory. That makes copy-on-write more efficient, enabling many parallel agents to explore possible bug fixes or performance improvements.

07

Verification connects code checks with product outcomes

Immediate checks help an agent fix errors during a turn. Later user and business signals can guide future work.

Verification is the final part. An agent needs feedback about whether an action was good or bad. In the inner loop, during a turn, it can see build failures, lint and type errors, runtime errors in the preview, and results from a headless browser exploring the app.

Immediate checks and later product feedback
DIAPOSITIVA 6 / 6Immediate checks and later product feedbackThe inner loop checks a current turn; the outer loop brings product and business signals into future work.

There is also an outer loop between turns, when the agent has yielded to the user. Production signals, visitor behavior and user feedback can show what happened after a change. Automatic A/B tests can compare copy and reveal whether a change improves conversion.

Because the platform also handles business capabilities, an agent can use transaction and conversion information to help improve more than the code. These later findings can inform the next turn and the strategy around the product.

Those pieces—orchestration, computers and verification—are the architecture we continue to build. Agents can share a computer or explore different ones, and they can communicate with each other. Hedin says the multi-agent approach is now working at scale, supported by these infrastructure optimizations.

Más de este canal

5 diapositivas19:08EN
AI Engineer· 19 nov 2026Thariq Shihipar: Keep a human-readable layer in AI-built softwareThariq Shihipar · AnthropicA fighting-game experiment gives its creator readable rules to edit while an agent handles the underlying engine.Agentes de programaciónHuman-AI CollaborationFlujos de desarrollo y pruebas+1
5 diapositivas17:50EN
AI Engineer· 18 nov 2026Melvin Johnson: Train coding agents to solve tasks, not game testsMelvin Johnson · Google DeepMindGoogle DeepMind’s post-training lead explains harder tasks, reviewer-style grading and rewards for honest reports.Agentes de programaciónModelos y entrenamientoEvaluaciones+2
3 diapositivas14:07EN
AI Engineer· 18 nov 2026Walden Yan: Build the Feedback Loops That Let Coding Agents WorkWalden Yan · CognitionCognition reports 40 times more merged changes after making its code testable by agents and assigning longer-running goals.Fábricas de softwareAgentes de programaciónDeveloper productivity+2
5 diapositivas58:03EN
AI Engineer· 17 nov 2026How Codex Connects Context, Cloud Work and Agent DelegationDominik Kundel, Charlie Guo · OpenAIOpenAI’s Dominik Kundel and Charlie Guo show how connected context, quick feedback and remote agents fit into real work.Agentes de programaciónFlujos de desarrollo y pruebasIngeniería de agentes+2
5 diapositivas19:38EN
AI Engineer· 17 nov 2026Simon Willison: AI Agents Can Solve More, but Engineering Still Feels HardSimon Willison · DatasetteA beeping detector, a strategy game and a pelican benchmark show how coding agents changed his work in 2026.Agentes de programaciónIngeniería de agentesAI security+2
4 diapositivas19:55EN
AI Engineer· 16 nov 2026Brandon Thomas: AI Agents Can Help Rebuild Creative Apps in the OpenBrandon Thomas · ArtCraftArtCraft’s team built an initial Photoshop-like editor in about a day, then enlisted a community to expand open creative tools.Open SourceGenerative mediaSoftware engineering+2