Skip to content

A plain member is launched with no placement record, so nothing can reach, repair or tear it down #1149

Description

@fujibee

Not a measured defect at filing time; updated on 2026-09-13 to what the tree does after #1163 landed, so the open question is stated against the current code rather than the original one.

What is true today

spawn writes no placement record for a plain member. The tmux and herdr branches of spawn.sh call _record_placement <terminal> <id> after launching; the plain branch launches the window, requires the driver to return -, and returns without recording anything. So run/spawn.<team>__<agent> does not exist for a plain member, and despawn --force, peek and poke — which all begin by reading that file — answer "no placement record" before any driver is asked.

The driver can now address a plain seat, when someone knows where it is. #1163 gave the plain driver emulator-qualified references, plain:iterm:/dev/ttysNNN and plain:terminal:/dev/ttysNNN, with a measured adapter per emulator and a runtime capability hook (terminal_capability) that can only narrow the static manifest: spawn is supported; peek and poke are supported once a reference parses and the adapter probe finds that tty in that emulator; despawn answers unsupported: plain window teardown needs an owner process witness. ITERM_SESSION_ID and TERM_SESSION_ID are deliberately not used, because live seats on distinct ttys were measured inheriting the same launcher value.

What no one knows at launch is the tty. terminal_spawn on plain opens the window through open -g -a …, a {cmd} template, or a Linux/Windows emulator, none of which return a handle; it prints - because that is all it has. terminal_detect prints - for the same reason. The seat itself is the first thing that can know its tty (its own controlling terminal), which is why the reference grammar exists without a producer for it in spawn.

Teardown is unchanged. terminal_despawn still prints ok and returns 0, and terminal_pane_state still returns 13 with "unknown", on the same reasoning as before: an OS window holds no pid the driver can kill, and a spurious error would be worse than "nothing to tear down". The capability hook's despawn → unsupported is the honest statement of the same fact one layer up.

The question, restated

The original question stands and is still unmeasured: after despawn on a plain member, is the window still on screen? If the boot command exits with the seat and the window closes itself, "ok, nothing to tear down" is exactly right. If the window survives, nothing can reach it afterwards — and after #1163 that is no longer because the driver cannot address a plain seat, but because no record names it: the address (plain:<emulator>:<tty>) is only known to the seat.

Where this connects

How to settle it

Unchanged: spawn a plain member, despawn it, look at the screen. It opens a real window on someone's desktop, so it is a thing to do with permission, not in passing. Until then this issue records two facts, not one: no record is written at launch, and the driver would now know what to do with one.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions