Skip to content

[Bug]: Settling a thread kills active exec and foreground Bash terminals #37094

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

On Linux, start a Bash terminal in a thread, then run either:

exec node -e 'console.log("READY");process.stdin.resume()'

or:

bash -c 'printf "READY\n"; read -r value'

Wait for READY, then settle the thread. Reopen its terminal.

The deterministic backend reproduction uses a real NodePtyAdapter, isolated Bash HOME, semantic output gates, and public TerminalManager.closeOnSettle. It exercises the default ps inspector and a native-shaped live process table. This report does not claim an end-to-end UI/orchestrator reproduction.

Expected behavior

Settlement closes idle shells while preserving the running command and its terminal PID.

Actual behavior

Settlement misclassifies both commands as idle and closes their terminals. Reopening allocates a new PID and the interactive work is lost. The root replaced by exec has no children; the foreground Bash child blocked in builtin read has the shell's name and no children, so it is mistaken for an async prompt helper.

Impact

Major degradation or frequent failure

Version or commit

pingdotgg/main @ ab45ce7

Environment

Linux, Bash, native node-pty. Provider independent. Other platforms and population incidence unmeasured.

Logs or stack traces

The supplied real-PTY manager repro fails the PID-preservation assertions for exec root and foreground Bash builtin on the commit above. Ordinary foreground/background commands and async prompt-helper controls pass. This finding came from the Terminal Improvement Bug Hunt (GPT 6.1 Sol), independently confirmed on fresh main by separate Claude Opus 5.5 verifiers for each form.

Workaround

Avoid settling threads containing interactive terminal work.

Activity

  1. added
    vouch:trusted
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions