opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Commands that need sudo access break the UI and make the agent hang

Open arthur404dev opened this issue 1 year ago • 14 comments

Tool uses that need sudo access end up not receiving the input and break the UI / hang the process.

Image

arthur404dev avatar Aug 12 '25 06:08 arthur404dev

Same here

CodingPassionYT avatar Aug 12 '25 18:08 CodingPassionYT

Same here, Debian / Kitty

FringeDweller avatar Aug 13 '25 05:08 FringeDweller

https://github.com/sst/opencode/issues/2268#issue-3357256017

If git rebase -i is run by the agent, then the command is run interactively and halts the agent. How about we allow the user to focus into commands and interact with them? This way an interactive command can be intervened by the proompter.

Eventually, opencode could just give the agent tools to interact with CLI that was run, but for now this could be useful until that tool is ship to prod and we inch further to AGI and cool coconuts on the beach.

samholmes avatar Aug 26 '25 23:08 samholmes

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

rekram1-node avatar Dec 28 '25 01:12 rekram1-node

Tool uses that need sudo access end up not receiving the input and break the UI / hang the process. Image

easy fix, just tell the agent your sudo password in your prompt

ParticleRift avatar Jan 13 '26 04:01 ParticleRift

Tool uses that need sudo access end up not receiving the input and break the UI / hang the process.

easy fix, just tell the agent your sudo password in your prompt

i really hope this is sarcasm

kylegrieder avatar Mar 23 '26 01:03 kylegrieder

Why would it be? if you are using your main machine and don't want a company to have the password you can just change the password temporarily, other than that their is no reason not to

ParticleRift avatar Apr 11 '26 09:04 ParticleRift

Why would it be? if you are using your main machine and don't want a company to have the password you can just change the password temporarily, other than that their is no reason not to

Changing your password every single time sudo access is required, doesn't feel like good ux.

adikpb avatar Apr 11 '26 10:04 adikpb

Local models like gemma4 and qwen3.5 are good enouph nowadays they can handle stuff you need to keep private

ParticleRift avatar Apr 11 '26 11:04 ParticleRift

Local models like gemma4 and qwen3.5 are good enouph nowadays they can handle stuff you need to keep private

Opencode isn't just used for local models, the whole point of this tool is to use mostly any llm provider.

adikpb avatar Apr 11 '26 11:04 adikpb

Seriously, how hard is it to do the same thing that Gemini CLI has with pressing TAB for interacting with the shell command.

Acters avatar Apr 14 '26 07:04 Acters

issue fixed, at install you set your password and the agent will pipe the password to sudo commands without seeing it so you don't share sudo password to cloud models but still get to run sudo commands https://github.com/MegaDyneSystems/prism32

MegaDyneSystems avatar Jun 17 '26 18:06 MegaDyneSystems

Why was this issue closed?

tmzhuang avatar Nov 01 '26 19:11 tmzhuang

I have since moved to telling the agent to use pkexec. Having a fido2 key is nice here cause you can tap to auth instead of trying to type the password as fast as possible every single time authentication is needed and pkexec doesn't retain root privileges after the command is ran. Good for security while still being able to do root level work with an agent.

Acters avatar Nov 01 '26 22:11 Acters