🧩persistSession Option
Also known as persistSession, Agent SDK no session persistence, Claude Agent SDK persistSession
The option that stops a session being saved. Then it cannot be picked up later.
Think of it like
It is like a chat on a board that is wiped at the end.
Example
Mia's agent handles private files for one request at a time. She sets persistSession to false so no transcript is left behind.
Why it matters
A saved transcript holds everything the agent read, and some jobs should leave no trace.
Definition
Common mistake
Key takeaways
- 1On by default. Transcripts saved.
- 2false writes nothing. No resume.
- 3For one-off jobs. Clean disk.