Skip to content

[FEATURE]: Allow interactive terminal input for commands requiring user input (sudo, passwords, others) #8097

Closed as not planned

Description

@kaizen403

Feature hasn't been suggested before.

  • 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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 13, 2026
  2. github-actions commented on Jan 13, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. kaizen403 commented on Jan 13, 2026

    @kaizen403
    Author

    I'd be interested in working on this myself if it gets approved. Happy to discuss implementation approaches. @thdxr

  4. hir0xygen commented on Jan 13, 2026

    @hir0xygen

    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.

  5. kaizen403 commented on Jan 13, 2026

    @kaizen403
    Author

    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.

  6. kaizen403 commented on Jan 27, 2026

    @kaizen403
    Author

    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.

  7. hir0xygen commented on Jan 27, 2026

    @hir0xygen

    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.

  8. kaizen403 commented on Jan 27, 2026

    @kaizen403
    Author

    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?

  9. marlonmarcello commented on Feb 24, 2026

    @marlonmarcello

    @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

  10. hwang63130 commented on Mar 11, 2026

    @hwang63130

    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.

  11. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on May 3, 2026
  12. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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