Skip to content

[Bug]: Switching threads while a project action opens changes its command target #36713

Open

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/web

Steps to reproduce

  1. Add a project action such as touch action-ran and create two threads, A and B.
  2. Run the action on A and switch to B before A's terminal-open request completes. Holding that request in the browser makes the race deterministic.
  3. Let the request complete and return to A.

Expected behavior

The command runs in A's terminal, where the action started.

Actual behavior

The client sends the command to B using A's terminal id. With no matching terminal in B, the server rejects the write with Unknown terminal thread and A stays idle. Hook tests also reproduce the wrong environment after cross-environment navigation. Execution in another thread's live shell has not been observed.

Impact

Minor bug or occasional failure

Version or commit

pingdotgg/main @ 8cb551a

Environment

Linux, web client, real server and PTY; no provider-specific behavior required.

Logs or stack traces

Unknown terminal thread: <thread B>, terminal: term-1

Screenshots, recordings, or supporting files

Found by the bughunt and independently confirmed by Claude Opus 5.5. A paired real-app scenario reproduces the rejected write on base and verifies command execution on the fix. Hook tests cover target ownership across environments and permission loss.

Workaround

Stay on the initiating thread until its terminal opens and receives the command.

Activity

  1. added
    vouch:trusted
    on Nov 14, 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