Prompt Codex with the SDK
Use the machine ID for the computer where you normally run Codex. Its local Codex installation must already be authenticated. Configure the caller with CMDOP_URL, CMDOP_TOKEN and CMDOP_MACHINE
as described in the checkout instructions.
The token needs the read and agent grants.
From the root of the public SDK checkout, run:
ONLY=prompt-codex AGENT_PROMPT=1 bash examples/run.shThe runner selects the Python and TypeScript examples for Codex. Each caller
checks that the named agent is available and sends a text-only prompt asking
for CMDOP_AGENT_OK. A completed response must identify codex and contain
the expected text. If the task is still running, read its output using the returned task number. If Codex is busy, wait for it to become available.
Python source · TypeScript source · Agent sessions and tasks