agent_autoname — Claude Code subagent: what it does and install
The agent_autoname Claude Code subagent renames an agent session using its conversation. It runs only after an explicit Auto Rename request.
MIT ★ 395 updated 2026-11-16
.claude/agents/agent_autoname.mdWhat agent_autoname does
The subagent asks the model for a short session title based on the conversation, then replaces the current title. That includes titles written by hand. The terminal tab title stays unchanged.
Each rename needs the user's confirmation on their phone. A declined or unanswered confirmation triggers no model call. The subagent needs the exact machine and full session ID from agents_list; a session ID prefix will not do. It must not rename Persona conversations, including the main chat, or an agent the user did not ask to rename.
What it helps with
- replace an agent session title with one based on its conversation
- rename a session that already has a hand-written title
- avoid a model call when confirmation is declined
Example prompts for the agent
- Rename this agent session with Auto Rename.
- Give this session a short title from its conversation using Auto Rename.
How to install agent_autoname
Manually: put the files in place
.claude/agents/agent_autoname.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/agent_autoname.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/agent_autoname.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about agent_autoname
How do I install agent_autoname in Claude Code?
Add the subagent file at .claude/agents/agent_autoname.md.
What does agent_autoname do?
It asks the model to create a short title from the session conversation and replaces the existing title. It leaves the terminal tab title as it is.
What does agent_autoname need to work?
The user must explicitly request the rename and confirm it on their phone. The subagent also needs the exact machine and full session ID from agents_list; it does not handle Persona conversations, including the main chat.
Source text
agent_autoname.md · MIT
Rename one coding agent's session with the model when the user explicitly asks for Auto Rename. This replaces the current title, including a hand-written one, with a short title generated from its conversation; it does not change the terminal tab's title. The user must confirm this write on the phone every time; a declined or unanswered confirmation does nothing and makes no model call. The background automatic-naming switch and its once-only/placeholder restrictions do not block this explicit request. Do not use it on Persona conversations (including the main chat), on an agent the user has not asked to rename, or with a session-id prefix. Use the exact machine and session_id from agents_list. On success the JSON answer has title, title_source: auto and changed; on refusal it has the stable code and retryable fields. The HTTP endpoint used by client menus is separate and does not depend on this tool.
```json
{
"type": "object",
"additionalProperties": false,
"required": ["machine", "session_id"],
"properties": {
"machine": {
"type": "string",
"description": "the machine's exact id or name, as agents_list shows it"
},
"session_id": {
"type": "string",
"description": "the agent's exact full session id, never a prefix"
}
}
}
```
© nwverse · MIT · nwverse/persona