You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Switching threads while a project action opens changes its command target #36713
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
Add a project action such as touch action-ran and create two threads, A and B.
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.
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.
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