Skip to content

isolate-env drops terminal-identity vars (TERM_PROGRAM, GHOSTTY_*), breaking TUI capability detection #167

Description

@schickling-assistant

What do you want to change?

Add terminal-identity markers to ISOLATED_ENV_ALLOWLIST (src/server.ts:128): TERM_PROGRAM, TERM_PROGRAM_VERSION, GHOSTTY_RESOURCES_DIR — optionally KITTY_WINDOW_ID, ITERM_SESSION_ID, WEZTERM_PANE, TMUX.

Why?

--isolate-env drops these, so TUIs spawned through isolated sessions can't detect terminal capabilities. Concrete case: pi/omp's OSC 8 hyperlink detection keys on TERM_PROGRAM/GHOSTTY_*; without them it falls back to plain-text links (unclickable labels, wrapped URLs truncate on click). These vars are identity markers, not secrets — no leak surface.

Verified with the locked pty 0.12.0 binary: identical spawn with vs without --isolate-env flips hyperlink capability OFF → ON; simulating the patched allowlist on a captured daemon env does the same.

Limitation: this only helps when the daemon itself was started from a real terminal. Headless daemons (e.g. the dev3 systemd relay) have no genuine TERM_PROGRAM to pass through — fixing that class needs client-env forwarding in the relay spawn protocol, which is a larger change.

(Filed with AI assistance, reviewed by me.)

Posted on behalf of @schickling
field value
agent_identity unknown
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.3
agent_runtime OMP 18.0.3
tooling_profile dotfiles@02c722e

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