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
A fresh command socket can currently send RESIZE before ATTACH. That admits
it as a writable geometry participant and changes the shared grid even though
the socket has not requested a screen baseline.
What
Require a complete writable ATTACH before accepting RESIZE.
Add a causal protocol regression that preserves pre-ATTACHDATA and STATUS while proving the command socket cannot affect geometry or attached
client counts.
Specify command, readonly, and writable-attached capabilities consistently in
the VRS documents.
Rationale
The fix reuses attachSeq > 0, which is already the server's predicate for
stats, geometry negotiation, and geometry broadcasts. It preserves intentional
command input without introducing a new protocol frame or broad role-state
refactor.
I reviewed exact draft head 9e1eafc. I like this direction. The implementation is narrow: a fresh command socket can still send input and request status, but RESIZE is ignored until a complete ATTACH has established geometry membership. The regression also proves that the ignored resize does not change terminal geometry, emit GEOMETRY, start a screen baseline, or add the command socket to public attached-client stats. Hosted build and Vitest checks are green.
One non-blocking design note: !client.readonly && client.attachSeq > 0 represents the role through two existing fields. That is correct for the current three roles. If the protocol adds another role later, an explicit role value could make the state machine easier to audit. I do not see that as a reason to expand this draft now.
Thank you, Nathan, for the careful push to clarify the actual client contract before changing resize behavior. The resulting boundary is much simpler: command sockets keep DATA and STATUS, while geometry authority begins only after writable ATTACH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A fresh command socket can currently send
RESIZEbeforeATTACH. That admitsit as a writable geometry participant and changes the shared grid even though
the socket has not requested a screen baseline.
What
ATTACHbefore acceptingRESIZE.ATTACHDATAandSTATUSwhile proving the command socket cannot affect geometry or attachedclient counts.
the VRS documents.
Rationale
The fix reuses
attachSeq > 0, which is already the server's predicate forstats, geometry negotiation, and geometry broadcasts. It preserves intentional
command input without introducing a new protocol frame or broad role-state
refactor.
Verification
Reproduction:
https://github.com/schickling-repros/2026-08-pty-resize-before-attach/tree/cef285ea85de3b750aa6dc341a560a58f77b07fd
Closes #153
Posted on behalf of @schickling
agent_nameagent_toolagent_tool_versionagent_runtimeagent_session_lookuptooling_profile