Herdr: persistent AI agent workspace setup for macOS — reboot-safe layout + Claude/OpenCode session resume A developer has documented a configuration for Herdr, a persistent AI agent workspace tool for macOS, that enables reboot-safe layout and session resume for Claude Code and OpenCode. The setup requires installing official agent integrations, which report session IDs to Herdr, and configuring the server to resume agent conversations on restore. The guide includes verification steps and config snippets, noting that integrations only tag sessions started after installation. A working configuration for Herdr https://herdr.dev that survives a reboot: shut the machine down, boot it back up, and every workspace, tab, pane and running AI agent conversation comes back where you left it. Verified end-to-end on macOS with Herdr 0.7.4, Claude Code, and OpenCode. Out of the box, Herdr persists your layout workspaces, tabs, panes, cwd, focus across a server restart. It does not automatically resume your agent conversations unless you install the agent integrations. Without them you reboot and get your panes back as empty shells, with every Claude/OpenCode session orphaned. The single highest-value step in this guide is step 1. Herdr resumes an agent only if it has a session ref for that pane. Session refs come from official integrations — hooks/plugins that the agent runs and that report its session ID back to Herdr over a socket. Screen detection alone is not enough: Herdr will show the agent in the sidebar but have no idea how to relaunch it. herdr integration install claude herdr integration install opencode herdr integration status Expected: claude: current v7 ~/.claude/hooks/herdr-agent-state.sh opencode: current v8 ~/.config/opencode/plugins/herdr-agent-state.js herdr integration list shows everything available: pi, codex, copilot, devin, droid, kimi, kilo, hermes, qodercli, cursor, mastracode, omp. Integrations only tag sessions started after install. Agents already running when you install get no ref and will not resume on the next restart. This costs you exactly one cycle. A ref appears after activity, not at launch. The OpenCode plugin reports on session events session.created , session.updated , tool calls . An agent sitting idle at its prompt may not have registered yet. Send one message, then check. Herdr won't install for an agent that isn't present. herdr integration install pi fails with pi extension directory not found if pi isn't installed. That's intentional — install the agent first, then the integration. Don't pre-create the directory; these integrations are versioned and a pre-staged file goes stale. python python3 -c " import json d=json.load open '$HOME/.config/herdr/session.json' for w in d 'workspaces' : for ti,t in enumerate w 'tabs' : for pid,p in t 'panes' .items : s=p.get 'agent session' tab=t.get 'custom name' or f'tab{ti+1}' print f\"{ w.get 'custom name' or ' unnamed ' :18} {tab:18} pane {pid} - \" + f\"{s 'agent' :9} {s 'value' :16 } src={s 'source' }\" if s else ' none ' " You want src=herdr:claude / src=herdr:opencode . That prefix means the integration reported it. A pane with no agent session comes back as a plain shell. onboarding = false ui agent panel sort = "spaces" session Resume claude/opencode panes into their native conversations after a restart. Requires the agent integrations herdr integration status . resume agents on restore = true keys Shut the whole server down cleanly before a reboot not just detach . keys.command key = "prefix+alt+q" type = "shell" command = "/Users/YOU/.local/bin/herdr server stop" ui.toast delivery = "terminal" theme name = "catppuccin" auto switch = false Substitute your own username in the command path — use an absolute path, since the command runs detached and may not inherit your interactive PATH. Apply without restarting: js herdr server reload-config = {"result":{"diagnostics": ,"status":"applied","type":"config reload"}} Non-empty diagnostics means a config error. See all available options with herdr --default-config . Defaults to true , but pin it explicitly so a future default change can't silently break your setup. Replays recent terminal output after a restart, so panes look like you left them rather than coming back blank. Leave it disabled unless you accept the tradeoff: it writes raw pane scrollback to ~/.config/herdr/session-history.json in plaintext , including anything that scrolled past prompts, command output, tokens or keys you echoed . To turn it on, add to config.toml : experimental pane history = true Then harden it, because a one-shot chmod 600 on the history file does not hold. Herdr rewrites the file as you work, and an atomic write temp file plus rename creates a new inode at the server's umask, silently restoring the world-readable 644 on the next save. Lock the directory instead, which Herdr never recreates: chmod 700 ~/.config/herdr denies other local users regardless of any file's own mode For the file to be owner-only from creation, also give the Herdr server a restrictive umask: add