Steering long-running coding agents from a phone
November 14, 2026 · Oyren AI Team (AI-written)
TL;DR: Long-running coding agent turns in Claude Code or Codex spend most of their runtime executing tests and editing files, then pause on terminal prompts for folder trust, tool permissions, or diff checks. From a mobile phone browser on oyren.ai, an Oyren Cloud Codespace keeps those sessions steerable through a persistent
tmuxsession namedmain, a direct@xterm/xtermANSI terminal over a reconnecting PTY WebSocket, andoyren route addpublic HTTPS previews. Closing a phone tab leavestmuxrunning in container memory, whereas stopping the Codespace, dropping a live socket, or hitting an expired model token each fail along separate boundaries.
Choose or create a workspace, then select the agents and repositories for the workflow.
On iPhone and Android phones, Oyren runs as a responsive web application in the mobile browser from 320 px upward, while dedicated iPad and Android tablet apps show Coming soon on the platforms page alongside disabled App Store and Google Play buttons. Phone steering focuses on checking terminal progress, answering interactive prompts, and opening a live HTTPS preview rather than writing full files on a glass keyboard (running Claude Code from a phone).
Persistent tmux sessions in container memory
Cloud Codespace terminals attach by default to a shared tmux session named main inside the Linux container (tmux workflows for AI coding agents). Each window in main appears in a touch-sized strip (44 px minimum target height on coarse pointers) alongside a New window control and a Terminals overview view that renders escaped screen previews with live process badges (Idle, Agent, Running, Finished, Error, Exited, and Attention). If a terminal opens a plain shell while main is still active, a session bar offers Reattach beside Keep plain shell.
# Reattach to the default Cloud Codespace tmux session from any shell
tmux attach -t main
# Read the last 80 lines of window 1 without switching focus
tmux capture-pane -pt main:1.0 -S -80
Closing the mobile browser tab or locking the phone screen disconnects only the browser viewer while main keeps its child processes and scrollback in container RAM. Stopping the Codespace or reaching its paid runtime deadline shuts down the Linux container and ends every tmux session in memory, so uncommitted work still belongs on a pushed Git branch.
Direct ANSI terminal rendering on touch screens
Each terminal pane mounts @xterm/xterm connected over a WebSocket directly to the container PTY endpoint (/terminal) rather than streaming a remote desktop video feed. Real ANSI color sequences, cursor movement, and interactive terminal prompts (Claude Code permission modes, Codex approvals, folder trust checks, and /model selectors) render at native phone text sharpness (Codespace sign-in guides).
Standard xterm.js viewports lack native single-finger touch inertia when tmux mouse mode or an alternate-screen TUI captures pointer events. Oyren's touch-scroll adapter (wireTerminalTouchScroll) measures vertical single-finger drags past an 8 px movement threshold and dispatches calibrated 50 px wheel notches with deltaY and wheelDeltaY, letting one thumb scroll tmux copy-mode history and TUI lists without hijacking two-finger pinch zoom.
When a phone wakes from lock screen or switches between Wi-Fi and cellular networks, browser online and visibilitychange listeners refresh expired 15-minute terminal grants before reopening the PTY socket. During that handshake the header displays Reconnecting... with a manual Reconnect control, or reports This Codespace has stopped. if the underlying container is no longer running.
Public HTTPS previews through oyren route
Checking a web change from a phone normally stalls on localhost port forwarding. Every running Cloud Codespace owns one managed public HTTPS hostname, shown in the session header as Not published until root / maps to a container port and as Public site once published. Routes can be configured from that header popover or from the container shell with oyren route:
# Map the Codespace public HTTPS root to a dev server on port 3000
oyren route add / 3000 "Web preview"
# Inspect active prefix mappings or remove the public route when finished
oyren route list
oyren route remove /
Two built-in diagnostic paths help debug a broken preview from a phone browser without opening multi-pane logs: /_oyren/gateway reports live route status on the Codespace hostname, and /_oyren/logs prints recent server stdout and stderr. Published routes require no Oyren login or session token, so anyone holding the URL can reach the mapped port; secrets and admin panels without their own authentication should stay off routed ports, and temporary previews should be unpublished with oyren route remove when review finishes.
Session persistence, socket drops, and provider auth
Keeping tmux alive on a remote container solves only one failure mode. Mobile steering still crosses three separate boundaries that fail and recover independently:
| Failure boundary | What breaks | What happens to the agent process | Recovery from a phone |
|---|---|---|---|
| Failure boundaryTerminal-session persistence | What breaksCodespace stops manually or hits its paid runtime deadline | What happens to the agent processContainer OS exits and in-memory tmux sessions end | Recovery from a phoneStart the Codespace again, reopen main, and resume from Git state or saved agent transcripts |
| Failure boundaryLive network connectivity | What breaksSubway tunnel, cellular handoff, or locked phone drops the PTY WebSocket | What happens to the agent processProcess keeps running inside tmux while live output and keystrokes pause | Recovery from a phoneUnlock the phone or tap Reconnect so the browser refreshes its terminal grant and reattaches |
| Failure boundaryProvider authentication and quotas | What breaksClaude or OpenAI OAuth session expires, an API key is revoked, or model credits run out | What happens to the agent processtmux and the PTY socket stay connected, while the CLI agent stalls at an auth or rate-limit error | Recovery from a phoneRe-authenticate the CLI inside main or restore provider quota before continuing the turn |
Cloud Codespaces and the request-only device beta
Oyren separates managed cloud machines from personal hardware along clear operational lines. A Cloud Codespace runs on a paid Linux cloud machine with zero personal files on disk and includes the managed public HTTPS preview URL used by oyren route. Cloud Codespace machine runtime bills while the machine is running with a one-hour minimum (plan rates are listed on Plans and metered usage), separate from AI model tokens or third-party CLI subscriptions.
Pairing a personal machine in the request-only device beta requires requesting access and receiving admin approval, since public device beta enrollment is not open yet. Approved device beta setups support Macs and 64-bit Raspberry Pis running Docker with access to the private GitHub kit; the one-command npx path is not open in production, and beta devices do not receive a managed Oyren public HTTPS preview URL. Even inside the approved device beta, running unattended 24/7 coding agents on a primary personal Mac exposes personal files, SSH keys, and browser sessions on that user account, so dedicated cloud machines or isolated secondary beta hardware remain the safer choice.
Choose or create a workspace, then select the agents and repositories for the workflow.
Open Codespace setup