Lovable stores each agent's full history as an event log and renders prompts from it
Lovable CTO Fabian Hedin describes an agent runtime built on an append-only, Git-like task history kept separate from both the prompt and the running process. It lets agents fork, switch models and keep working through about 700 deploys a day.
Watch from 9:56Recording by AI Engineer.
The idea
The speaker’s argument, in our words.Hedin's design separates three things that simple agent loops often merge. The trajectory is an append-only log of every event (messages, tool calls, successes and failures) where each event points to its parent, as commits do in Git; he calls it the basis for any memory the agent has. The prompt is rendered from that log for a given model, so compaction and summarisation can differ by model and context length without touching the stored history. The process running the agent is almost stateless and persists to the log after each turn.
The separation pays off in several places. Two events can share a parent, so parallel agents can fork from any point without copying the shared past (merging trajectories back has no clear meaning, and Lovable does not do it). A new process can pick up a task that has been running for ten hours after a deploy. Messages from people, other agents or schedulers land in a per-agent inbox and are copied into the trajectory when the agent is ready to receive them. The same log drives a debug view that can replay the UI at any point in a run.
What they found
From the talk. Figures are self-reported unless stated.The trajectory is an append-only log where each event points to its parent, so agents can fork from any point without duplicating shared history; trajectories cannot be merged.
Design of Lovable's agent runtime as described by its CTO. Git is named as the inspiration.
Technical recommendation
10:26Prompts are built from the full event history, so compaction can differ per model and context length.
Hedin's stated reason: when to summarise early steps of a long history depends on the model.
Technical recommendation
11:29Lovable deploys this system about 700 times a day (about once every two minutes); because processes persist to the task history between turns, a different process can continue a task running ten hours or more.
Self-reported deploy rate. Hedin gives a Linux kernel security fix as an example of an update that cannot wait for a task to finish. No data on how often resumed tasks succeed.
Case study
13:04The sandbox itself, including memory and running processes, is checkpointed at the end of each agent turn, so it can be stopped when idle, resumed in under a second and forked copy-on-write; new projects start from a golden checkpoint in about 230 milliseconds.
Hedin's description of the production system. The sub-second resume and the 230 ms figure are self-reported by Lovable without a described setup.
Case study
15:40
Why it matters
Our reading. Not said in the talk.Once agent runs last hours, the stored history carries most of the value of the run. Keeping it only as a compacted prompt makes it model-specific and lossy, and tying it to one process makes every deploy a risk to running work.
What one could try
- Persist every agent event (input, tool call, result, error) to an append-only store with a parent id, and build prompts from it with a separate renderer.
- Write compaction as a function of the target model's context window instead of mutating stored history.
- Make agent workers resumable from the stored history so you can deploy without draining long tasks.
Limitations
- Architecture description from the vendor; no measurements of reliability or cost were given for the runtime.
- The talk does not cover storage cost or how very large histories are handled when rendering.
- Checkpoint timings are self-reported, and the approach relies on VM-level snapshot and copy-on-write support that not every sandbox platform offers.
Original sources
AI Engineer CODE Summit 2026 · Nov 11, 2026
What it takes to set intelligence free
Fabian Hedin · Lovable · 22 min
This is our synthesis of the talk, checked against the transcript at the linked moments.


