r/GithubCopilot • • 2d ago

General I built an Android client to drive my Copilot agent sessions from my phone - here's what building on AHP was like

I've been running Copilot agent sessions in VS Code for a while now, and the thing that kept biting me was walking away from my desk. Agents finish, or worse, sit waiting on a tool approval, and I'm in the kitchen.

So I built Hostline, a native Android client for the Agent Host Protocol. It connects to the VS Code remote tunnel (or a self-hosted ahpd) and mirrors the session: transcript, state, approvals. A few things I learned building on AHP:

  • The protocol is genuinely multi-client. The desktop and the phone both watch the same session state, and approving a tool call from the phone just works, because approvals are protocol messages, not UI hacks.
  • There's no push in the protocol. If you want a ping when an agent finishes, your client has to stay connected. On Android that means a foreground service with an ongoing notification. On iOS it means... about 30 seconds of background grace and then the socket dies. That one's still unsolved.
  • The settings surface is messier than the docs suggest. Different harnesses expose the same setting under different ids (reasoning effort showed up three ways), so the model picker had to learn to dedupe by meaning, not by id.
  • Session lists get confusing fast on a phone. I filed a protocol issue asking for client-editable session tags, mostly so I could tell my own sessions apart.
6 Upvotes

10 comments sorted by

2

u/Electronic_Half_9308 2d ago

Github cli provides a native remote control into your session vis github app.
So why reinvent the wheel?

1

u/capngreenjeans 1d ago

Different sessions - the GitHub app covers Copilot's cloud agent, which runs on GitHub's infra. This talks to the sessions running in VS Code on your own machine, over AHP, so it's the same session your desktop shows... local tools, approvals and all. The protocol being open is kind of the point - anyone can build a client like this.

1

u/Electronic_Half_9308 1d ago

Github does that for you local session as well.
Enable /remote ans you can control the session through your phone.
I really dont see any value on doing this yourself.

1

u/capngreenjeans 1d ago

Fair - /remote is real, and if Copilot CLI + GitHub Mobile is your whole setup, it covers you. Where this differs: it talks to any AHP host, not just Copilot's. VS Code agent sessions across harnesses, or a self-hosted ahpd straight to your machine with no GitHub in the loop. Plus the client stuff a general-purpose app doesn't do - finish notifications, session management, model picker. The protocol's open on purpose... building your own client is kind of the point of it existing.

1

u/PaulShellDev CLI Copilot User 🖥️ 2d ago

Customization is why I did myself. Full control and able to extend how I want to work.

1

u/Comfortable-Craft-94 1d ago

With `ahpd` you can run Claude, PI, Codex, Copilot and much more.

1

u/Gronnie 1d ago

For pushes I have mine send me a message on Teams. I’m sure there’s multiple other ways you could do that.

1

u/capngreenjeans 1d ago

Teams is a good call - the host side is the right place for it, since the protocol itself won't push. I've got a design for a host-side watcher that pings Pushover on state changes, just haven't built it yet. The phone-side version works on Android but iOS kills it, like I said.

1

u/Comfortable-Craft-94 1d ago

I'm the author of ahpd, nice to see it listed as a host.

About some comments I see here.

/remote on Copilot CLI, /remote on Claude or the same for major agents, is great if that agent is all you run. ahpd is for when it isn't:

- **One host, many agents.** Claude Code SDK, PI SDK, Codex, Copilot, Gemini and other ACP agents, with your subscriptions or API keys. Example: use Claude Code with opus delegating work for a Claude Code with deepseek or a freemodel.

- **Your machine, no account in the loop.** It runs on your computer, a server or in Docker, and clients connect to it directly. Example: you can run one session inside a docker and another on a SSH host, same ahpd.

- **Work keeps running.** Close the client and the session keeps going. You can also schedule tasks or start them from a webhook.

- **Shared hosts.** Users, permissions, and spending limits per person, team and project.

- **Extendable** You can use plugin to add features.

And because it speaks AHP, you're not stuck with my clients. Hostline is a good example: a native Android app that connects to ahpd or the VS Code tunnel and puts the transcript and approvals on your phone. That's the point of an open protocol: hosts and clients from different people that just work together.

---

u/capngreenjeans if you want Hostline to work with the push plugin, open an issue and I'll help.

ahpd solves it on the host side with a plugin, `@ahpd/push`. The host already watches its own sessions, so it sends the notification when a session needs you, completes or fails.

1

u/capngreenjeans 1d ago

Thanks for this, and for ahpd in general. The push plugin is exactly the piece I'm missing... I'll open an issue, I'd love to see how it talks to clients.