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]: Mobile launch commands can run before the measured terminal resize #36583
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
Launch a mobile terminal command while its cached attach dimensions differ from the measured grid. If the measured resize RPC is delayed, the initial command can reach the PTY first.
Deterministic session-level reproduction: in packages/client-runtime/src/state/terminal.test.ts, hold the resize command with a deferred promise, report a measured grid, emit the first running snapshot, and record the grid in the initial write command. Release resize and await the write receipt. The original bughunt test expects the measured width but observes the cached width on main. The companion fix carries the regression test and additional lifecycle cases.
Expected behavior
Launch input waits until the measured grid resize completes successfully. Ordinary typed input stays independent.
Actual behavior
The session sends resize and initial input independently. Concurrent RPC execution can let a one-shot width-sensitive command read stale dimensions. Responsive commands may subsequently correct on SIGWINCH.
Impact
Minor bug or occasional failure
Version or commit
Reproduced on pingdotgg/main a8e60d4. Independent Claude Opus 5.5 verifier confirmed on fe873f8.
Environment
Shared client-runtime terminal session used by the mobile route; deterministic Linux unit fixture at the RPC command boundary.
Logs or stack traces
The original fixture fails with expected [100], received [80].
Screenshots, recordings, or supporting files
Found in the maintainer bughunt and independently verified. No live PTY or device reproduction and no measured real-world incidence are claimed.
Workaround
Open the terminal and wait for it to fit before manually running a width-sensitive command.
Activity