Skip to content

bt-sync tool: sudo commands hang in non-interactive mode #364

@8u9i

Description

@8u9i

Expected Behavior

Running sudo commands (like sudo ls /var/lib/bluetooth/) from within Command Code should prompt for the sudo password via TTY, or fail gracefully with instructions to run externally.

Actual Behavior

When Command Code runs a sudo command in a non-interactive shell, the process hangs indefinitely waiting for a password. The command eventually times out (30-60s) with no useful output, making it impossible to read privileged files or perform system-level operations.

Impact

  • Cannot read system files that require root access
  • No feedback about what went wrong — just a silent timeout
  • Breaks the agentic flow for system-level tasks

Suggested Improvement

Add a mechanism to request privilege escalation mid-session, or detect non-interactive TTY and fail gracefully with instructions on how to run the command externally.

Environment

  • Version: 0.26.2
  • OS: Linux (Ubuntu 24.04)
  • Terminal: kitty
  • Shell: bash

Reproduction

Attempt to run any sudo command (e.g. sudo ls /var/lib/bluetooth/) from within a Command Code session. The command will hang until timeout.

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