Running Claude Code locally on Android via Termux with per-message model routing
SuspenseAndSurprise · reddit · 2026-10-11
A Reddit user built a fully local Claude Code setup on an Android phone—no PC or server needed, with all files kept on-device.
Stack
- Termux + Ubuntu in proot, the official CLI, and a small Node server serving a chat page on 127.0.0.1;
- Home-screen widgets to start/stop/backup, auto-shutdown after 15 minutes idle;
- Projects live in shared storage; one tap moves them into Ubuntu for git/npm since shared storage lacks symlinks, plus per-project one-tap git commits.
Per-message model routing (on a Pro plan)
- Auto: a quick Haiku call inspects each message—normal coding goes to Sonnet, hard tasks to Opus, simple work to a Haiku worker checked by Sonnet; unsure stays on Sonnet;
- Ask-me and Off modes for manual control; typing "use opus high" works anytime;
- Colored blocks per reply show model and effort, with project timelines and usage bars via Claude Code's own /usage.
Security: localhost-only server, cross-site requests blocked, important work backed by git. The author calls it a fun personal experiment and is open to suggestions.
More from coding & agent
- Claude cut a 2.6-hour video export to 20 minutes — but only after being told to rebuild the server — byhewar · 2026-10-23
- 3 flight-booking rules my AI agent checks that I'd never do by hand — Efistoffeles · 2026-10-23
- OpenJet claims Qwen3.8-27B coding runs 1.9x faster than llama.cpp on one RTX 3090 — JeremyCMorgan · 2026-10-23
- Building an autonomous SEO agent in Hermes with three skills: programmatic pages, Keywords Everywhere, DataForSEO — EXM7777 · 2026-10-23
- Building a sports betting AI agent with onchain execution and human approval by default: architecture and lessons — Dry-Comfortable-2678 · 2026-10-23
- How do you audit AI agent decisions in regulated workflows? A field survey — Ok_Way_1993 · 2026-10-23