A fresh protocol socket intentionally accepts DATA and STATUS before
ATTACH, which supports command-style clients. It also currently accepts
RESIZE: that increments the socket's attach sequence, admits it as a writable
geometry participant, changes the shared grid, and emits GEOMETRY without a
SCREEN baseline. A client can therefore acquire geometry authority before it
has requested reconstructable terminal state.
Reproduction
Exact reproduction commit:
https://github.com/schickling-repros/2026-08-pty-resize-before-attach/tree/cef285ea85de3b750aa6dc341a560a58f77b07fd
nix develop -c node repro.mjs
The script first proves that pre-ATTACH DATA reaches the session. It then
sends RESIZE(13, 37) followed by STATUS as a causal barrier.
Expected
- Pre-
ATTACH DATA and STATUS remain valid.
RESIZE has no effect until the same socket completes ATTACH.
- The socket is absent from attached-client counts and geometry negotiation,
and receives no resize GEOMETRY or SCREEN baseline.
Actual
- The command socket is reported as a writable attached client.
- The shared terminal changes from
24x80 to 13x37.
- The socket receives
GEOMETRY but no SCREEN baseline.
This can unexpectedly shrink the terminal for real attached clients while the
command socket cannot reconstruct the resulting grid.
Version
PTY 0.12.0 at 9eb958c5aae026d5c05690ab72b528662c55708d.
Posted on behalf of @schickling
| field |
value |
agent_name |
co1-sage |
agent_tool |
Codex CLI |
agent_tool_version |
0.145.0 |
agent_runtime |
Codex CLI 0.145.0 |
agent_session_lookup |
sha256:ad381a588faa911d70bf08ee2ae4305e96d980701e6405897e32fe38c3163d98 |
tooling_profile |
dotfiles@de765ec |
A fresh protocol socket intentionally accepts
DATAandSTATUSbeforeATTACH, which supports command-style clients. It also currently acceptsRESIZE: that increments the socket's attach sequence, admits it as a writablegeometry participant, changes the shared grid, and emits
GEOMETRYwithout aSCREENbaseline. A client can therefore acquire geometry authority before ithas requested reconstructable terminal state.
Reproduction
Exact reproduction commit:
https://github.com/schickling-repros/2026-08-pty-resize-before-attach/tree/cef285ea85de3b750aa6dc341a560a58f77b07fd
The script first proves that pre-
ATTACHDATAreaches the session. It thensends
RESIZE(13, 37)followed bySTATUSas a causal barrier.Expected
ATTACHDATAandSTATUSremain valid.RESIZEhas no effect until the same socket completesATTACH.and receives no resize
GEOMETRYorSCREENbaseline.Actual
24x80to13x37.GEOMETRYbut noSCREENbaseline.This can unexpectedly shrink the terminal for real attached clients while the
command socket cannot reconstruct the resulting grid.
Version
PTY
0.12.0at9eb958c5aae026d5c05690ab72b528662c55708d.Posted on behalf of @schickling
agent_nameagent_toolagent_tool_versionagent_runtimeagent_session_lookuptooling_profile