It wasn’t random. It was the cost of forgetting that environment TTY is a silent gatekeeper in every session, shell, and process you run. Terminals are not just windows into a system. They negotiate environment variables, runtime state, and input/output expectations in ways that change the behavior of code. The environment talks. The TTY listens. And together, they decide what your program is allowed to be.
Every developer has faced a bug that exists only when run from a terminal. Or the one that disappears when sent to a background process. The difference? The process environment changes based on TTY context. Variables like TERM, COLUMNS, LINES, and interactive mode flags exist only when they know a terminal is on the other end. Without a TTY, stdin becomes disconnected. Signals behave differently. Output buffering changes. The program stops being interactive and starts being transactional.
Testing without mirroring a real environment TTY leads to hidden defects. Automations fail in CI because there is no pseudo-terminal to replicate local runs. Scripts that run fine in a shell stall inside pipeline jobs because prompts never appear, waiting forever for invisible input. They work on your machine because your TTY environment tells them how to behave. They fail elsewhere because that environment is gone.