Repository navigation
desk: bring agent desks back after a reboot - #35
Merged
Merged
Conversation
Record each desk's agent session per Herdr terminal (opencode plugin, Claude hook) under ~/.local/state/bercail/desk-sessions/. On boot, restore only desks whose session was written in the 10 minutes before shutdown, whose pane is a bare shell, and whose session isn't already open, resuming with opencode --session and no prompt. Runs once per boot from Omarchy's post-boot hook or a systemd user unit, plus bercail desk restore [--dry-run] and a desk-restore fallback skill. Based on https://jankeesvw.com/blog/2026/getting-my-agents-back-after-a-reboot/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of v0.11.0, stacked on #33. Based on Getting my agents back after a reboot.
What:
~/.local/state/bercail/desk-sessions/.opencode --sessionand doesn't resend the prompt.$XDG_RUNTIME_DIR) from Omarchy's post-boot hook, or from a systemd user unit, and sends a notification with the count.bercail desk restore [--dry-run]and adesk-restorefallback skill for panes that have no record.bercail install/updateset it up, and uninstall removes it. CI installs Node for the plugin tests.Proof: all 31
tests/*.shand ShellCheck pass. A real stop and start of a desk resumed it on the same opencode session without resending the prompt, and a second boot pass did nothing. No physical reboot was done yet.