{"version":"2.1.290","anchor":"claude-attach-accepts-a-session-name","canonical_anchor":"claude-attach-accepts-a-session-name","heading":"claude attach and claude logs accept a session name","tier":"use","area":"Sessions","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.290\/e\/claude-attach-accepts-a-session-name","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.290","markdown":"### claude attach and claude logs accept a session name\n\n`claude attach` and `claude logs` now take a background session's name, or part of it, in place of its id\n\n**What**\n\nA 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>`:\n\n- `claude attach <id|name>`: the help text adds that part of the session name works too.\n\n- `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.\n\n- 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.\"\n\n**Why**\n\nYou 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.\n\n- Area: Sessions\n- Names: `claude attach`, `claude logs`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}