Overview
Use Codex CLI to build a small private web page that talks to the Codex app-server, so you can follow a coding session and answer its approvals from another device.
Problem or Objective
- Which agents build a non-trivial feature with you?
- Which agents turn a plain-language brief into a working app or prototype?
More in Coding and Code Review
AI Agents and Models
Tools and Integrations
- Tools
- Codex CLI
- Prerequisites
- Codex CLI signed in, web development experience, and a secure way (such as an SSH tunnel) to reach your machine if you use it remotely.
How It Works
Start an empty project and write down the first features only: send a message, stream the reply, show proposed commands and file changes, and approve or reject them. Ask Codex CLI to read the app-server documentation you provide and plan a thin web client, with the app-server listening on the local machine only. Approve the plan, then let it build in a Git repository with tests against a disposable project. Run it in one browser on the same computer and confirm that nothing proceeds without your approval click. For access from a phone, choose an authenticated, encrypted route such as an SSH tunnel, review how tokens are stored, and approve that exposure separately. Add further features one at a time, each with its own test.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Codex CLI.
- Connect the toolsConnect the tools this workflow relies on: Codex CLI.
- Check the prerequisitesCodex CLI signed in, web development experience, and a secure way (such as an SSH tunnel) to reach your machine if you use it remotely.
- Gather your detailsCollect what the prompt asks for: Empty Git repository for the client, Documentation to follow, Scope of the first version.
- Run the starter promptPaste the starter prompt below into Codex CLI and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at developers.openai.com before you rely on it.
Practical Starter Prompt: Build a thin web client for Codex sessions
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
In [Empty Git repository for the client], plan a small web client for the Codex app-server using the documentation at [Documentation to follow]. First version: [Scope of the first version]. The server must listen on the local machine only, and every command or file change must wait for an explicit approval click. Show me the plan and the security assumptions and wait for my approval. Then build it, with tests against a throwaway project. Do not open any port to the network, store tokens in the repository, push or deploy without asking me.Approve the plan before code is written, keep the first version local, and give separate approval for any network access, push or deployment.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. OpenAI describes the app-server as the interface for rich Codex clients, with conversation history, approvals and streamed events, and Codex CLI as able to edit files and run commands. The pages do not show this particular web client, so building and securing it is your own work.
Limitations and Considerations
OpenAI calls the WebSocket transport experimental and unsupported, and warns that non-loopback listeners currently accept unauthenticated connections by default during rollout, so set up authentication before anything leaves your machine. Whoever reaches this page can steer an agent with access to your files, so treat it like a remote shell. Check your plan and usage limits before long sessions. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About openai/codex
Meet the New Codex CLI (opens in a new tab)
Published by the project’s official channel.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Codex App Server | ChatGPT Learn (opens in a new tab)
Project documentation · developers.openai.com · Undated · Source checked 2 Dec 2026, 16:10 UTC
What this source supports
- Codex app-server is the interface Codex uses to power rich clients (for example, the Codex VS Code extension).
- Use it when you want a deep integration inside your own product: authentication, conversation history, approvals, and streamed agent events.
- Non-loopback WebSocket listeners currently allow unauthenticated connections by default during rollout, so configure WebSocket auth before exposing one remotely.
- Codex CLI | ChatGPT Learn (opens in a new tab)
Project documentation · developers.openai.com · Undated · Source checked 2 Dec 2026, 16:09 UTC
What this source supports
- Inspect code, make changes, run commands, and automate repeatable work without leaving your terminal.
