Skip to content
BENIBIX Learn

claude attach Command

Also known as claude attach, Attach to a background session

It opens a job that runs in the background, here.

Think of it like

It is like you go back to a room where your friend is still at work.

Example

Jack started a bug fix in the background an hour ago. He runs claude attach with its ID, reads what Claude did, answers a question, then detaches.

Why it matters

You can check in on long work from any terminal, without stopping it.

Definition

claude attach opens a background session in the terminal you are in, by its ID or its name. You pick up the chat where it is, and can read and type as normal. To leave it running and go back, press the left arrow on an empty prompt or run /exit. The session keeps working after you detach.

Example code

bash
claude attach 7c5dcf5d
Open this background session here.
attach opens one of these jobs here.

Common mistake

Closing the terminal to leave and fearing the work is lost. The session keeps running. Only stopping it ends the work.

Key takeaways

  1. 1
    By ID or name. Part of a name works.
  2. 2
    Pick up the chat. Read and type.
  3. 3
    Detach. It keeps going.

Learn it properly