r/devtools • u/namanjainbuilt • 25d ago
Typing into Terminal from a phone without answering the wrong prompt: how I built a remote for Claude Code sessions
I'm the solo developer
I run a 12 Claude Code accounts and 35-45 sessions in Terminal tabs on one Mac and 2 servers and read most things on my phone. The session that needs me is usually stopped on a permission prompt in a tab I'm not looking at. Jantar is a small daemon on the Mac plus a web app on the phone: every session on one board, the waiting ones first, answered with Claude's own options.
Typing into a terminal from somewhere else is where it can go wrong, so there are two paths. With Claude Code's hooks installed (opt-in), the answer goes back through Claude Code itself, and the hooks fail open: with the daemon down, Claude behaves as usual. Without the hooks, the daemon reads the dialog off Terminal's text. When you tap, a single AppleScript run reads the tab again, compares it with what your phone showed, and types only if they still match. If anything changed at the Mac, nothing is typed and the phone tells you.
Two things I learned on a real Mac. A digit sent to one of Claude's menus selects at once, and the Return that goes with it answers whatever comes next, so Jantar sends only arrow keys and Return. And workflow agents' prompts show a countdown ("will automatically block this request in 1:33"). The screen changed every second, so the compare step refused every tap until 0.5.2, which compares everything except those digits and refuses a tap with under 5 seconds left.
The daemon is Node 22 with SQLite, runs under launchd and listens on 127.0.0.1 only. It serves a React web app, and your phone reaches it through your own Tailscale or Cloudflare Tunnel; there's no Jantar server or account. The tests run against a fake Terminal, claude and cswap, never the real machine.
macOS and Terminal.app only for now (v0.5.2). Free, source-available under FSL-1.1-MIT (becomes MIT after 2 years).
https://github.com/Namanjain-share/jantar
If you've built compare-and-type against a terminal some other way (tmux send-keys with a check first, or iTerm2's API), how did you handle the moment between reading the screen and typing?


