Skip to content

A Windows bridge would leave the mirror for a pty attach it cannot start once herdr reports terminal attach #258

Closed

Description

@devswha

What happens

herdr's ping decides whether a pane is mirrored. terminalAttachSupported takes capabilities.direct_terminal_attach when herdr declares it, and assumes false on win32 only when herdr does not (server/herdr/client.ts:27-31). When attach is supported, spawnAttachment starts a PtySession (server/index.ts:476, server/index.ts:636-638), and that spawns node pty-host.mjs (server/pty/session.ts:28-31).

The win32-x64 bundle has neither Node nor the sidecar. It ships Bun only, deletes @lydell/node-pty ("the PTY sidecar is never spawned on Windows") and writes node: null into bundle.json (scripts/build-remote-bundle.ts:97-102). Reading the code, a bridge on this bundle would therefore leave the working mirror for an attach that fails to spawn on the day a Windows herdr reports direct_terminal_attach: true. This was not run.

The bridge also asks once and keeps the answer for the life of its process (server/index.ts:242-249). A herdr updated under a running bridge keeps the old answer until the bridge restarts.

The release notes promise the opposite: "the real terminal turns on by itself once herdr reports it" (CHANGELOG.md:77-78).

Upstream, herdrdev/herdr#4821 was closed as a duplicate of herdrdev/herdr#2726, which is closed too, so the risk is latent for now.

Expected

A bridge attaches only where its runtime can run the attach. Otherwise it keeps mirroring.

Ideas

  • Treat attach as unavailable when the runtime has no PTY sidecar (the Windows bundle), whatever herdr declares. Ship Node and node-pty in a Windows bundle once herdr's attach there is real and tested.
  • Correct the CHANGELOG wording, or say in docs/remote-pcs.md that the switch needs a new bundle.
  • Some comments still describe the Windows terminal lens as only a notice: src/App.tsx:93-95, shared/machines.ts:30-32, src/components/PaneTerminal.tsx:125. The UI itself already uses terminal_mirror (src/App.tsx:451).

Activity

  1. added a commit that references this issue on Oct 1, 2026
    44f5421
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions