You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want two things from Herdr at the same time, and today the docs force me
to choose one or the other:
Pre-configured commands that should always run in a given tab every
time I open Herdr (e.g. a tab named port-fwd that always runs ./create_kubectl_port_fwd.sh against my dev cluster).
Session restore — when I reopen Herdr, my last workspaces, tabs,
panes, layout, and focus come back exactly where I left them.
Mode 1 is "config + automation". Mode 2 is "remember and reopen". I want
both, combined: tabs that I had open yesterday should be open today and
have their configured work already running.
The three realistic ways to open Herdr, and what should happen in each:
Cold start (first time, fresh machine): no session exists. The
pre-configured commands should create the workspace/tab/pane and run.
Reattach after prefix+q (live persistence): processes are still
alive. Pre-configured commands should be a no-op, the live processes
already cover them.
Cold restart (e.g. macOS reboot, herdr server killed and restarted):
the session shape is restored, but the running processes inside the
panes are gone. This is the gap. Today I have to manually re-run
the command in every such tab.
Official agents (Claude Code, Codex, Pi, etc.) are already covered for
mode 3 via resume_agents_on_restore = true and their integration
hooks. The missing piece is the same behavior for plain, non-agent
shell commands.
requested change
A small extension to the existing [[keys.command]] mechanism, or an
equivalent per-pane config, that marks a command as "auto-run on
snapshot restore". Sketch:
[[keys.command]]
key = "prefix+alt+k"type = "pane"command = "./create_kubectl_port_fwd.sh"description = "kubectl port forward"on_restore = true# new flag
Semantics the runtime would need to honor:
Cold start: same as today — first attach creates the structure
and the user sets up the tabs. The flag is only meaningful once the
shape exists.
Live persistence (re-attach): do not re-run. The live process
is already there.
Cold restart / snapshot restore: pane came back as a fresh shell
in the saved cwd. The runtime runs the command once, in that pane,
after the shape is restored.
A restore_command field on the tab or pane entity in the session
snapshot would be an equivalent shape. The exact name and location are
bikesheddable; the important contract is that the user opts in per
command/tab, it is never automatic by default, and the runtime knows
the difference between the three modes above so it does not double-run.
This is intentionally different from the closed #321 (Automatic agent
activation with new tab), which was scoped to official agents and tab
renaming. The use case here is the broader "tab always does X, and X
should still be running after a cold restart" — for any non-agent
shell command.
why you want this
My daily flow is: open the laptop, open Herdr, expect the things I had
running to be running. Today, after a OS reboot, I have to:
Open Herdr — the structure is there, but every non-agent pane is
just a shell.
Click into the port-fwd tab.
Manually cd ~/git/human_infra && ./create_kubectl_port_fwd.sh.
Repeat for any other tab that should have a specific process
running (local server, file watcher, etc.).
This is the kind of friction that erodes the value of session restore.
The official agents already do this transparently via
resume_agents_on_restore. I want the same for the bash scripts I keep
in the rest of my tabs.
A native solution is also safer than the shell wrapper I am currently
considering as a workaround. The runtime already knows the difference
between live persistence and snapshot restore, so it can avoid the
"command ran twice" failure mode that any external wrapper would have
to be careful about.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
I want two things from Herdr at the same time, and today the docs force me
to choose one or the other:
time I open Herdr (e.g. a tab named
port-fwdthat always runs./create_kubectl_port_fwd.shagainst my dev cluster).panes, layout, and focus come back exactly where I left them.
Mode 1 is "config + automation". Mode 2 is "remember and reopen". I want
both, combined: tabs that I had open yesterday should be open today and
have their configured work already running.
The three realistic ways to open Herdr, and what should happen in each:
pre-configured commands should create the workspace/tab/pane and run.
prefix+q(live persistence): processes are stillalive. Pre-configured commands should be a no-op, the live processes
already cover them.
herdr serverkilled and restarted):the session shape is restored, but the running processes inside the
panes are gone. This is the gap. Today I have to manually re-run
the command in every such tab.
Official agents (Claude Code, Codex, Pi, etc.) are already covered for
mode 3 via
resume_agents_on_restore = trueand their integrationhooks. The missing piece is the same behavior for plain, non-agent
shell commands.
requested change
A small extension to the existing
[[keys.command]]mechanism, or anequivalent per-pane config, that marks a command as "auto-run on
snapshot restore". Sketch:
Semantics the runtime would need to honor:
and the user sets up the tabs. The flag is only meaningful once the
shape exists.
is already there.
in the saved cwd. The runtime runs the command once, in that pane,
after the shape is restored.
A restore_command field on the tab or pane entity in the session
snapshot would be an equivalent shape. The exact name and location are
bikesheddable; the important contract is that the user opts in per
command/tab, it is never automatic by default, and the runtime knows
the difference between the three modes above so it does not double-run.
This is intentionally different from the closed #321 (Automatic agent
activation with new tab), which was scoped to official agents and tab
renaming. The use case here is the broader "tab always does X, and X
should still be running after a cold restart" — for any non-agent
shell command.
why you want this
My daily flow is: open the laptop, open Herdr, expect the things I had
running to be running. Today, after a OS reboot, I have to:
just a shell.
running (local server, file watcher, etc.).
This is the kind of friction that erodes the value of session restore.
The official agents already do this transparently via
resume_agents_on_restore. I want the same for the bash scripts I keep
in the rest of my tabs.
A native solution is also safer than the shell wrapper I am currently
considering as a workaround. The runtime already knows the difference
between live persistence and snapshot restore, so it can avoid the
"command ran twice" failure mode that any external wrapper would have
to be careful about.
All reactions