The Deska blog
Monitoring Codex CLI From Your Phone
Learn how to monitor Codex CLI from your phone safely. Explore mobile LLM execution, remote terminal access, and secure relay architectures for developers.
· 11 min read
Modern software development often requires managing long running processes that involve large language models. As developers integrate tools like Codex CLI into their daily routines, the need to step away from the desk while maintaining oversight becomes a priority. Learning the best practices for monitoring Codex CLI from your phone ensures that you can track token generation, verify command execution, and catch errors without being tethered to a workstation. This capability relies on understanding the intersection of remote terminal access, secure networking, and the specific constraints of mobile interfaces.
The Challenge of Remote LLM Monitoring
When you run a coding agent like Codex CLI locally, it consumes significant system resources and often takes time to complete complex tasks. Unlike a simple script, an AI agent might make recursive calls, attempt to fix its own bugs, or generate large blocks of code. Monitoring this progress from a mobile device presents several technical hurdles that developers must navigate.
Latency is the most immediate concern. A slow connection can make a streaming terminal feed unreadable. Security is another major factor. Opening ports on your home or office router to access a local session exposes your machine to the public internet, which is a significant risk for any environment containing sensitive source code. Finally, the UI of a standard terminal emulator on a small screen is often cramped, making it difficult to read long diffs or nested directory structures.
Architectures for Mobile Oversight
There are three primary ways to achieve mobile visibility for your local development environment. Each has its own trade-offs regarding security and ease of use.
SSH and Terminal Multiplexers
The traditional method involves using a tool like tmux or screen. You start your Codex CLI session inside a multiplexer on your Linux or Mac machine. Then, you use an SSH client on your phone to connect to the computer.
- Pros: Total control over the environment and extremely low bandwidth usage.
- Cons: Requires manual network configuration, such as setting up a VPN or port forwarding. Typing complex commands on a mobile touch keyboard is frustrating.
Remote Desktop and VNC
This approach mirrors the entire screen of your workstation to your phone. While it gives you access to every tool, it is often the least efficient method for monitoring a CLI tool. The high bandwidth requirements and the difficulty of navigating a high resolution desktop on a five inch screen make this a backup option rather than a primary solution.
Secure Relay and Unified Workspaces
A more modern approach involves using a tool that provides a secure relay. In this model, the desktop application and the mobile app pair directly. Data is encrypted and passed through a relay server without requiring you to open any ports on your router. This is the architecture used by Deska to allow users to monitor and continue work from a mobile device.
Optimizing the Codex CLI Experience on Mobile
To effectively monitor an AI agent from a phone, you need more than just a raw text stream. You need context. If Codex CLI is modifying a file, you want to see the file content alongside the terminal output.
Using a system that supports an infinite canvas can change how you interact with these tools. On a desktop, you might have multiple panels open side by side. When you transition to mobile, the ability to zoom into specific panels or receive notifications when a task completes is vital. This is especially true when running multiple agents, such as having Codex CLI and Claude Code active in separate terminals within the same workspace.
Security Considerations for Remote Access
Security should never be an afterthought when connecting a mobile device to a development machine. Because coding agents often have permission to read and write files, a compromised connection could lead to data exfiltration.
- Encryption: Ensure that all data sent between the phone and the workstation is encrypted end to end.
- Direct Pairing: Use tools that pair devices directly rather than storing your session data on a third party cloud.
- Local-First Principles: Stick to a local-first approach where your code and API keys remain on your hardware.
- Minimal Permissions: If you are using a mobile terminal to send commands, ensure the user account has only the necessary permissions.
Comparing Solutions for Remote Terminal Management
Different tools provide different levels of integration for monitoring AI agents.
| Feature | SSH + tmux | Remote Desktop | Deska Workspace |
|---|---|---|---|
| Ease of Setup | Difficult | Moderate | Easy |
| Mobile Optimization | Low | Very Low | High |
| Security Config | Manual | Risky | Automated |
| Persistent Session | Yes | Yes | Yes |
While SSH is the gold standard for many sysadmins, it lacks the visual context needed for modern AI workflows. Deska provides a more holistic environment where you can see coding agents running in panels and interact with them via the mobile app without complex network overhead.
Managing API Costs and Usage
Monitoring Codex CLI from your phone is also a matter of cost management. Since most developers use their own API keys, or a BYOK model, an unmonitored agent could potentially enter a loop and consume thousands of tokens while you are away from your desk.
Mobile monitoring allows you to kill a process the moment you see it heading in the wrong direction. By checking the notifications on your phone, you can see if an agent has requested a manual confirmation or if it has encountered an error that requires your intervention.
Frequently Asked Questions
How can I access my local terminal from a phone without port forwarding?
You can use a secure relay service or a mesh networking tool. These technologies create a virtual tunnel between your mobile device and your computer. Deska handles this through its mobile app, which pairs directly with the desktop client to provide remote access without exposing any ports to the public internet.
Is it safe to run AI coding agents while away from my computer?
It is safe if you have a way to monitor the execution and if the agent operates in a restricted environment. Using a local-first setup ensures that your files stay on your machine. Being able to check the status via a mobile app provides a safety net to stop execution if the agent behaves unexpectedly.
Can I run Codex CLI on a phone natively?
Most mobile operating systems do not have the necessary libraries or Node.js environments to run Codex CLI natively. The standard practice is to run the agent on a Mac, Windows, or Linux machine and use a mobile interface to monitor the agent threads and terminal output remotely.
Getting Started with Mobile Monitoring
If you want to start monitoring your AI workflows today, you can begin by organizing your workspace. Place your terminals, code editor, and notes side by side to create a comprehensive view of your project.
Deska offers a free desktop application for Mac, Windows, and Linux that simplifies this entire process. By using the infinite canvas, you can arrange your AI agents as panels and then pair your phone to stay connected to your work. This allows you to maintain the benefits of a local development environment with the flexibility of mobile oversight.
To try these features and set up your own remote monitoring workflow, you can download the app and start building your custom workspace.