Subagents and sessions
A subagent is a fresh model call with its own empty context, given a narrow task by a parent agent; it returns a summary rather than its transcript. A session is one running transcript.
Sessions, hand-offs, and what survives
| Material | New turn | New session | Compaction |
|---|---|---|---|
| Chat | Re-sent | Fresh | Summary |
| Project | Available | Available | Durable |
| Files | Durable | Durable | Durable |
| Memory | Re-sent | If supplied | Lossy |
| You want to… | Do this |
|---|---|
| Keep a fact safe across a long session | Write it to a file or project. The transcript compacts; files don't. |
| Resume tomorrow | Resume the session if the tool supports it, and expect the early turns to be summarized. Re-supply anything critical. |
| Try two approaches | Fork the session where the tool supports it, so each attempt starts from the same history. |
| Hand off to another person or agent | Hand off the file, not the chat. Written state travels; a remembered one does not. |
What to do with this
Next time a long job spans two days, write the state to a file at the end of day one and start day two from the file, not from the chat. Then read what running the model from code changes: What an API is.