# Sessions that outlive the window

> Close devpit, reopen it, and what was running is still running.

Close devpit, reopen it, and what was running is still running. Every terminal is a tmux pane on devpit's own tmux server — psmux on Windows — so closing the window detaches the client. The session stays.

![A session's terminal opened over the orchestrator, with the agent at work in it.](/docs/images/01M3YX76TTFGJ8VQ27JSVMQHKT)

## What survives, and what does not

| What you do | What happens to the terminals |
|---|---|
| Close the window | They keep running. Reopening devpit attaches to them again. |
| Switch project | They keep running in the background, and the project picker says what is running where. |
| Update devpit | They keep running. tmux does not go down with the window. With the Windows installer they close: see [Windows](/docs/windows). |
| Close a terminal or a pane | What is inside it stops, which is why devpit asks first. |

Output is read without an attached client, so devpit knows what a terminal is doing even when it is not on screen. That is what lets a notification fire at all. See [Notifications](/docs/notifications).

## Finding a session again

- The sidebar's **Sessions** section lists the open project's terminals and chats, and reads "Nothing running." when there are none. **Earlier** lists the project's past conversations, and **Started in a terminal** the project's sessions begun in a terminal; opening one resumes it as a chat.
- A card's **Sessions** list shows everything tied to it, each with its state and, while it works, the step it is on — *Edit invoice.ts*: a **Terminal**, a **Run**, a **Background session** or a **Chat**. **Go to terminal**, **Open chat** and **Attach in terminal** take you back to one, **Stop** ends a run that is working, and **Open as chat** carries a session into a chat once it has stopped.
- The [island](/docs/island) shows every session in devpit's terminals and chats, from any project, above your other windows.
- An [orchestrator's](/docs/orchestrator-sessions) **Sessions** panel lists every session of its account, grouped by project.
- The project picker marks the projects with something still running in them.

## Sessions on a card

Every session devpit starts for a card — a lane's [session step](/docs/session-steps), or a card's work handed on by an [orchestrator](/docs/orchestrator-sessions) — opens in the card's terminal tab, with your profile's own command, where you can watch it and answer what it asks. A session that runs in the background, where nothing shows it, can be attached in a tab of its project with **Watch it in a terminal**, in an orchestrator's Sessions panel.

devpit does not keep a session's state: the agent CLI already answers whether a session is busy or idle, and a second copy in a database would drift from the first. devpit stores only the link — which card, which worktree.

## Transcripts

"Transcripts are always written: a session that a restart loses is a session that was never yours to come back to." The agent CLI writes the transcript and devpit writes down where it is. A chat can also copy its session id, so you can resume the conversation outside devpit.

If devpit closes while a chat turn is running, that turn says: "No answer was saved for this — the app closed while the turn was running."

## Cost

What a session you drove yourself cost is not read back onto the card. A card says what its [runs](/docs/runs) cost and is quiet about the rest. For totals by day, model and project, see [Usage and plan limits](/docs/usage).
