Skip to content

RESIZE before ATTACH acquires geometry authority without a screen baseline #153

Description

@schickling-assistant

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions