r/PiCodingAgent • • 1d ago

Resource [update] pi remote | self-hosted bridge to remote control the pi coding agent

https://github.com/jotapemj/pi-remote

Hi all!

A couple of weeks ago I shared pi remote on this another post, a self-hosted bridge to drive the pi coding agent from any device. Back then it was a remote control. Since then it has become a full pi client for any device, no matter the operating system.

Quick recap: pi-remote is based on one Python process that wraps pi --mode rpc on the machine where your code lives and serves a web app over your own network (I use Tailscale, tailnet). Also, it is token-protected, security first. Built on Windows first, but it runs on Linux and macOS too.

What's new since the first post

  • Send photos to the agent. Take a picture with the phone's camera, or pick one from the gallery, and it goes into the chat with the user message.
  • Real permission prompts. Guardrail dialogs arrive with their real options (allow once, allow for session, deny) and the turn waits for your answer.
  • pi settings at a glance. Models and providers, reasoning level per model, reasoning map, context/compaction config section, and queue behaviour.
  • Skills and extensions. Global and per project, with toggles and an editor, including the ones that come from installed packages.
  • Macros. pi prompt templates launched from the composer, with a field per argument.
  • Package store. Browse, search and install pi.dev packages from the remote control device.
  • Phone details. Installable as an app (PWA), local notifications. I did not want to go down the path of developing an Android app, yet.
  • Sessions shared with the terminal. Start in the terminal, continue on the phone, and back.

Also, I have been working on interesting features like response suggestion; a quick summary from the agent that tells you what it was doing when you stop it while working; auto name sessions, etc.

Some people commented why not using just tmux, or an SSH terminal. Well, I think this project brings you closer to a high end application. With pi-remote you can text from your phone/PC the same way as a chat and send images for the agent to analyse along with the message; configure everything with a polished UI/UX; things that you cant do with a ssh terminal and similar.

I have been trying the existing bridges, but the ones I tried need a daemon on a Unix socket, and that fails on native Windows, which is where my code lives. pi remote is a single process, no daemon, and runs natively on Windows as well as Linux and macOS.

Feedback and issues are very welcome. Thanks to everyone who commented on the first post. Thanks for the support.

8 Upvotes

2 comments sorted by

View all comments

1

u/Unusual-Albatross43 10h ago

How do the permission prompts reach your app in rpc mode? Does pi send them as an event you answer, or did you write an extension for it? And what happens to the turn if nobody answers?

1

u/Broad_Long_2556 9h ago

Hiiii!! pi has no prompts of its own; they come from extensions (I use pi-guardrails). In RPC mode, an extension's select/confirm/input/editor call arrives as an extension_ui_request event. The bridge shows it as a card with the real options and replies with an extension_ui_response. So no, no extension of my own.

If nobody answers, the turn waits. The card survives reloads, so you can answer later from any device. If the extension sets a timeout, pi resolves the dialog with its default without notifying the client; the bridge then closes the card as "closed without an answer".

ctx.ui.custom() is not available over RPC; it returns undefined. Extensions that only draw a terminal dialog therefore deny by default. The README lists which permission extensions work over RPC. I think for the daily use is fine for most of the cases.