# Attach to a named background session
claude agents --bg <session-name>
# Grant specific tools when launching an agent
claude agents --allow-tools Bash,Read,Write
Details
--bg moves a session to the background and detaches (conflicts with --print — the interactive session that claude agents attaches to is never started with --print)
--allow-tools grants specific tool permissions inline; denied tools are listed with an advisory to pass --allow-tools to grant them
The background session keeps running after detach; re-attach with claude agents from another terminal
Evidence
Error message (search for "--bg and --print conflict") and denied-tool notice (search for ": denied tools (pass --allow-tools to grant):")
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's release notes agreeAdded background agent notifications in claude agents — sessions that need input or finish now fire the Notification hook (agent_needs_input…