I installed the Linux agent in 12 seconds, pulled live CPU, RAM and process data from its local API, and wired Cursor's shell hook so an Allow or Deny came back in 0.2 seconds.
Every developer I know has an old Android phone in a drawer. Mine has a good screen, a working battery and nothing to do. Meanwhile my second monitor is always half covered by a system monitor, a terminal tail and whatever my coding agent wants me to approve next.
PhoneBox wants to fix both problems at once. Its README pitch is one line: "Turn an old Android phone into a desk panel for your computer." The repo was created on 7 November and had 9,607 stars on GitHub when I checked on 1 December, with v0.10.4 released a few hours earlier. The part that caught my eye wasn't the CPU gauges. It was this: the phone can answer your coding agent's permission prompts, with Allow and Deny buttons, while you're away from the keyboard.
So I installed the real Linux agent on my machine, poked every endpoint I could find, and wired up the Cursor hook end to end. Here's what I found.
What PhoneBox actually is
PhoneBox is two pieces, both MIT licensed and written by Ersin Koç (ersinkoc/phonebox):
- A desktop agent for Windows, Linux and macOS. It's C# on .NET 10, shipped as one self-contained binary, so you don't install a runtime. On my clone it's 147 source files and about 44,000 lines.
- A full-screen Android app, written in Kotlin around a WebView, with every widget in plain JavaScript. The minimum is Android 5.0 (API 21), and the APK is 3 MB.
The agent collects the data and serves an API; the phone just renders a panel. You design that panel in a browser-based editor with 142 widgets, 30 templates, multiple pages and a live preview. There's no account and no cloud service in the loop.
Installing the Linux agent
The Linux and macOS installer is one script. I read it first (686 lines of bash, well commented), then ran it. I skipped the phone install, start-at-login and the optional helpers, since I wanted a clean look at the agent itself:
curl -fsSL https://raw.githubusercontent.com/ersinkoc/phonebox/main/setup.sh | bash -s -- --yes --no-phone --no-autostart --no-extras
It found v0.10.4 for linux-x64, downloaded the 45 MB zip, checked it against the release's SHA-256 file, offered to install adb (I said yes, through apt), and started the agent:
==> Downloading PhoneBox 0.10.4
OK PhoneBoxAgent-0.10.4-linux-x64.zip matches the release checksum
==> Checking adb (needed for the USB connection to the phone)
OK adb installed: /usr/bin/adb
==> Installing to ~/.local/share/PhoneBox/app
OK PhoneBox 0.10.4 installed
==> Starting PhoneBox
OK PhoneBox is running: settings at http://127.0.0.1:8765
The whole run took 12.4 seconds of wall time, including the download and the adb install. Two details I liked. The script refuses musl systems like Alpine instead of failing later, and it tells you how to check build provenance with gh attestation verify if you have the GitHub CLI signed in.
The install lands in ~/.local/share/PhoneBox/app: a 110 MB PhoneBoxAgent binary plus the widget and template catalogs. Settings live in ~/.config/PhoneBox/config.json, and the log in ~/.local/share/PhoneBox/agent.log. The first lines of that log tell you most of what you need:
info Tray: settings: http://127.0.0.1:8765/ (no tray icon on this system; run PhoneBoxAgent again to open the settings)
info AdbReverse: no phone connected, waiting...
info PhoneBoxAgent: PhoneBox agent 0.10.4 ready on http://127.0.0.1:8765, phone USB port 46005
Then I checked what it was actually listening on:
ss -ltnp | grep PhoneBox
# LISTEN 127.0.0.1:8765 users:(("PhoneBoxAgent",pid=254413))
# LISTEN 127.0.0.1:46005 users:(("PhoneBoxAgent",pid=254413))
Both ports are bound to loopback only. Port 8765 is the settings page and API; the second, random port is for the phone over USB. Wi-Fi is off until you turn it on, and the installer says so: "Until Wi-Fi is on, PhoneBox only listens on this computer."
Real telemetry from the local API
The phone gets everything over HTTP, so I could read exactly what it would see. /api/info answered in 1.4 ms:
{"version":"0.10.4","os":"linux","adb":"/usr/bin/adb","connected":false,"via":null,"devices":[]}
/api/state is the main feed. Here's the pc block from my machine (I trimmed a few null fields and a second disk):
{"cpu":15.5,"cpuName":"Intel(R) Xeon(R) Processor","ramUsedGb":11.7,"ramTotalGb":15.6,
"netDownBps":9503,"netUpBps":528864,
"disks":[{"name":"/","usedGb":10,"totalGb":127}],
"uptimeSec":22103,"seq":9}
I checked those numbers against the system. free -m reported 16,002 MiB total and 11,804 MiB used, which is the same 15.6 and 11.5 GiB. df -h / showed 128G with 11G used. The agent rounds in GiB and df in its own units, but they agree. Over ten one-second samples, CPU moved between 8.0% and 26.3%, upload between 596 B/s and a spike of 111 MB/s, and the seq counter went up by exactly one each second.
The process list is lazy, which I didn't expect. My first /api/procs call returned zero processes. The sampler only runs within 15 seconds of a request, every 2 seconds, so an idle agent isn't walking /proc for nothing. Three seconds later the same call returned 163 processes in 38 groups, in 2.6 ms:
curl -s 'http://127.0.0.1:8765/api/procs?top=5'
# {"total":163,"groupCount":38,"groups":[
# {"name":"chrome","count":14,"cpu":2.2,"memMb":2174,"locked":false},
# {"name":"node","count":36,"cpu":0.8,"memMb":3010,"locked":true},
# ...
# {"name":"PhoneBoxAgent","count":1,"cpu":0.2,"memMb":191,"locked":true}]}
The locked flag marks groups the phone's process widget can't kill: the agent itself, a list of protected system processes, and anything not owned by your user.
A few more endpoints worth knowing:
-
/api/catalogreturns the editor's whole widget catalog (79 KB): a 12 by 6 grid, up to 18 rows, 142 widgets and 30 templates. -
/api/latencyis the agent timing itself per route.GET /api/statehad a p50 of 20 ms, the catalog 6 ms. -
/api/streamis Server-Sent Events. I held it open for about 36 seconds and got 37stateframes, one per second, pluseventframes whenever something was pushed.
The default Linux layout already has nine pages: home, AI, work, system charts, processes, a shortcut deck, music, and two disabled ones (focus and world clocks).
On footprint, the agent started at about 129 MB of RSS and settled near 196 MB after eight minutes of me hitting every endpoint and holding the stream open, with 29 threads. Its average CPU over those eight minutes was 2.4% of one core.
The editor and the live preview
Opening http://127.0.0.1:8765 gives you the settings page, which is also the layout editor: a single 394 KB HTML page. The live preview next to it loads /panel/, and this is the neat part. I compared that page byte for byte with android/app/src/main/assets/www/index.html in the repo, and they're identical. The build embeds the Android app's web assets into the agent, so the preview in your browser runs the same panel code the phone's WebView runs. What you lay out is what the phone shows.
If you want to try the editor before installing anything, the live demo runs it with simulated data. From a clone, python tools/demo-server.py does the same on port 8790.
Approving Cursor commands from the phone
This is the feature I came for. PhoneBox can sit between Cursor's agent and your shell. It installs two hooks in ~/.cursor/hooks.json, beforeShellExecution and beforeMCPExecution, and each one posts the command Cursor is about to run to the agent. The phone shows a card, and your Allow or Deny becomes the hook's answer.
It's off by default, and for a good reason: Cursor's hooks run before every command, including ones Cursor would run on its own. So first I sent the hook request with the feature off, to see the baseline:
cat > cursor-shell.json <<'JSON'
{"hook_event_name":"beforeShellExecution","conversation_id":"demo-chat-1","command":"rm -rf ./dist && npm run build","cwd":"/home/ishank/projects/phonebox-demo"}
JSON
curl -s -w 'HTTP %{http_code} size=%{size_download} t=%{time_total}s\n' -X POST -H 'Content-Type: application/json' --data @cursor-shell.json http://127.0.0.1:8765/api/hooks/cursor/permission
# HTTP 200 size=0 t=0.007354s
An empty 200 in 7 ms. An empty answer means "no opinion", and Cursor carries on with its own rules. Then I turned on "Ask on the phone" for Cursor through the same settings API the editor uses, and set the answer window to 30 seconds (the default is 90). I sent the same request again with no phone around. It was still an empty 200, and the log explained why:
info ApprovalStore: Cursor permission prompt left to the computer: the phone has not been seen since the agent started
That's the design in one line. A prompt only goes to the phone if the phone has talked to the agent in the last 5 seconds. Otherwise Cursor asks you on the desktop as usual. A phone that's off or unplugged can't stall your agent.
Next I needed a phone on the other end. The app's side of this exchange is plain HTTP: it sends an X-PhoneBox-App header, reads /api/approvals, and posts a decision to /api/approvals/{id}. So I played the phone's part with a 17-line Python client over loopback, polling every 250 ms. With it running, the hook call blocked and this card appeared, exactly as the phone receives it:
{"id":"6d43c0db5988","source":"Cursor","session":"demo-chat-1","project":"phonebox-demo",
"tool":"Run a command","detail":"rm -rf ./dist && npm run build",
"kind":"permission","always":false,"highRisk":true}
Notice highRisk: true. The agent flags destructive commands, and the phone asks for a second tap before allowing those. Then I ran every decision path:
-
Deny, answered after a deliberate 1-second pause: the hook returned
{"permission":"deny","user_message":"Denied from the PhoneBox panel.","agent_message":"The user denied this from the PhoneBox panel on their phone."}in 1.20 s. -
Allow, same pause:
{"permission":"allow"}in 1.19 s. -
An MCP call (GitHub's
create_pull_request), answered immediately: the card read "Use github › create_pull_request" with the arguments pretty-printed, and Allow came back in 0.195 s. -
Invalid answers:
alwaysandmaybegot a 404 on a Cursor card, anddenythen went through in 0.205 s. Always allow only exists for OpenCode cards, because Cursor has no rule to save it to. - No answer: with the phone present but silent, the hook returned an empty 200 after 30.006 s, right at the timeout.
So the overhead is about 0.2 seconds, and most of that is my client's 250 ms polling. The real app doesn't need to poll for this. On the SSE stream I watched an approval event arrive the moment the hook fired, and an approval-done event exactly 30 seconds later when it expired:
data: {"seq":9,"kind":"approval","data":{"id":"dd594a63a004"},"at":1796112142631}
data: {"seq":10,"kind":"approval-done","data":{"id":"dd594a63a004"},"at":1796112172635}
Finally I installed the real hook from the API (POST /api/cursor/hook) and read what it wrote:
{"hooks":{"beforeShellExecution":[{"command":"curl -s --noproxy 127.0.0.1 --max-time 3600 -X POST http://127.0.0.1:8765/api/hooks/cursor/permission -H \"Content-Type: application/json\" --data-binary \"@-\" || true","timeout":45}]},"version":1}
(The MCP hook is the same command.) It's just curl with Cursor's JSON on stdin, and || true so a dead agent prints nothing and exits 0. The 45-second timeout is my 30-second answer window plus 15. I piped my test request into that exact command while my phone client denied it. It printed the deny JSON, exited 0 and took 199 ms. Removing it (DELETE /api/cursor/hook) took PhoneBox's entries back out and left a backup of the file next to it.
What I like here is that every failure fails open. No phone, no answer, a crashed agent: Cursor gets an empty output and behaves as if PhoneBox weren't installed. PhoneBox never sets Cursor's fail-closed option. The phone only ever adds a way to say no, or to say yes from across the room.
OpenCode works differently
OpenCode doesn't use a hook at all. When you turn on its "Ask on the phone" switch, the agent polls OpenCode's background service (opencode serve --service, which writes its address and password to ~/.local/state/opencode/service.json) once a second over 127.0.0.1. Pending permission requests become the same card, with a third button. Allow answers once, Always allow saves OpenCode's proposed pattern for the project, and Deny rejects. It can also answer OpenCode's multiple-choice agent questions. On my machine OpenCode is 1.19, which predates that background service, so the Cursor hook is the path I exercised. There are hooks for Claude Code, Codex and Pi too.
How the phone joins
The phone side is where the "no root, no cloud" claim gets concrete. From the agent's code:
-
Over USB, with USB debugging on, the agent keeps an
adb reverse tcp:8765 tcp:<USB port>rule in place. That makes127.0.0.1:8765on the phone land on the agent's USB port (46005 in my run). Plug the phone in, and the agent wakes it and opens the panel. This is why setup offers to installadb. - Over Wi-Fi or Tailscale, which is opt-in, the agent opens TCP 8766. You pair by scanning a QR code in the settings and confirming a matching check code. The phone receives the computer's addresses, a shared key and the SHA-256 fingerprint of the agent's self-signed TLS certificate. From then on it talks HTTPS and trusts only that exact certificate.
I also checked the loopback port's guard rails with curl. A request with a LAN Host header got a 403, a foreign Origin got a 403, and a cross-site Sec-Fetch-Site POST to the hook endpoint got a 403. A random web page in your browser can't approve commands for you.
Where I'd use it
After an afternoon with the agent, I'd use PhoneBox for three things:
- A permission remote for my coding agent. Cursor's shell and MCP calls land on a phone on the desk, with a risk flag and a fail-open timeout.
- A real system monitor that doesn't steal screen space. CPU, RAM, disks, network and processes, updated every second over a local stream, from an agent that idles at a few percent of one core.
- A cheap control deck. Shortcuts, media and macros on a screen I already own.
To try it:
curl -fsSL https://raw.githubusercontent.com/ersinkoc/phonebox/main/setup.sh | bash
xdg-open http://127.0.0.1:8765
The code is at github.com/ersinkoc/phonebox, the APK is on the releases page, and the live demo lets you build a layout in your browser first. Then find that old phone in your drawer.
Top comments (1)
The detail that made me trust this review is that you checked the numbers against the system — free -m agreeing with the agent's RAM figures, the seq counter going up by exactly one each second — instead of just quoting the API. And the fail-open design is the right call for an approval button: a dead agent prints nothing and exits 0, so Cursor carries on. One question: the phone joins over USB with adb reverse, or over Wi-Fi/Tailscale with a QR pair — if the phone is on Wi-Fi and the laptop moves networks mid-session, does the agent re-pair on its own, or do you have to scan the QR code again?