feat: spawn omp panes through herdr's agent API#22
Merged
Merged
Conversation
This was referenced Jul 19, 2026
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.
When running inside herdr, the three launch paths (Enter / m / u) now create a proper herdr agent pane via
agent.startover the mode-0600 JSON socket instead of exec-replacing the current pane — collapsing the herdr → code → omp chain into "popup picks, herdr places".Contract
HERDR_SOCKET_PATHpresent AND (HERDR_ENV=1|HERDR_ACTIVE_PANE_ID/HERDR_ACTIVE_WORKSPACE_ID(custom-popup context, which herdr v0.7.4 does not giveHERDR_ENV) |CODE_HERDR=1);CODE_HERDR=0force-disables. Non-herdr contexts keep today'ssyscall.Execunchanged.agent.startfailure prints and exits non-zero — no exec fallback, so a popup can never silently become the omp session.workspace_idfromHERDR_ACTIVE_WORKSPACE_ID→HERDR_WORKSPACE_ID(spawn lands where invoked);cwdalways sent (HERDR_ACTIVE_PANE_CWD→os.Getwd) because herdr defaults omitted cwd to the server's cwd.omp @<cwd-base>; onagent_name_takenretries(2)…(9)with a fresh connection per request (herdr's API socket serves one request per connection).OMP_AUTH_BROKER_*(including the bearer token value) travels only in the request'senvmap over the 0600 socket — never in any argv.Verification
go build ./...+go test ./...green (Go 1.22 via nix shell; repo has no devShell).CODE_OMPrun captured exact argv/cwd/broker-env delivery and pane placement/labeling; a real run then spawned a live omp pane (omp @dotfiles (2)— collision retry exercised live) that herdr's lifecycle integration detected (agent: omp,idle).Follow-up (separate PRs): dotfiles popup keybind (
[[keys.command]] type="popup" command="code"server-side withCODE_HERDR=1) after this tags a release and the pin bumps.