···4455### Interactive TUI
66- Add `--preselect-new` flag: `pty --preselect-new` opens the interactive TUI with "Create new session..." pre-selected (useful for pty-layout panes that should land on the create prompt)
77-- Add `--filter-tag key=value` flag (repeatable): filters the TUI to sessions matching all given tags AND auto-applies those tags to any session created from this TUI instance — so new sessions stay in the filtered view (e.g., pty-layout layouts)
88-- Tag filter is shown in the Filter line; remote groups are hidden when a tag filter is active (remote session tags aren't surfaced by pty-relay)
77+- Add `--filter-tag key=value` flag (repeatable): filters the TUI to sessions matching all given tags AND auto-applies those tags to any session created from this TUI instance — so new sessions (local and remote) stay in the filtered view (e.g., pty-layout layouts)
88+- Remote session spawns forward filter tags to pty-relay as `--tag key=value` so remote sessions created from a filtered TUI are tagged on the remote side and stay in the filtered view
99+- Tag filter is shown in the Filter line; remote groups are filtered by their `tags` field when a tag filter is active
9101011### Listing
1112- `pty list` now shows tags by default (hashtag format, e.g., `#role=web`) — internal bookkeeping keys (`ptyfile*`, `strategy`, `supervisor.status`) are hidden
+9-1
src/tui/interactive.ts
···759759 if (!relayBin) return;
760760 myApp?.pause();
761761762762- const result = spawnSync(relayBin, ["connect", host.url, "--spawn", name], {
762762+ // Forward --filter-tag tags to the relay so the newly-spawned remote
763763+ // session is tagged and stays within the filtered view.
764764+ const tags = filterTags.peek();
765765+ const tagArgs: string[] = [];
766766+ for (const [k, v] of Object.entries(tags)) {
767767+ tagArgs.push("--tag", `${k}=${v}`);
768768+ }
769769+770770+ const result = spawnSync(relayBin, ["connect", host.url, "--spawn", name, ...tagArgs], {
763771 stdio: "inherit",
764772 });
765773