Codex Local CLI E2e
Testing & Qualitycodex-local-cli-e2eCodex Local CLI E2e is an Agent Skill for testing & quality published in the rebornix/Agmente repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Run and debug Agmente iOS end-to-end tests against a real local Codex CLI app-server instance. Use when validating Codex websocket/protocol compatibility, connect/initialize/thread flows, or reproducing Codex-only UI test failures with an actual local Codex server.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/rebornix/Agmente/blob/HEAD/.agents/skills/codex-local-cli-e2e/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/codex-local-cli-e2e, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Codex Local CLI E2E
Overview
Run Agmente's Codex UI E2E test against a real local codex app-server, using the repo-owned scenario spec as the source of truth, collect actionable failure details, and always clean up simulator/app-server state.
Workflow
- Resolve run inputs.
- Require
endpoint(for examplews://127.0.0.1:8788) and simulatorUDID. - Decide run mode:
existing server: server already running.managed server: start server with a provided command and stop it during cleanup.
- Read
e2e/scenarios/codex/local-cli-smoke.md. - Use
references/agmente-codex-e2e-contract.mdonly for the UI-test environment-variable harness contract.
- Start or verify server.
- If
managed server, start the command and wait until the endpoint port is reachable. - If
existing server, verify reachability before running tests.
- Run only the Codex UI E2E test.
- Export:
AGMENTE_E2E_CODEX_ENABLED=1AGMENTE_E2E_CODEX_ENDPOINT=<endpoint>
- Execute targeted test only:
AgmenteUITests/AgmenteUITests/testCodexDirectWebSocketConnectInitializeAndSessionFlow
- On failure, extract root cause.
- Parse
xcodebuildoutput for the failing test and assertion. - Read
.xcresultdetails whenxcodebuildis not explicit. - Include failing file/line and endpoint/simulator context in the report.
- Always clean up.
- Stop app-server if this run started it.
- Uninstall app from simulator:
xcrun simctl uninstall <UDID> com.example.Agmente
- Optionally shut simulator down if requested.
Preferred Execution
Use the bundled script for deterministic runs:
scripts/run_codex_local_e2e.sh
Managed-server example:
scripts/run_codex_local_e2e.sh \
--endpoint ws://127.0.0.1:8788 \
--udid <SIMULATOR_UDID> \
--start-codex-cmd "codex app-server --listen ws://127.0.0.1:8788"
Existing-server example:
scripts/run_codex_local_e2e.sh \
--endpoint ws://127.0.0.1:8788 \
--udid <SIMULATOR_UDID>
Reporting Requirements
Always report:
- Endpoint used.
- Simulator UDID used.
- Pass/fail status.
- Failing assertion and file/line (if failed).
- Paths to
xcodebuildlog and Codex server log.