⌨️--session-id Flag
Also known as claude --session-id, --session-id
It starts a session with an ID you choose.
Think of it like
It is like you pick your own box number. Then you put your bag in that box.
Example
Emma's script makes a UUID, saves it with the job, then runs claude -p with that --session-id. The next day it resumes the same session by the saved ID.
Why it matters
A script can find its own sessions later without reading a list or guessing.
Definition
Example code
bash
claude --session-id "550e8400-e29b-41d4-a716-446655440000"Common mistake
Key takeaways
- 1You choose it. Up front.
- 2Must be a UUID. Not a name.
- 3For scripts. To find it later.