Repository navigation
Replies: 1 comment
|
Adding a second use case for this, from the socket API side rather than the CLI. We drive herdr from a controller that starts coding-agent workers under a small supervisor process. Each worker gets its own workspace, and the supervisor has to be the pane's first process: it puts the worker in its own PID namespace, and it is the process we watch to know the worker is alive and when it exits. With
An argv form on the socket API — an optional Happy to answer questions about the use case. |
Uh oh!
There was an error while loading. Please reload this page.
Posting here rather than as an issue, since the issue template is for reproducible bugs.
What is missing
herdr pane splitopens a pane and starts a shell in it. There is no way to tell it what to run:--cwdand--envshape the process, but the process is always the shell. tmux hassplit-window [command]and zellij hasrun, so a tool that drives them can open a pane running exactly what it wants, in one call.Why the existing paths do not cover it
pane runtypes, it does not exec. It sends the command as input to the pane's shell, so it races the shell's startup: the line is lost if it arrives before the prompt. Waiting for the prompt first is what that costs. On a worktree withdirenvand a nix flake I measured up to ~60s before the shell was ready. Acceptable for starting a long-lived agent, not for a keypress that has to show something.The plugin API can run a command, but not on behalf of a caller.
herdr plugin pane open --entrypoint <id> --placement <overlay|split|tab|zoomed>is exactly the right shape, and it is why I am fairly sure the plumbing already exists. But the entrypoint is a fixed command declared inherdr-plugin.toml, andherdr plugin action invoke <ACTION_ID>takes no arguments, so a plugin cannot be handed a value at call time. "Open a pane showing this URL" has no expression.What I would like
A final-command form on
pane split, the same shape tmux and zellij have:Or, if the plugin path is the preferred one, letting
plugin action invokeforward arguments to the entrypoint would work just as well for my case.Where this comes from
I maintain gwm, a worktree manager whose TUI opens tools beside itself. Under tmux and zellij it opens a pane running the tool, with the direction and ratio coming from gwm's own config, so the behaviour is the same wherever you are. Under herdr it cannot, so herdr users get a different code path for the same keypress. In the case that prompted this, opening a browser, the workaround is to let the tool split for itself (
terminal-browser open --split right), which works but moves the geometry out of the user's gwm config and into the command string, where a missing flag silently takes over the pane gwm is drawing in.None of this is urgent, and the workaround is fine. Filing it because the plugin API showed the capability is already there, just not reachable from outside a plugin manifest.
Environment: herdr 0.8.2, stable channel, macOS 26.0.
All reactions