A walkthrough of pairing your terminal with a mobile remote, with notes on PTY handling and React Ink quirks I learned the hard way.
- The problem — describe the "agent paused, dev paused" loop. Why mobile makes sense (you have notifications, voice input, a touchscreen — all the pieces).
- What it is, in one sentence — CodeAgent Mobile is a mobile app + CLI that pair via 6-character code so you can drive Claude Code from your phone while it runs locally on your laptop.
- Setup walkthrough (with code blocks): npm install -g codeam-cli codeam pair # prints a 6-char code Pairing code: 7K2QFM Waiting for mobile…
- Open the app, enter the code, then: codeam # spawns Claude Code; you control from phone now
- What you can actually do from the phone — bullet list with screenshots: prompt input (text + voice), output streaming, approve interactive prompts (y/n, numbered selectors), file attachments, model picker.
- The interesting technical bits (this is what makes it a Dev.to-worthy post, not a sales pitch):
- Why a Python PTY helper: Node's child_process.spawn doesn't allocate a full PTY by default → Claude Code (which uses React Ink) refuses to render interactive UI without a TTY. The Python helper wraps the spawn so stdin.isTTY === true even when the CLI's parent is non-interactive.
- The 80ms arrow key gap: arrow keys for navigating Ink selectors must be sent one at a time with ≥80ms between each. Sending them in a single write() collapses them into one synchronous batch and React batches the state updates → Enter always picks option 0. Took weeks to track down.
- Why the backend is just a relay: code never leaves your machine; Anthropic billing stays on your existing key; the backend has zero LLM cost so the free tier can be generous.
- Caveats — needs internet, free tier limits, you still need an Anthropic subscription on your laptop.
- What's next — roadmap (multi-agent comparison, voice-driven flows, etc.).
- CTA — install, try it, give feedback. Link to repo.
Top comments (0)