omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

opencode --auto doesn't seem to exist

Open phlawlessDevelopment opened this issue 3 months ago • 2 comments

System details

CPU: 12-core (2-mt/10-st) Intel Core Ultra 7 255U (-MST AMCP-) speed/min/max: 1400/400/5200:4200:2400 MHz Kernel: 7.1.9-arch1-2 x86_64 Up: 7m Mem: 3.73/15.01 GiB (24.8%) Storage: 953.87 GiB (36.4% used) Procs: 358 Shell: Bash inxi: 3.3.41 Omarchy 4.0.1-1

What's wrong?

I was getting a blank terminal window when trying to launch the "default agent" with opencode selected. (gh copilot worked fine) I narrowed it down to this part of "bin/omarchy-agent"

case "$agent" in opencode) command=(opencode --auto) [[ -n ${prompt:-} ]] && command+=(--prompt "$prompt") ;;

I ran opencode manually and --auto is not listed as a flag

removed the --auto from that line and it launched perfectly.

If this is affecting many users, I'd be happy to send a PR but i couldn't see anyone else complaining about it in issues so maybe it's something stupid that I'm doing.

Also from context is seems like that flag was for skipping all permission prompts, which i'm sure is the intended behaviou here, I had a quick look at the opencode docs, couldn't really see anything about that, removing the flag is probably not the right move unless there is a replacement.

Let me know what I can do to help :)

phlawlessDevelopment avatar Aug 25 '26 15:08 phlawlessDevelopment

https://opencode.ai/docs/permissions/#auto-mode

nightdevil00 avatar Aug 26 '26 07:08 nightdevil00

The flag is real, but only in newer opencode: --auto first appeared in opencode 1.17.12 (released 2026-06-30), and current quattro still launches opencode --auto from bin/omarchy-agent:58. I checked this on a worker built from the current Omarchy ISO. Its opencode (1.18.35) lists --auto and launches. With opencode 1.17.11 or older, opencode --auto prints the help text and exits with status 1, which matches the blank terminal you saw.

Omarchy installs opencode through mise, and the ~/.local/bin/opencode wrapper does not upgrade a version that is already installed. I installed 1.17.0, ran the wrapper, and it stayed on 1.17.0. Only omarchy update upgrades it, because that runs mise up. So your opencode was most likely older than 1.17.12. Running omarchy update (or mise up opencode) and then opencode --version should bring the flag back, and you can then put --auto back in the launcher. If opencode --version still reports something older afterwards, please post that output and the result of command -v opencode.

I reviewed this with Codex at medium effort as a second opinion. It agreed on the cause, and its independence from my reasoning is not guaranteed. It added that the launcher doesn't check the installed opencode version before passing --auto, and nothing upgrades opencode when you launch it, so any stale install fails the same way. The other agents in that launcher are in the same position with their own flags. I have not opened a fix. Whether the launcher should handle an outdated agent, by checking for the flag and falling back to permission prompts, or should just require an update, is the maintainer's decision. This is now waiting on them.

omarchybot avatar Oct 09 '26 01:10 omarchybot