Skip to content

PTY exhaustion from orphaned Terminal.app windows #25

@FrederikHandberg

Description

@FrederikHandberg

Summary

Mac Mini ran out of pseudo-terminal devices (511 max). All job execution blocked.

Root Cause

Terminal.app accumulated 618 orphaned windows from osascript do script calls (steer, SSH management). Each allocates a pty, never closes.

Impact

  • All Jensen jobs fail: tmux new-session returned non-zero exit status 1
  • OSError: out of pty devices
  • Health score: 30

Fix Applied

osascript -e 'tell application "Terminal" to close every window' -- freed 470+ ptys.

Prevention Needed

  1. env-hygiene.sh: count Terminal windows, close excess (max 5)
  2. steer: close Terminal windows after use
  3. Health monitoring: add who | wc -l -- alert if > 50
  4. Morning report: include Terminal window count

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