Oven

docs · how it works

Follow one prompt through the oven.

What happens between pressing Enter and the final answer: the agent loop, tool calls, plan mode and its checklist, subagents and durable memory. Step through a real turn below or jump to a part.

oven-tuikeys, screen, oven binary
oven-appruntime actor, sessions, subagents, slash commands
oven-agentthe loop, tools, todos, prompts
oven-llmproviders, streaming
oven-hostfiles, processes
oven-memdurable memory

Commands flow down, events flow up. A layer only reaches the ones below it.

Trace a turn

The user is in plan mode and asks for a small feature. Step through the turn and watch which crate is working, what reaches the screen and which events go out on the bus. Use the arrow keys once the player has focus.

  1. tui
  2. app
  3. agent
  4. llm
  5. host
  6. mem

Events

    Where

      The agent loop

      Agent::run is one loop policy over Agent::step. A step is one provider round trip plus the tools it asked for; the loop keeps stepping until a reply asks for no tools. Click a stage, or animate two laps.

        
                  

        Tool calls

        Every tool declares what it may do — read, write, execute or reach outside — and the mode decides what that means. The model only sees tools it is allowed to call. Switch modes to compare.

          offered asks first hidden exclusive

          One reply, five calls

          Calls from one reply run at the same time. Approvals are asked one by one in the model's order, tools that rewrite a file or talk to the user take turns, and results enter the history in the order the model asked — which is what a provider expects back.

          t = 0.0s

            Finished events (completion order)

              History (request order)

                Plan mode & the checklist

                There is no separate todo mode: the checklist lives on plan mode. Shift+Tab switches live; the next step picks it up. Each todo_write replaces the whole list. Walk through one plan.

                  System prompt of the next request

                    Checklist widget

                      Subagents

                      The task tool hands a self-contained job to another Agent with its own history, on the same router and the same tool instances. Only its final report comes back as the tool result.

                      explore

                      Read-only

                      Every tool whose permission is read: file_read, glob, grep, memory_read… The only role plan mode allows.

                      general

                      Full tool set

                      Everything except answer, todo_write, task, task_output and the memory writers: no questions, no plan, no nesting.

                      Lifecycle — click a state

                        Memory

                        History, compaction and todos die with the session. Memory is what outlives it: one markdown file per memory, a one-line description of each in the system prompt, and the body read on demand.

                        ---
                        kind: fact
                        description: Integration tests need OVEN_TEST_PROXY=1 or they hang on DNS.
                        source: 01J8Z…
                        ---
                        Run `OVEN_TEST_PROXY=1 cargo test -p tiny-cli`. Without it the
                        resolver blocks for 30s per test. Seen in CI and locally.
                        <root>/.oven/memory/
                        workspace scope: facts about this repository
                        ~/.oven/memory/
                        user scope: preferences that follow you

                        Facts can go stale, so the model checks them against the code. Preferences are followed unless you or the project instructions say otherwise. The catalog is rendered once when the agents are built, so it stays a cached prompt prefix; a new memory shows up in the catalog next session.

                        Tools: memory_read, memory_write (upsert by id), memory_forget. Humans use /memory or oven mem. --amnesia turns it all off.

                        Would oven remember this?

                        Ending a turn

                        A turn ends with exactly one of Completed, Cancelled or Failed. The runtime then saves, publishes the new state and may compact before it goes back to idle. Click a phase.

                        1. Save

                          New history records are appended to the session JSONL under ~/.oven/sessions/, plus a checklist snapshot when it changed.

                        2. Publish

                          The runtime writes the new AppState to a watch channel: events say something happened, state says what is true.

                        3. Compact?

                          Past 80% of the model's context window, the history is summarized into one message in a fresh session file. Todos survive.

                        4. Idle

                          Inputs queued during the turn now run in order. Esc Esc undoes the last exchange — your message, the reply and the tools it ran. Mid-turn the same two keys cancel instead, and a queued prompt goes back to the composer first.

                        Read the design notes