# The Log Is The Agent - Ishaan Sehgal, Omnara <!-- ref: @content/youtube/aie/2026-06-25-the-log-is-the-agent version: 3 updated_at: 2026-10-31T18:18:24.909Z --> Ishaan Sehgal (AI Engineer, 2026-06-25): Sehgal argues the industry has picked the wrong abstraction: an agent is not the model and not the runtime, it is the **append-only log** of everything it has done and seen. *Synthesized from Ishaan Sehgal on AI Engineer, 2026-06-25.* Ishaan Sehgal is the CEO of Omnara, which is building an agent platform organized entirely around the session log. ## Core Thesis Sehgal argues the industry has picked the wrong abstraction: an agent is not the model and not the runtime, it is the **append-only log** of everything it has done and seen. The model and the executor merely read that log, act, and append back — so if you have the log, you have the agent, and every desirable system property (durability, scale, forking, sharing, migration) becomes structural rather than something you bolt on afterward. ## Key Insights - **The Skyrim analogy** anchors the whole talk. A character you have played for a hundred hours is not the game engine, the PlayStation, or the controller — it is the save file. If the console burns, you buy another, pull the save from the cloud, and resume exactly where you were. Identity, history, and state live in the data. - The log is the **append-only event history**: every user input, model output, tool call, tool result, permission decision, and failure — every state transition written down. Because of that, identity is decoupled from runtime, model, and tools; each of those is just a reader-and-appender. - The execution loop that falls out: reconstruct state from the log → pass state to the model → model proposes the next step, append it → if the step is a tool call, run it and append the result → repeat. Sehgal's point is not that the loop is clever but that **the loop is disposable** — a worker claims a session, reads the log, advances one step, writes the result, and vanishes; any other worker resumes from there. - **Databases already made this inversion.** Tables, indexes, and materialized views look like the system, but underneath every serious database is a log of durable changes, and everything else is a view. Agents need the same flip: model context is a projection of the log, the UI is a projection, debugging and traceability are projections, auditing is a projection, compaction is a projection. Only the log is not a projection. - **Objection 1 — compaction.** Logs grow without bound and context windows don't, so compaction is unavoidable. Sehgal's answer is that compaction is **lossy by definition** and is just another projection: a summary of a conversation is not the conversation, and a materialized view is not the database. Keep the raw log and you can always regenerate new projections; discard it and keep only the compaction and you have permanently lost part of the agent. His recommended framing is that **compaction is a best-effort lossy fork that resumes as a new log**. - **Objection 2 — state outside the log.** Agents edit files, open GitHub issues, send emails. True, but the log is not meant to contain the world — only the agent's view of it, exactly as a Skyrim save file holds player state rather than the engine and every map asset. Forking back will not unsend an email, and the agent will not notice a file changed underneath it. The log's job is to record what the agent did, saw, changed, and needs in order to continue. - **Reliability.** His concrete failure case: in Claude Code, if the agent hits a permission prompt and the process dies, resuming loses the prompt and leaves the agent paused — unacceptable in production. When the log is authoritative, the executor is *permitted* to be fallible: a fresh worker reconstructs state and finds the permission prompt exactly where it was. The process died; the agent did not. - **Scalability.** Most harnesses run one process per agent, binding the agent to a machine. With state in the log, **one process can advance thousands of agents**, each reconstructing state per turn. Failover is trivial, scaling is adding workers, and there are no sticky sessions, no state migration, and no coordination overhead. - **Forking** stops being a special feature. Branch the log and run one branch on Claude, another on GPT, another on an open-source model — each carrying shared history up to the fork point, then exploring different strategies. - **Multiplayer.** Sharing an agent should not mean pasting a transcript into Slack. Grant access to the history instead: a teammate opens the session and can view or edit, a manager observes without taking over, and another agent can consume the same session as context. Sehgal's framing is that the value isn't only what the agent produced — it's the log showing **how it got there**. - **Migration becomes an adapter problem, not an identity problem.** When identity is trapped in provider-specific threads, memory formats, and runtime assumptions, switching providers is painful. Different models want different projections and different runtimes want different schemas, but those are engineering concerns. An agent should be able to start on Claude, continue on GPT, and finish on Qwen without losing itself. - **Current harnesses treat the log as exhaust.** Sehgal names specifics: Claude Code and Codex write messy JSONL to local disk, and in Claude SDK mode those writes are **fire-and-forget** — if a write fails, the data is simply gone. OpenCode keeps state in SQLite, with a trail of GitHub issues about corrupt state and data loss. Durable-object approaches end up holding separate shards, making history reconstruction and cross-session querying hard. In each case the log is a side effect rather than the system. - **Log lock-in is the deepest lock-in.** Model lock-in is weak because models swap; API and tool lock-in is weak because they can be wrapped and adapted. But whoever owns your log owns your agent, because the model, runtime, and machines are all replaceable and the log is what persists. - Sehgal urges taking this seriously right now: Anthropic has managed Claude agents, Google has managed Gemini agents, and every managed provider will want more of the stack — hosted loop, managed memory, sandboxes, compaction, background agents. His argument for why this matters more than ordinary vendor lock-in: agents are the **most intimate technology you will run**, because to be useful they need your personal data, your company's data, your workflows, and your decisions. The log records all of it, so if it sits on someone else's infrastructure under their policies and queryable by their systems, they don't host your agent — they own it. - Omnara's architecture puts every component in orbit around the log: the worker advances the loop but is only an executor; it calls the model provider, writes results back, dispatches any requested tools to the appropriate execution environment, and tool results append back — after which a **different** worker typically reconstructs state and continues. Sehgal's justification is the real failure surface: workers crash, machines restart, sandboxes disappear, tool calls time out, providers fail, users disconnect. If the agent is a running process that is terrifying; if the agent is the log it is an execution detail. The company is preparing to open-source a managed agents platform built on a session log the user fully owns, inspects, and controls. ## Actionable Takeaways 1. Make the log the write-path of record: append every user input, model output, tool call, tool result, permission decision, and failure as its own event, and derive model context, UI, audit, and traces from it as projections. 2. Design workers to be stateless and disposable — claim a session, reconstruct state from the log, advance one step, append, exit. Resumption then costs nothing and any worker can pick up any session. 3. Never let compaction be destructive. Treat a compaction as a lossy fork that starts a new log, and retain the raw log so you can regenerate other projections later. 4. Scope the log to the agent's view of the world, not the world. Accept that side effects (sent emails, edited files, created issues) are not reversible by forking, and record what the agent did and saw rather than trying to make the environment deterministic. 5. Test the permission-prompt-plus-crash case explicitly. If resuming loses a pending prompt and leaves the agent stalled, your state lives in the process rather than the log. 6. Fork by branching the log to compare strategies or model providers on shared history rather than re-running from scratch. 7. Share sessions by granting access to the history — for teammates, for observing managers, and for other agents consuming it as context — instead of copying transcripts. 8. Audit where your logs live and whether you can export them in full. Sehgal's ordering of risk puts log ownership above model and API lock-in, because everything else in the stack is replaceable. 9. Do not rely on fire-and-forget local writes (JSONL to disk, single SQLite files) as your durable record if you intend to run agents in production. ## Notable Quotes > "Your character is data. It's the save file." — Ishaan Sehgal > "The important insight is not that this loop is complicated. The important insight is that the loop is disposable." — Ishaan Sehgal > "Underneath every serious database is a log. Everything else is a view." — Ishaan Sehgal > "The deepest form of lock-in is log lock-in." — Ishaan Sehgal > "If it lives on someone else's infrastructure under their policies, they don't just host your agent. They own it." — Ishaan Sehgal > "You're going to stop treating the log as exhaust from the system, and treat it as the system itself." — Ishaan Sehgal --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*