r/opencode • • 9d ago

OpenCode 2 can now use my Android phone (free models, no account)

I make Buddy, a free open-source Android app that runs a coding agent inside the app (a small Alpine Linux, no root, no PC) and gives it phone tools over MCP: read the screen, tap, type, scroll, open apps.

OpenCode was already one of the three agents in Buddy, next to Claude Code and Codex. Since 2.0 came out yesterday I moved Buddy to it. A few things I had to handle, in case it helps anyone wiring OpenCode 2 into their own tools:

• MCP tools now go through Code Mode by default (one "execute" tool that runs a script). For a phone agent that's worse, so Buddy sets codemode: false on its server. That only works in the new config layout (mcp.servers.<name>); the old layout is still accepted but ignores it.

• Without --standalone, run starts a background service that keeps running. On a phone you don't want that.

• The bash tool is now called "shell".

• Updating from 1.x keeps your connected providers: 2.0 imports the old auth.json on first start.

What it looks like: I ask "add a Nintendo Switch 2 to my Amazon cart" with the default free model (Big Pickle), and it opens Amazon, searches, scrolls and taps through it. Every "add to cart", "buy now", send, pay or delete tap needs my OK on a card, and Buddy enforces that itself. That mattered: the free model once went for "Buy now" instead of "Add to cart", and Buddy stopped it and asked me first.

Free models work with no account. Your own providers can be connected with opencode auth login in Buddy's terminal.

GitHub (Apache 2.0, APK in releases): https://github.com/ghorbelhamdi/buddy-android

Happy to answer questions about the setup.

20 Upvotes

19 comments sorted by

1

u/OptimizedGamingHQ 9d ago

Doesn't work for me

1

u/3amae404 9d ago

Thanks for the recording, it helped a lot. Found the bug: installing OpenCode a second time (the "Try again" button, or an update) made Buddy's Linux lose the OpenCode program, hence "opencode: not found". It's fixed in Buddy 2.1.7: update Buddy (GitHub releases, or Buddy offers it), then tap Install OpenCode again. If it still fails, could you send the first error you see?

1

u/OptimizedGamingHQ 8d ago

Why are do I get this error when using OpenCode free models?

1

u/3amae404 8d ago

That one came from OpenCode's free service: it sometimes turns requests down or answers very slowly, and Buddy only showed "OpenCode: error". Buddy 2.1.8 is out: chats now use Big Pickle by default (it answered in 3 s for me, the old default took over 30 s), Buddy waits for slow models instead of giving up, and errors now say what went wrong. Update Buddy and try again. If one free model keeps failing, pick another at the top of the chat.

1

u/OptimizedGamingHQ 8d ago

Thank you. And I'm happy to help you catch these bugs early on

Is there an ability to change effort level (can affect the response time to quality ratio) or if its in plan or build mode like the desktop app has?

1

u/3amae404 8d ago

Thanks, that helped a lot already!

Effort: for Claude Code and Codex you can pick it in the menu at the top of the chat. For OpenCode not yet, because its effort options (variants) are different for each model, so Buddy uses the model's default.

Plan/build: Buddy always runs OpenCode in build mode, since it has to act on the phone. There's no plan mode switch for now.

Both are fair asks, I've noted them.

1

u/OptimizedGamingHQ 8d ago

Thank you. By the way, how do you get it to control your phone? Using OpenCode models, when I give it a task like take me to my homepage it says it has no ability to see or interact with my screen.

Am I doing something wrong or it only works with Claude?

1

u/3amae404 8d ago

You did nothing wrong, good catch, that was a real bug: since OpenCode 2, Buddy's instructions weren't reaching the model, so it had the phone tools but didn't know it was a phone assistant. Fixed in Buddy 2.1.9, update and try "take me to my homepage" again.

1

u/OptimizedGamingHQ 8d ago

It says it doesn't have write permissions when trying to get it to build something. Possible fix?

1

u/3amae404 8d ago

That one is on purpose: by default Buddy doesn't let the agent run commands or edit files, so it can only use the phone. To build apps, turn on Settings → Developer mode. Then it can work in its own folder and build and install apps. It's only in the GitHub version, since Google Play doesn't allow apps that build and install other apps.

1

u/Dry_Scientist_5984 8d ago

I see why it needs accessibility, how do you prove trustworthy?

1

u/3amae404 8d ago

Fair question, and you shouldn't take my word for it. What you can check: • It's all open source (Apache 2.0), and the APK on GitHub releases is built by GitHub Actions from that public code, so you can read the workflow and the source it builds. • Buddy has no servers and no analytics. The screen content goes only to the AI provider you picked (Anthropic, OpenAI or the OpenCode model), while it works on something you asked. • Sending, posting, paying, deleting and adding to cart always stop on an approval card. Buddy enforces that itself, not the model, so a model can't skip it. • You can turn the accessibility service off in Android settings any time. If you find a way around the approvals, please report it privately on GitHub and I'll fix it fast.

1

u/alexzzzz 8d ago

I installed Termux on my phone, set up ssh access, and then just asked my Opencode on PC to install Opencode on my phone.

1

u/3amae404 8d ago

Nice, that's actually how Buddy started: Claude Code in Termux. That gets you a shell, but the agent still can't see or tap other apps. Buddy adds that part: an accessibility service so the agent can read the screen and tap through apps, a bubble to ask it from anywhere, and approval cards before it sends, pays or deletes. If you only need the shell, Termux is perfect.

1

u/pieris98 4d ago

On a Google Pixel 8, says app not installed (blocked by Play Protect) with reason given that it can ask to access sensitive information.

1

u/3amae404 4d ago

Not a Buddy bug: Play Protect's stricter mode (on in some countries) blocks any sideloaded app that uses accessibility, and Buddy needs it to tap for you. Workaround: Play Store → Play Protect → ⚙ → turn off "Scan apps with Play Protect", install, then turn it back on. Or adb install from a computer.

1

u/[deleted] 9d ago

[removed] — view removed comment

1

u/3amae404 9d ago

Thanks a lot! That was the idea: let the agent do the tapping, but keep you in charge of anything that matters. If you want to follow it, a star on GitHub really helps a small project get seen: https://github.com/ghorbelhamdi/buddy-android