Skip to content

TTY size is not propagated to kit agent.run sessions under sbx run (initial size and resize events) #220

@phawrylak

Description

@phawrylak

Custom agent kit (kind: agent) with agent.run: [sh, /path/launch.sh], image FROM docker/sandbox-templates:claude-code-docker. Under sbx run the runtime swaps the image CMD for an idle keeper (PID 1 = tini -- sh -c '…; sleep infinity & wait') and injects the agent.run command as a separate session. That session's PTY is created at 80x24 and never receives the client terminal's size - initially or on window resize - so TUI agents render in an 80x24 box.

Works correctly: (a) the stock flow where the agent is the image CMD (tini -- claude) - the main console PTY is sized at attach; (b) every sbx exec -it session (ExecResize).

Repro: kit with agent.run: [sh, -c, 'stty size; sleep 60'] → sbx run prints 24 80 regardless of the real window, and resizing changes nothing; the same command via sbx exec -it prints the real size and tracks resizes.

Expected: agent.run sessions get the same initial sizing + resize forwarding as exec sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions