Skip to content

feat(berth): resume a seat after the herdr app's core restarts - #135

Merged
GraemeF merged 4 commits into
mainfrom
worktree-yard-psye
Nov 25, 2026
Merged

GraemeF merged 4 commits into
mainfrom
worktree-yard-psye

Conversation

@GraemeF

@GraemeF GraemeF commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

When herdr-core restarts, it brings each kept terminal back as a bare shell, so a seat's agent was lost. The herdr app adapter now keeps each berth's command in a file only its user can read. On the next berth call after a restart, it types that command back with --resume and the session id the plugin recorded, then starts sign-on to get the seat past its startup gate. A command whose shape the adapter does not know is left at its shell, and berth says why. A lock per yard keeps two calls from resuming the same seat.

herdr-core brings a kept terminal back as a bare shell and does not resume agents. The app adapter now keeps every berth, keeps its command where only its user can read it, and on the next call types the command back with --resume in place of the prompt, then has sign-on pass the startup gate.
Two berth calls at once could each type the resume line into the same restored shell, sending the second into the agent the first had started. The restore now holds a per-yard lock, sends nothing to a program that reports itself blocked, and names each kept command for its terminal's creation as well as its id.
# Conflicts:
#	bin/berth-herdr-app
#	docs/design.md
#	nix/berth/default.nix
@GraemeF
GraemeF merged commit 411c7d0 into main Nov 25, 2026
2 checks passed
@GraemeF
GraemeF deleted the worktree-yard-psye branch November 25, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant