Skip to content

Start the herdr server in its own session so remote attach does not prompt - #18351

Closed
AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:fix/issue-18301
Closed

AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:fix/issue-18301

Conversation

@AnPod

@AnPod AnPod commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #18301

Problem

Since #16572 the autostart starts the herdr server with uwsm-app -- herdr server. herdr's remote client prompts to restart the server whenever the server's detached_server_daemon flag is false, and that flag is only true when the server leads its own process session (getsid(0) == getpid(); herdr v0.9.1 src/platform/mod.rs:179). uwsm-app does not setsid, so every herdr --remote <host> attach against the autostarted server shows a destructive "restart the remote server now? [y/N]" prompt — and answering y kills every pane: shells, agents, dev servers, tests.

Fix

Start the server in its own session:

-  hl.exec_cmd(o.launch("herdr server"))
+  hl.exec_cmd(o.launch("setsid herdr server"))

The reporter verified this exact form through Hyprland: uwsm-app -- setsid herdr --session X server reports detached_server_daemon: true (no prompt on attach) while the server still inherits WAYLAND_DISPLAY / XDG_SESSION_TYPE — the property #16572 added the line for. The comment in autostart.lua now records why setsid is there.

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Starts herdr server through setsid while keeping the existing uwsm-app launch path.

  • Remote Herdr attaches without asking to restart the server.

Reviews (1) · Last reviewed commit: "Start the herdr server in its own sessio..." · Reviewed by Greptile

@dhh

dhh commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Thanks! Closing as a duplicate of #18302, which makes the same setsid herdr server change for #18301 and was opened first.

@dhh dhh closed this Nov 10, 2026
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.

herdr --remote asks to restart the autostarted herdr server on every attach (autostart lacks setsid)

2 participants