🧩resume Option
Also known as Agent SDK resume, resume session ID, Claude Agent SDK resume
The option that loads an old session by its ID, with all of its past.
Think of it like
It is like loading a saved game by its name.
Example
Mia's app saves each user's session ID. When a user comes back the next day, she passes it to resume, and the agent remembers the work.
Why it matters
Users come back to old chats, and resume is how the agent remembers them.
Definition
Example code
typescript
query({ prompt: "Now add tests", options: { resume: sessionId } })Common mistake
Key takeaways
- 1Load by ID. Save it first.
- 2Same machine and folder. Or a store.
- 3Full history. Back in context.