Skip to content

[Feature] Feature request: PTY health monitoring in Resource Manager #9840

Open

Description

@orca-discord-issues

Dave Fano Dave Fano via Discord

Orca can create many remote pseudo-terminals across SSH hosts. When stale shells or old relays retain them, macOS can exhaust its PTY pool and new terminals fail with an opaque posix_spawnp failed error.

Could Resource Manager show PTY health per host?

System PTY capacity and remaining headroom
Active process-backed PTYs
PTYs owned by the current Orca relay
Warning and critical states before exhaustion
Visible versus detached sessions
PTYs held by obsolete relay versions
Safe cleanup for idle shells and empty legacy relays

Instead of a mysterious spawn failure, Orca could report:

Wheeljack has 11 of 511 PTY slots remaining; 20 are owned by Orca.

This is especially valuable for multi-host/code-server setups with many long-running SSH terminals.

Activity

  1. orca-discord-issues commented on Jul 22, 2026

    @orca-discord-issues
    Author

    Dave Fano Dave Fano via Discord

    PTY health monitoring in Resource Manager

  2. orca-discord-issues commented on Jul 24, 2026

    @orca-discord-issues
    Author

    Jinjing Jinjing via Discord

    Good idea 👀 . Will see if anyone from the community wants to take it

  3. added
    good first issue
    help wanted
    on Jul 24, 2026
  4. orca-discord-issues commented on Jul 24, 2026

    @orca-discord-issues
    Author

    Dave Fano Dave Fano via Discord

    I can take a swing at it 😄

  5. orca-discord-issues commented on Jul 24, 2026

    @orca-discord-issues
    Author

    Jinjing Jinjing via Discord

    🙏

  6. orca-discord-issues commented on Jul 25, 2026

    @orca-discord-issues
    Author

    FireSly FireSly via Discord

    I actually wanted to see this in the cli for the Serves so agents could manage resources while they run autonomously.

  7. dcieslak19973 commented on Jul 25, 2026

    @dcieslak19973
    Contributor

    Related work worth building on: #9820 (fix for #9819) is already extending the relay's pty.listProcesses with paneKey and ageMs — the ownership/age inventory this view needs; building against that avoids reinventing half the data layer.

    The cleanup side of this picture: #9819/#9820 (reap orphaned relay PTYs on reconnect) and #10562 (kill sessions when a worktree is deleted outside Orca — one of the main ways stale shells accumulate; traced a live case where externally-deleted worktrees left bash → claude trees holding PTYs indefinitely under a --grace-time 0 relay, invisible to the UI because the worktree record was gone).

    +1 to FireSly's CLI angle — orca worktree ps / orca terminal list already exist; exposing capacity/ownership/detached-state there would let agents self-manage PTY budget on serve hosts autonomously.

  8. LesleyMurfin commented on Jul 25, 2026

    @LesleyMurfin
    Contributor

    Splitting the CLI work so it doesn’t block the Resource Manager track here:

    Happy to take #10609 after #10608 lands.

  9. vikrantchavan9 commented on Nov 7, 2026

    @vikrantchavan9

    Is this still open for community contributions? I'd be happy to look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions