Skip to content

aca sandbox shell: copy/paste broken in all terminals (Windows Terminal, iTerm2, GNOME Terminal) #1742

@paulyuk

Description

@paulyuk

Summary

After aca sandbox shell --id <id> opens an interactive PTY into a sandbox, copy/paste does not work in any terminal emulator I've tried — Windows Terminal, PowerShell host, iTerm2, GNOME Terminal. Right-click paste / Ctrl+Shift+V / Cmd+V / middle-click paste all either drop characters, paste nothing, or paste a literal bracketed-paste escape sequence into the prompt instead of the clipboard content.

This blocks a lot of useful shell scenarios where typing the input is too tedious — pasting in a multi-line script, a long token, a URL, a config snippet, etc. Workarounds (aca sandbox fs write, here-docs) exist but the in-shell experience is what people reach for first and it's currently unusable for anything longer than a short command.

Repro

  1. aca sandboxgroup create --name repro --location westus2 --set-config
  2. ID=$(aca sandbox create --disk ubuntu -o json | jq -r .id)
  3. aca sandbox shell --id $ID
  4. From the host terminal, copy any multi-line text (e.g. a 3-line bash function).
  5. Paste with the terminal's normal paste shortcut.

Expected: the text appears at the sandbox shell prompt the same way it would in ssh user@host or docker exec -it ... bash.

Actual: depending on the terminal, one of:

  • nothing pastes
  • only the first line pastes, rest is dropped
  • a literal ^[[200~ ... ^[[201~ bracketed-paste sequence appears as text
  • characters are interleaved/corrupted

Environment

  • aca --version: current GA (1.0.x)
  • Host terminals tested: Windows Terminal (PowerShell), iTerm2 on macOS, GNOME Terminal on Linux
  • Sandbox disk: ubuntu (also reproduced on dotnet-10 and python-3.13)

Suspected cause

The PTY layer between the local terminal and the sandbox shell likely isn't:

  • propagating bracketed-paste mode (\e[?2004h / \e[?2004l) end-to-end, and/or
  • forwarding the host terminal's window-size / termios mode, and/or
  • reading stdin in a mode that batches input correctly when the OS delivers a paste as one large chunk.

For comparison, ssh and docker exec -it both work in all three terminals against the same hosts.

Impact

High for interactive shell users. Multi-line paste is table stakes for any exec -it / shell workflow. The workaround (aca sandbox fs write --path /tmp/x --file ./local; aca sandbox exec -c 'bash /tmp/x') is fine for scripted use but is two extra commands for what should be one Ctrl+V.

Asks

  1. Confirm scope — does the team see this on their side?
  2. If repro, fix in the next CLI patch release. This is a blocker for the aca sandbox shell cue in the agent skill.

Happy to test a pre-release build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: triage 🔍Pending a first pass to read, tag, and assign

    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