跪拜 Guibai
← All articles
GitHub · Artificial Intelligence

Looklook Puts Claude Code on Your Phone: An Open-Source Remote Terminal for AI Sessions

By imythu ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI coding agents frequently pause for user confirmation, which breaks unattended workflows and forces you to stay glued to the terminal. Looklook gives you a secure, encrypted mobile remote that lets you approve, answer, and monitor from anywhere, turning those waits into non-blocking interruptions.

Summary

Running large tasks with Claude Code and Codex often stops midway because the agent asks for confirmation on a command or a choice. If you're away from the desk, that session waits indefinitely. Looklook, a self-hosted open-source tool, exposes the terminal session as a web page a phone can open, giving you a full terminal with a mobile keypad, conversation cards for AI output, push notifications when the AI needs input, and the ability to paste screenshots back. It works at the terminal layer, so it supports any TUI: Claude Code, Codex, Gemini CLI, OpenCode, Kimi, Qwen Code, even htop and vim, without re-authenticating with any AI service.

Building it required solving a series of awkward problems. ttyd's bundled frontend was stuck on xterm.js 5.5, which lacks synchronized output, so the screen flickered on every AI redraw; the fix was a ported frontend on xterm.js 6 with WebGL and tmux sync. tmux filters the ZMODEM control character, breaking rz/sz, so file transfers go through an HTTP panel with 8 MiB chunks instead. For remote access, WebRTC is used, but libjuice does not support ICE restart, so dropped connections are handled by suspending the session for 60 seconds and resuming at the byte level over a fresh WebRTC connection. The client also patches a libjuice ICE role conflict bug and supports TURN over TCP for UDP-blocked networks. All client code is open source under AGPL-3.0, stores data locally, and the install package is built by GitHub Actions with SHA256 checksums.

The project is the work of one developer (imythu) plus Claude Code itself, and has released over ninety versions in its first month, with features added the same day users requested them. It demonstrates how self-hosted developer tooling can adapt to the reality that AI agents often need human approval, and that humans are not always at their desks.

Takeaways
— Install with curl -fsSL https://looklook.dev/install.sh | sh; the server runs on port 1234 locally with no registration.
— LAN access can be enabled for same-Wi-Fi phones; desktop apps exist for Windows and macOS.
— Works with any terminal program including Claude Code, Codex, Gemini CLI, OpenCode, Kimi, Qwen Code, htop, vim.
— Mobile features include a full terminal with Esc/Tab/Ctrl/arrow keys, conversation cards, push notifications to Feishu, WeChat Work, DingTalk, Bark, ntfy, screenshot paste, and tmux-backed persistent sessions.
— ttyd's frontend was ported to xterm.js 6 with WebGL rendering and sync output support, fixing flicker.
— File transfer bypasses ZMODEM via HTTP with 8 MiB chunks; trzsz is included for tmux.
— Remote WebRTC handles dropped connections by suspending the session for 60 seconds and resuming at the byte position; patches libjuice's ICE restart lack and role conflict bug.
— Conversation UI recognizes the input box shape instead of guessing AI state; ignores messages below the input line.
— Codex's app-server delays writing user messages by ~10 seconds; the frontend shows the message immediately then replaces it.
— The project released 90+ versions in its first month, with many features added the same day users requested them.
Conclusions

Building at the terminal layer rather than integrating with each AI tool's API makes the tool future-proof and simple to maintain.

The lack of ICE restart in libjuice is a real gap; application-level resume is a pragmatic workaround that many mobile apps could adopt.

Open-sourcing with AGPL-3.0 and end-to-end encryption addresses the security concerns of remote terminal access.

The rapid iteration driven by user requests in a chat group shows how a small open-source tool can evolve quickly with community feedback.

Concepts & terms
DEC 2026
A terminal control sequence for synchronized output, telling the terminal to buffer updates and paint them atomically, preventing flicker.
ZMODEM
A file transfer protocol over a terminal session, often used with rz/sz commands; tmux filters its control character, breaking it.
WebRTC
A protocol for real-time peer-to-peer communication, used here for encrypted remote terminal access.
ICE restart
A WebRTC mechanism to renegotiate connections after network changes, such as switching Wi-Fi or 4G.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗