Receive SMS inside a Codex task
Give a Codex coding task a receiving number so it can reproduce a phone-verified flow, add the missing test step, and report the application outcome.
Put the skill in the repository Codex uses
npx skills add https://www.phonekit.io --skill phonekit --agent codex --copyRun the installer from the repository Codex is working in. The installer copies Phonekit into .agents/skills, which Codex discovers in the repository. In the CLI or IDE, select $phonekit or browse /skills; in the desktop app, select the skill with its mention picker. The current skills guide describes discovery and invocation.
Start a new Codex session if the skill does not appear. Commit the instruction file if teammates or cloud tasks should receive it with the repository. It contains no Phonekit key.
Choose a Phonekit connection
Use the CLI route below, or hosted MCP on a deployment where it is enabled. Skill installation does not authorize inbox access.
Connect through the CLI
npx phonekit@latest docs agents
npx phonekit@latest login --wait 50
npx phonekit@latest number listOpen the printed approval link, check its short code, and select the numbers this connection may read. Exit code 8 means approval is still pending; repeat the login command to resume the same request. Node.js 20.3 or newer is required. Use the quickstart to name the intended number for the project.
A local task can use browser approval. An unattended task needs its selected-number key in that environment's secret configuration. A cloud checkout does not inherit the local machine's approved CLI connection.
Connect through Codex MCP
For an enabled hosted deployment, use Codex's own MCP commands:
codex mcp add phonekit --url https://www.phonekit.io/api/mcp
codex mcp login phonekit
codex mcp listApprove the workspace, actions and line selections in Phonekit's browser flow. In a new Codex CLI session, /mcp lists the active server and tools. Codex manages this connection's OAuth credentials separately from the Phonekit CLI login. See Codex's MCP guide.
The skill uses an authenticated MCP connection when available, otherwise the CLI. Use one route for the workflow. Public hosted setup is awaiting acceptance in Codex; use the CLI until that check is complete. Cloud tasks need their own runtime connection.
Ask Codex to close a specific coverage gap
Use the phonekit skill to inspect our current sign-in acceptance test. Add the Phonekit SDK receiving step using the assigned staging number. Capture the position before the app sends, wait at most 120 seconds, and assert the existing signed-in page. Preserve our provider setup. Run the scoped test and report whether failure was send, receive, extract or verify; do not include the code.
Useful task output
The relevant test change, its execution result, and a clear final assertion. If the run cannot reach the application or its secrets are absent, report that setup dependency before diagnosing SMS delivery.
Follow the SDK installation guide before asking Codex to implement an SDK test.
Carry the test into unattended runs
Keep the SDK call in the test runner so CI does not depend on an interactive chat session. Use the GitHub Actions workflow to provide the key and serialize a shared destination. A Codex plugin or skill installs instructions and tools in its own environment; see the ChatGPT guide for hosted chat connection requirements.
Questions you may have
Should the key go in AGENTS.md?
Put workflow instructions and the number label in repository context. Supply the key through the environment’s secret configuration. The skill file and project aliases can travel with the repository without a credential.
Why does it work locally but fail in a cloud task?
Check Node availability, network access, the application URL and the cloud task’s selected-number credential. A local approval is stored on the local runtime; cloning the repository does not copy it.
Can Codex operate the browser too?
Use the browser or test tools available in your Codex environment. Phonekit supplies the receiving step. The task still needs a way to interact with the application and confirm its final state.
Can a fresh position separate two parallel Codex tasks?
It separates new receipts from older ones. Two simultaneous sends to one number can still cross. Give tasks independent numbers or serialize their verification steps.