Harness Notes

Thread naming

Updated 2026-11-22,

On this page

How sessions get their titles and how you rename and find them. Where the sessions themselves are saved is on the Transcripts page.

QuestionClaude Code currentchecked at 2.1.314Claude Code sdk-0.3.312-title-controlchecked at 0.3.312Claude Code claude-agent-acp-0.99.1checked at 0.99.1Claude Code direct-print-2.1.314checked at 2.1.314
Automatic names

Yes for interactive CLI sessions: the first prompt starts background title generation, and plan acceptance can replace the generated title unless a custom name exists. Direct shell/script claude -p does not get an automatic title. SDK and ACP runtimes have separate contracts.

Partly

The published SDK 0.3.312 runtime contains generateSessionTitle(description, {persist}) sending generate_session_title, but the method is absent from its public TypeScript declarations. Adapter source reports native SDK background titles; this audit did not verify that automatic trigger in the closed CLI implementation. Do not equate SDK sessions with direct shell -p or promise a public title event.

claude-agent-acp 0.99.1 adopts stored titles, requests the SDK runtime title control after prompt submission (or at idle), persists generated titles and sends session_info_update.title. It falls back to summary text when generation is unavailable; a title event alone is not proof of AI generation.

Not supported

Direct shell/script claude -p runs do not get an automatic title according to current official CLI documentation. This does not establish SDK or ACP behavior. Existing saved names can still be adopted on resume.

Rename a session

Start with claude -n <name> (--name), run /rename <name> during the session (with no argument it generates a name from the conversation), or highlight a session in the /resume picker and press Ctrl+R. A SessionStart or UserPromptSubmit hook can return hookSpecificOutput.sessionTitle, and the Agent SDK has renameSession() / rename_session().

Names are capped at 200 characters and control or invisible characters become spaces.

In the desktop app you can rename a session by clicking its title, or ask Claude to rename another Code tab session.

Start with claude -n <name> (--name), run /rename <name> during the session (with no argument it generates a name from the conversation), or highlight a session in the /resume picker and press Ctrl+R. A SessionStart or UserPromptSubmit hook can return hookSpecificOutput.sessionTitle, and the Agent SDK has renameSession() / rename_session().

Names are capped at 200 characters and control or invisible characters become spaces.

In the desktop app you can rename a session by clicking its title, or ask Claude to rename another Code tab session.

Start with claude -n <name> (--name), run /rename <name> during the session (with no argument it generates a name from the conversation), or highlight a session in the /resume picker and press Ctrl+R. A SessionStart or UserPromptSubmit hook can return hookSpecificOutput.sessionTitle, and the Agent SDK has renameSession() / rename_session().

Names are capped at 200 characters and control or invisible characters become spaces.

In the desktop app you can rename a session by clicking its title, or ask Claude to rename another Code tab session.

Start with claude -n <name> (--name), run /rename <name> during the session (with no argument it generates a name from the conversation), or highlight a session in the /resume picker and press Ctrl+R. A SessionStart or UserPromptSubmit hook can return hookSpecificOutput.sessionTitle, and the Agent SDK has renameSession() / rename_session().

Names are capped at 200 characters and control or invisible characters become spaces.

In the desktop app you can rename a session by clicking its title, or ask Claude to rename another Code tab session.

Find or resume by name

Yes. claude --resume <name> or /resume <name> resumes an exact match directly, across the repository and its worktrees; an ambiguous name opens the picker pre-filtered from the shell, or an error from /resume. Generated titles work the same way, and claude -p --resume <name> accepts them too.

The default display name (for example my-app-3f) is not a resume handle.

Yes. claude --resume <name> or /resume <name> resumes an exact match directly, across the repository and its worktrees; an ambiguous name opens the picker pre-filtered from the shell, or an error from /resume. Generated titles work the same way, and claude -p --resume <name> accepts them too.

The default display name (for example my-app-3f) is not a resume handle.

Yes. claude --resume <name> or /resume <name> resumes an exact match directly, across the repository and its worktrees; an ambiguous name opens the picker pre-filtered from the shell, or an error from /resume. Generated titles work the same way, and claude -p --resume <name> accepts them too.

The default display name (for example my-app-3f) is not a resume handle.

Yes. claude --resume <name> or /resume <name> resumes an exact match directly, across the repository and its worktrees; an ambiguous name opens the picker pre-filtered from the shell, or an error from /resume. Generated titles work the same way, and claude -p --resume <name> accepts them too.

The default display name (for example my-app-3f) is not a resume handle.

Where the name is kept

Names are written into the session's transcript at ~/.claude/projects/<project>/<session-id>.jsonl: a name you set as a custom-title entry (the latest one wins) and a generated title as an ai-title entry. Names survive resume and compaction, and /clear carries a name you set into the new session but drops a generated title.

A /branch copy gets the name you pass, or one taken from the conversation's first prompt.

/export writes the conversation as plain text; it is not a resumable session.

Names are written into the session's transcript at ~/.claude/projects/<project>/<session-id>.jsonl: a name you set as a custom-title entry (the latest one wins) and a generated title as an ai-title entry. Names survive resume and compaction, and /clear carries a name you set into the new session but drops a generated title.

A /branch copy gets the name you pass, or one taken from the conversation's first prompt.

/export writes the conversation as plain text; it is not a resumable session.

Names are written into the session's transcript at ~/.claude/projects/<project>/<session-id>.jsonl: a name you set as a custom-title entry (the latest one wins) and a generated title as an ai-title entry. Names survive resume and compaction, and /clear carries a name you set into the new session but drops a generated title.

A /branch copy gets the name you pass, or one taken from the conversation's first prompt.

/export writes the conversation as plain text; it is not a resumable session.

Names are written into the session's transcript at ~/.claude/projects/<project>/<session-id>.jsonl: a name you set as a custom-title entry (the latest one wins) and a generated title as an ai-title entry. Names survive resume and compaction, and /clear carries a name you set into the new session but drops a generated title.

A /branch copy gets the name you pass, or one taken from the conversation's first prompt.

/export writes the conversation as plain text; it is not a resumable session.

Commands

From your shell

Commands you run in a terminal or script, outside a session.

TaskClaude Codechecked at 2.1.296
Use
Rename

claude -n <name>

also claude --name <name>

Name the session at startup, as shown in the prompt box, /resume picker and terminal title.

1 note

Resume later with claude --resume <name>.

Inside a session

Slash commands you type into an open session.

TaskClaude Codechecked at 2.1.296
Use
Rename

/rename [name]

Rename the current session, or generate a name when none is given.

1 note

Names are capped at 200 characters.

Notes and sources

Claude Code current, 9 sources
Automatic names, 4
Rename a session, 4
Find or resume by name, 1
Where the name is kept, 3
Claude Code sdk-0.3.312-title-control, 8 sources
Automatic names, 3
Rename a session, 4
Find or resume by name, 1
Where the name is kept, 3
Claude Code claude-agent-acp-0.99.1, 9 sources
Automatic names, 4
Rename a session, 4
Find or resume by name, 1
Where the name is kept, 3
Claude Code direct-print-2.1.314, 6 sources
Automatic names, 1
Rename a session, 4
Find or resume by name, 1
Where the name is kept, 3