DEV Community

Evan-dong
Evan-dong

Posted on

Codex Now Works from Your Phone — Plus Hooks and CI/CD Tokens

Codex Now Works from Your Phone — Plus Hooks and CI/CD Tokens

Codex mobile in the ChatGPT app

I run Codex for long refactoring tasks. The annoying pattern: start a job, step away, come back to find Codex has been waiting 40 minutes for me to approve a permission check.

The May 2026 updates fix that, along with a few other gaps I cared about.

The Three Things That Matter

1. Mobile access (preview, May 14)

Codex is now available in preview on the ChatGPT mobile app for iOS and Android. Your phone connects to the Codex session running on your Mac — you review diffs, approve commands, switch models, and follow terminal output from wherever you are. The code stays on the host machine.

Setup: latest ChatGPT app + Codex for Mac → scan QR code to pair.

2. Hooks (GA, May 14)

You can now inject custom scripts at 6 points in the Codex loop. The one I found most useful: PreToolUse to scan Bash commands for credential patterns before they execute.

# ~/.codex/config.toml
[[hooks.PreToolUse]]
matcher = "^Bash$"

[[hooks.PreToolUse.hooks]]
type = "command"
command = "python3 ~/.codex/hooks/scan_credentials.py"
timeout = 30
Enter fullscreen mode Exit fullscreen mode

The hook receives JSON on stdin with the command about to run, and can return {"decision": "block", "reason": "..."} to stop it.

Other hook events: SessionStart, PostToolUse, PermissionRequest, UserPromptSubmit, Stop. Enterprise teams can push managed hooks via requirements.toml.

Caveat: hooks do not intercept all shell calls yet per the docs.

3. Access tokens (Business/Enterprise, May 5)

If you run Codex in CI/CD, you no longer need to fake an interactive login. Access tokens carry workspace identity:

export CODEX_ACCESS_TOKEN="<token>"
codex exec --json "run tests and report coverage"
Enter fullscreen mode Exit fullscreen mode

Business and Enterprise only. Tokens expire (configurable) and show up in governance logs under the creating user.

Also Shipped

  • Remote SSH (GA): connect Codex to managed dev environments through a relay — no public SSH port needed
  • HIPAA compliance: for eligible Enterprise workspaces in local environments

The Multi-Agent Problem Remains

These features make Codex better. But if you also use Claude Code and Gemini CLI, you still have three API keys, three dashboards, no fallback between them.

All three CLIs support custom endpoints:

# Codex: ~/.codex/config.toml
[api]
base_url = "https://api.evolink.ai/v1"
Enter fullscreen mode Exit fullscreen mode
# Claude Code
export ANTHROPIC_BASE_URL="https://api.evolink.ai"
Enter fullscreen mode Exit fullscreen mode
# Gemini CLI: ~/.gemini/.env
GOOGLE_GEMINI_BASE_URL=https://api.evolink.ai/
Enter fullscreen mode Exit fullscreen mode

One gateway → unified cost, automatic fallback on 429/5xx, model switching via routing rules.

Setup guide for routing all three CLIs →

References

Top comments (0)