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.
Expected Behavior
Running
sudocommands (likesudo 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
sudocommand 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
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
Reproduction
Attempt to run any
sudocommand (e.g.sudo ls /var/lib/bluetooth/) from within a Command Code session. The command will hang until timeout.