---
title: "How to exit, close, and detach from Herdr"
url: https://daily.dev/posts/how-to-exit-close-and-detach-from-herdr-tqrg8eac8
source_url: https://flaviocopes.com/exit-herdr
type: article
source: "Flavio Copes"
published: 2026-08-26T06:53:55.829Z
updated: 2026-08-26T06:54:18.764Z
tags: ["ai-agents", "cli"]
reading_time: 7
upvotes: 1
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to exit, close, and detach from Herdr

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 7 min read · 1 upvotes · 0 comments

## Summary

A reference guide explains the different ways to leave a Herdr session - detaching (ctrl+b then q) keeps the server and all running processes alive, while closing a pane, tab, or workspace ends the processes inside it, and stopping or deleting a session is more destructive. It covers reattaching, remote SSH workflows, direct terminal attach, and what survives a server restart versus what does not.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/exit-herdr>

## Questions this post answers

### How do I detach from a Herdr session without stopping the processes running inside it?

Press ctrl+b, release the keys, then press q. This closes the client connection but leaves the Herdr server, panes, coding agents, tests, and development servers running in the background. Reattach later by running herdr, which returns you to the exact live panes you left.

_Developers juggling long-running agent sessions can find workflow guides like this through daily.dev._

### What is the difference between stopping and deleting a named Herdr session?

Stopping a named session with herdr session stop NAME ends the live runtime and exits the pane processes, but keeps the saved session state so it can be reattached later with herdr session attach. Deleting it with herdr session delete NAME removes that saved state entirely from the session list, discarding it for good.

_daily.dev surfaces practical breakdowns like this for developers managing multiple terminal sessions._

### Does a running coding agent survive a Herdr server restart?

Screen history restores what was visible on screen, not the actual process that produced it, so a coding agent does not automatically survive a full server stop. Normal panes return as new shells after herdr restores the saved layout, but supported coding agents can only resume their own conversations if an official Herdr integration previously recorded their native session IDs.

_Anyone relying on coding agents in persistent sessions can track these nuances via daily.dev._

## Similar posts on daily.dev

- [Using Herdr from a phone](https://daily.dev/posts/using-herdr-from-a-phone-5uezrpfll) · Flavio Copes · 2 upvotes · 0 comments
- [A deep dive into Herdr](https://daily.dev/posts/a-deep-dive-into-herdr-jzkwg8r1e) · Flavio Copes · 5 upvotes · 1 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#cli](https://daily.dev/tags/cli)

[View this post on daily.dev](https://daily.dev/posts/how-to-exit-close-and-detach-from-herdr-tqrg8eac8)
