Unclear Whether other background-session commands, such as attach and stop, also accept names now is not clear.
What
A background session is a Claude Code session that keeps running without a terminal window attached. claude attach reconnects you to one, and claude logs shows its output. Both used to need the session's id. They now accept <id|name>:
claude attach <id|name>: the help text adds that part of the session name works too.claude logs <id|name>: finds a session by its name or part of it. If several sessions match, it lists them, including the text of finished sessions. Before, it only matched the start of an id.- Both share the same lookup, whose help text says: "Part of the session name works in place of the id. Put a name with spaces in quotes."
Why
You can reach a background session by the name you gave it instead of looking up its id. If a name has spaces, put it in quotes. If a partial name matches more than one session, claude logs shows the matches so you can pick.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
`claude attach` and `claude logs` can take part of a session's name in place of the ID, as in `claude logs "auth refactor"`. Passing a name requires Claude Code v2.1.290 or later.agent-view see the edit
* Fixed `claude logs`, `stop`, `kill`, `rm` and `claude daemon status`, `stop`, `uninstall` sometimes signing you out when your login had expired or was about tochangelog see the edit
Whether other background-session commands, such as attach and stop, also accept names now is not clear.
Anthropic's documentation has since written up claude logs, on Claude Code changelog.