# continue Option

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

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** continue_conversation, Agent SDK continue, Claude Agent SDK continue

## Think of it like

It is like a book you open at the bookmark.

## Definition

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.

## Example code

```typescript
query({ prompt: "Carry on", options: { continue: true } })
```

Go on with the latest session in this folder.

## Why it matters

It is the easiest way to survive a restart, with nothing to store.

## Common mistake

Using it when several chats run in one folder. It takes the latest, which may be the wrong one.

## Three principles

- **Latest in the folder.** No ID.
- **One chat at a time.** Best fit.
- **Otherwise use resume.** By ID.

## Related terms

- [resume Option](https://learn.benibix.com/term/ai/resume-option)
- [forkSession Option](https://learn.benibix.com/term/ai/fork-session-option)
- [Claude Code Session](https://learn.benibix.com/term/ai/claude-code-session)

## Told apart from

- [continue vs resume (Agent SDK)](https://learn.benibix.com/compare/continue-option-vs-resume-option): 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.

![Three ways to start from an old session: continue picks the latest one in the folder, resume picks one by its ID, and resume with forkSession copies it to a new ID.](https://learn.benibix.com/diagrams/agent-sdk-session-options.svg)

---

Source: https://learn.benibix.com/term/ai/continue-option
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
