Skip to content
BENIBIX Learn

continue vs resume (Agent SDK)

People think continue and resume are two names for one thing. continue takes the latest session in the current folder, with no ID. resume takes the one session whose ID you pass, even an old one. Use continue when your app runs one chat at a time, and resume when it runs many.

AI🧩 Claude Agent SDK

continue Option

The option that picks up the last session in the folder. No ID is needed.

continue is the Agent SDK option that picks up the most recent session in the current folder. In Python it is continue_conversation. You do not need a session ID, because the SDK finds the latest one for you. It suits an app that runs one chat at a time. To pick a session that is not the latest, use resume.

Example
Leo's script crashed mid-task. He runs it again with continue set to true, and the agent picks up where it was.
Why it matters
It is the easiest way to survive a restart, with nothing to store.
Full entry
AI🧩 Claude Agent SDK

resume Option

The option that loads an old session by its ID, with all of its past.

resume is the Agent SDK option that loads a past session by its ID. You get the ID from the init message or the result message, and save it. The agent then has the whole earlier chat in its context. The session must be on the same machine, or in a session store, and the folder must match. resumeSessionAt can also load it at a set message.

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.
Full entry

In one line

continue Option
The option that picks up the last session in the folder. No ID is needed.
resume Option
The option that loads an old session by its ID, with all of its past.