Skip to content

fix: Silent thread death hides PTY/stdin reader crashes #7

@martymcenroe

Description

@martymcenroe

Problem

_reader_pty() and _reader_stdin() threads silently swallow exceptions and break. If the PTY reader dies, all output is lost. If the stdin reader dies, keyboard stops working. No log entry, no error message, nothing.

except Exception as e:
    break  # Thread just exits silently

Impact

User thinks Claude is frozen when it's actually unleashed that's dead.

Recommendation

  • Log exceptions to the session log before breaking
  • Set a visible flag / status indicator
  • Consider restarting the reader thread on transient errors
  • At minimum, write to stderr so the user knows something died

Source

Identified in deep audit of unleashed codebase (2026-02-12).

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