···7373 }
7474 // All other input is silently ignored (read-only)
7575 });
7676+ stdin.resume();
7677 }
7778 });
7879···215216 socket.write(encodeData(Buffer.from(forward).toString()));
216217 }
217218 });
219219+220220+ // Explicitly resume stdin. We cannot rely on the auto-resume from
221221+ // .on("data") because Node.js skips it when _readableState.flowing
222222+ // is exactly `false` (as opposed to the initial `null`). This state
223223+ // can be left behind by readline (restart prompt) or other code that
224224+ // previously consumed stdin.
225225+ stdin.resume();
218226219227 // Handle terminal resize
220228 if (stdout instanceof tty.WriteStream) {
+2-2
tests/screenshot.test.ts
···2020// All tests run in a tmp directory to avoid polluting the project
2121const testCwd = fs.mkdtempSync(path.join(os.tmpdir(), "pty-ss-"));
2222afterAll(() => {
2323- fs.rmSync(testCwd, { recursive: true, force: true });
2323+ fs.rmSync(testCwd, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
2424});
25252626// ─── Types ───
···291291 }
292292 sessionNames = [];
293293 for (const dir of tmpDirs) {
294294- fs.rmSync(dir, { recursive: true, force: true });
294294+ fs.rmSync(dir, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });
295295 }
296296 tmpDirs = [];
297297});