Skip to content

Interactive password prompt broken when sudo-rs is invoked from non-standard PTY setups (e.g., kiro-cli) #1579

Description

@iiwaasnet

When sudo-rs is invoked from kiro-cli (an AI coding assistant that executes shell commands), the interactive password prompt hangs —keystrokes are not properly transferred and raw escape sequences appear instead of typed characters. Classic sudo works fine in the same environment.

Steps to reproduce:

  1. Run kiro-cli chat on Ubuntu 26.04
  2. Have it execute sudo -k && sudo whoami
  3. Password prompt hangs, input is garbled

Evidence:

  • sudo -k && sudo whoami → hangs, no usable password prompt (sudo-rs 0.2.13)
  • sudo.ws -k && sudo.ws whoami → works perfectly, password prompt appears and accepts input (classic sudo 1.9.17)
  • Tested in multiple terminal emulators (kitty, built-in terminal) — same behavior
  • On WSL2 with Ubuntu 25 (classic sudo), sudo works fine in the same tool

Expected behavior:

sudo-rs should handle the password prompt the same way classic sudo does, regardless of how the PTY is set up by the calling application.

Environment:

  • sudo-rs 0.2.13-0ubuntu1
  • Ubuntu 26.04 LTS
  • Classic sudo 1.9.17 (works correctly)
  • kiro-cli 2.2.0

Related:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions