In short.
The Codex App Server documentation is a guide for developers embedding Codex in their own interfaces, with a significant authentication restriction for commercial or hosted services. It describes how to launch the server, initialize a connection, manage conversations, stream agent output and respond to approval requests. Its detailed protocol examples and version-specific schema generation are useful foundations for a custom client. Integration requires handling server requests as well as responses and notifications. WebSocket transport is experimental and unsupported, several APIs require explicit experimental access, and some execution methods bypass the Codex sandbox. Costs, exact licensing conditions and operational performance are not established. No examples or commands were executed.
Researched and written by an AI model and checked by a second AI model. How it works
The scope is the complete supplied selected-page.txt capture from [https://learn.chatgpt.com/docs/app-server.md]. It includes the page's authentication restriction, experimental transport warnings, execution boundaries and API deprecation notices. Linked repository files, SDK documentation, licensing materials and Sign in with ChatGPT documentation are excluded. Descriptions and examples were assessed as documentation only; installation, runtime behavior, security, performance, costs and production operation were not tested.
The overview
Identity
The page documents codex app-server, the interface used to power rich Codex clients such as the Codex VS Code extension. Its scope includes authentication, conversation history, approvals, streamed agent events, command execution and integrations. The source address is [https://learn.chatgpt.com/docs/app-server.md].
The page describes the implementation as open source and links to [https://github.com/openai/codex/tree/main/codex-rs/app-server]. The repository contents are outside the supplied evidence.
Assessment
This is a useful reference for building an interface that shows agent progress, preserves conversations and lets users approve work. It provides concrete request shapes, lifecycle rules, error states and a Node.js/TypeScript client example.
The documented handshake, event stream and server-initiated approval requests imply substantial client implementation work. The page supports understanding the interface, but provides no measured evidence of reliability, latency, scalability or integration effort.
Intended users
The main audience is developers building custom Codex interfaces, including editor integrations and other products that need conversation history, authentication and approval controls. Enterprise integrations also receive specific guidance about client identification for compliance logs.
Beginners can use the thread, turn and item explanations to understand the architecture. Implementing a client requires familiarity with asynchronous messages, process or socket communication, authentication and application state.
Documented capabilities
Conversation APIs cover creating, resuming, forking, listing, organizing and archiving threads. Clients can start, steer or interrupt agent turns and receive incremental messages, tool activity, file changes and final status. Pagination APIs support loading stored history without resuming a conversation.
The page also documents account state, model discovery, usage limits, review requests, command execution, filesystem operations, skills, apps and MCP connections. Availability varies: some features are experimental, some methods are under development, and token-activity summaries exclude API-key-only and Bedrock authentication.
Using it
Requirements
The examples assume the codex executable is available and that a client can launch it or connect to its configured transport. The supplied client example uses Node.js/TypeScript; the protocol itself is described through JSON messages rather than a required client language.
Model access depends on the account, client and provider. The example model is gpt-6.1-sol, but clients should discover available choices through model/list. OpenAI authentication requirements depend on the active provider. Minimum CLI version, hardware requirements and a complete installation procedure are not established by this page.
How it works
The protocol uses bidirectional JSON-RPC 2.0 messages with the jsonrpc header omitted. Requests carry an id, responses echo it, and notifications omit it. Standard input/output uses one JSON message per line; WebSocket transport uses one message per text frame. Unix sockets carry WebSocket connections using an HTTP Upgrade handshake.
A thread is a conversation, a turn is one user request and the resulting agent work, and an item is an individual message or action. Clients must continue reading events after starting a turn and answer server requests when needed. The authoritative completed item arrives through item/completed; turn/completed reports whether the turn completed, failed or was interrupted.
Setup
The documented local starting point is codex app-server, which defaults to standard input/output. After connecting, send initialize with client metadata, wait for its response, then send initialized. Start or resume a thread, begin a turn and keep processing incoming messages.
Generate matching client definitions with codex app-server generate-ts --out ./schemas or codex app-server generate-json-schema --out ./schemas. These artifacts match the CLI version used to generate them. Experimental methods and fields require capabilities.experimentalApi during initialization.
For remote WebSocket access, configure authentication before exposing the listener and protect the connection with TLS. The page recommends token files or environment-variable references instead of raw tokens on command lines.
Example use
The supplied Node.js/TypeScript example launches codex app-server, reads newline-delimited JSON from stdout and sends initialize. After initialization, it sends initialized and thread/start. Once a thread id is returned, it submits the text “Summarize this repo.” through turn/start.
The example logs incoming messages and checks turn/completed for a successful final status. It handles protocol and process errors, but does not demonstrate an approval interface or a complete interactive client. This is a documented example; it was not run.
Assessment & evidence
Limitations
WebSocket transport is explicitly experimental and unsupported. The page warns that non-loopback WebSocket listeners currently allow unauthenticated connections by default during rollout. Remote exposure therefore needs explicit authentication configuration and transport protection.
Execution boundaries differ by method. command/exec runs under the server sandbox, while thread/shellCommand and experimental process APIs run outside the Codex sandbox. Clients need to account for those documented differences when exposing execution controls.
The plugin listing, reading, installation and removal methods are under development and explicitly discouraged for production clients. Other fields require experimental access, and several history interfaces are deprecated or have storage-mode restrictions.
Integration tradeoffs
The interface offers control over how conversations, agent activity and approval decisions appear in a product. That control comes with responsibility for message dispatch, lifecycle state, pending server requests and failure handling. This implementation burden is an inference from the documented protocol.
Runtime discovery and version-matched schemas matter because model availability varies and the API includes experimental and deprecated surfaces. An acknowledgement that a request was accepted does not establish that the resulting agent turn succeeded; clients need to inspect its final status.
Alternatives described by the page
For automated jobs or CI, the page recommends the Codex SDK at [https://learn.chatgpt.com/docs/codex-sdk]. Its linked documentation is excluded, so its detailed capabilities, costs and requirements are not assessed here.
For an existing terminal interface connected to a remote server, the page documents the Codex CLI's --remote option. This can fit a terminal workflow without building a custom graphical client. Sign in with ChatGPT is the separately linked authentication route for commercial or hosted use cases.
Evidence and confidence
The evidence is the supplied capture of [https://learn.chatgpt.com/docs/app-server.md], recorded at 2026-11-12T21:26:53.779Z. It contains protocol descriptions, operational warnings and illustrative command, TypeScript and JSON examples.
The captured source revision is sha256:b9e75507755ba0be2ebc615ca1f4399a54a386125f3935f615405ea93efe77f2. The documentation supports claims about the described interface, but does not establish observed behavior, security assurance, performance or deployment readiness. No installation, commands, examples or end-to-end client journeys were executed.
Access & freshness
Costs and limits
The page supplies no prices, billable rates or deployment cost estimates. Total cost is unknown. It does not establish what any particular account plan includes for the intended integration.
Account endpoints expose ChatGPT rate-limit information, token-activity summaries and, when available, earned rate-limit resets. Their example values illustrate response structures rather than actual account entitlements. Token counts and quota percentages do not establish monetary cost.
Rights and authentication restrictions
The page calls the implementation open source but includes no license text. Exact code license conditions and permission to redistribute the documentation are unknown from this evidence.
Its authentication notice states that app-server authentication has never been permitted for commercial or hosted services. Existing local or open-source applications using that authentication may continue, although migration to Sign in with ChatGPT is recommended. The page points commercial and hosted use cases toward [https://developers.openai.com/siwc]; the linked service's terms and eligibility are outside the supplied evidence.
Freshness and compatibility
The capture is dated 12 November 2026. The supplied page does not establish a publication date, last-update date, pinned Codex release or implementation commit. Its descriptions therefore represent this captured snapshot.
Compatibility needs particular attention around experimental features and changing history APIs. The page marks full-history responses as deprecated for paginated threads and says thread/rollback has been removed. Generated schemas match the installed CLI version, which provides a concrete basis for implementing that version's message shapes.
Practical next steps
First determine whether the intended work needs a custom interactive client or the automation path recommended through the SDK. For commercial or hosted deployment, resolve the authentication route before relying on the app-server account endpoints.
For a custom client, generate schemas from the intended CLI version, discover available models and implement the local initialization, thread and turn lifecycle. Add approval handling, final-status checks and error presentation before expanding to remote connections or experimental APIs.
Evaluate authentication, interrupted and failed turns, pending approvals and transport failures in the intended environment. WebSocket clients also need to handle overload error -32001 with exponential retry delays and jitter. The supplied evidence contains no results from these validations.
