You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Allow interactive terminal input for commands requiring user input (sudo, passwords, others) #8097
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Description
When running commands that require user input (like sudo password prompts),
OpenCode should allow the user to temporarily take control of the terminal
to enter the input manually.
Use Case
Installing packages with yay/pacman that require sudo
Any command needing interactive password input
SSH connections that need passphrase entry
Current Behavior
Commands that need interactive input fail with:
"sudo: a terminal is required to read the password"
Expected Behavior
OpenCode pauses and hands terminal control to the user for input,
similar to how Claude Code handles this.
Reacted by cantalupo555, Jerome Berclaz, Marlon U. Marcello, Baolin Zhu, Gunnar Thielebein, Link, marceljaehn, ecchan, Michael DeRazon, Robin Lovelace and 5 more
Hey, this seems like you could solve it by writing some skills.
I had Opus write itself a skill so it uses pkexec instead of sudo whenever running a command as root is required. This means a graphical prompt asking for my password pops up on my screen, and no console text input is required.
Such a skill could be generalized to make the agent analyze whether something needs an interactive session, either before running a command or after realizing a command has failed because of it.
Thanks for the suggestion! A skill that swaps sudo for pkexec (or reruns in a PTY) is a solid workaround and I can add one to unblock interactive commands. However, the original request is for a first-class interactive TTY handoff so users can enter passwords/inputs consistently, even where pkexec/GUI prompts aren’t available. I’d like to keep this issue open to track a built-in solution (PTY attach + UI handoff), while I can also publish a skill in the meantime. If the maintainers prefer the skill-only path, I’m happy to document that instead.
hey @hir0xygen, quick request - would you mind deleting this issue? i opened it without realizing there was already discussion on this topic elsewhere. happy to contribute through proper channels going forward. thanks!.
I specifically want you to delete this rather than close it.
hey @hir0xygen, quick request - would you mind deleting this issue? i opened it without realizing there was already discussion on this topic elsewhere. happy to contribute through proper channels going forward. thanks!. I specifically want you to delete this rather than close it.
Hey, I'm not a maintainer, so I can't help with this, unfortunately.
hey @hir0xygen, quick request - would you mind deleting this issue? i opened it without realizing there was already discussion on this topic elsewhere. happy to contribute through proper channels going forward. thanks!. I specifically want you to delete this rather than close it.
Hey, I'm not a maintainer, so I can't help with this, unfortunately.
My bad. @thdxr can you help me with deleting this issue?
@kaizen403 can you point to where you found this being discussed please? I am having the same issue running over SSH and the skill suggestion doesn't help. I'd love to follow the thread about it.
It's a feature that Gemini CLI has and it'd be great if we had a native solution in opencode as well
I'm also having this issue when commit in git requires to type in gpg passcode. My current work around is to disable gpg signing when opencode is in charge of git commit, then re-enable gpg signing afterwards. This is annoying.
Activity
github-actions commentedon Jan 13, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
kaizen403 commentedon Jan 13, 2026
I'd be interested in working on this myself if it gets approved. Happy to discuss implementation approaches. @thdxr
hir0xygen commentedon Jan 13, 2026
Hey, this seems like you could solve it by writing some skills.
I had Opus write itself a skill so it uses pkexec instead of sudo whenever running a command as root is required. This means a graphical prompt asking for my password pops up on my screen, and no console text input is required.
Such a skill could be generalized to make the agent analyze whether something needs an interactive session, either before running a command or after realizing a command has failed because of it.
kaizen403 commentedon Jan 13, 2026
Thanks for the suggestion! A skill that swaps sudo for pkexec (or reruns in a PTY) is a solid workaround and I can add one to unblock interactive commands. However, the original request is for a first-class interactive TTY handoff so users can enter passwords/inputs consistently, even where pkexec/GUI prompts aren’t available. I’d like to keep this issue open to track a built-in solution (PTY attach + UI handoff), while I can also publish a skill in the meantime. If the maintainers prefer the skill-only path, I’m happy to document that instead.
kaizen403 commentedon Jan 27, 2026
hey @hir0xygen, quick request - would you mind deleting this issue? i opened it without realizing there was already discussion on this topic elsewhere. happy to contribute through proper channels going forward. thanks!.
I specifically want you to delete this rather than close it.
hir0xygen commentedon Jan 27, 2026
Hey, I'm not a maintainer, so I can't help with this, unfortunately.
kaizen403 commentedon Jan 27, 2026
My bad. @thdxr can you help me with deleting this issue?
marlonmarcello commentedon Feb 24, 2026
@kaizen403 can you point to where you found this being discussed please? I am having the same issue running over SSH and the skill suggestion doesn't help. I'd love to follow the thread about it.
It's a feature that Gemini CLI has and it'd be great if we had a native solution in opencode as well
hwang63130 commentedon Mar 11, 2026
I'm also having this issue when commit in git requires to type in gpg passcode. My current work around is to disable gpg signing when opencode is in charge of git commit, then re-enable gpg signing afterwards. This is annoying.
github-actions commentedon Jul 6, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.