ah codex
Launch the OpenAI Codex agent directly.
ah codex [PROMPT] [OPTIONS] [-- AGENT_ARGS...]This is a shorthand for ah agent start --agent codex. All direct agent launchers (ah claude, ah copilot, ah gemini, ah goose, ah amp, ah cursor, ah opencode, ah qwen) share the same option surface.
Options
| Option | Description | Default |
|---|---|---|
--model <MODEL> | Model to use | agent default |
--prompt <TEXT> | Prompt text (alternative to positional) | — |
--acp | Launch in ACP mode (Codex, Claude, Opencode, Goose only) | false |
--non-interactive | Single-turn execution | false |
--sandbox | Enable sandbox | false |
--account <NAME> | Credential account | — |
--cwd <PATH> | Working directory | current dir |
--mcp-config <PATH> | MCP configuration file | — |
MCP Convenience Flags
| Flag | Server |
|---|---|
--puppeteer | Puppeteer browser automation |
--github | GitHub API |
--context7 | Context7 library docs |
--linear | Linear issue tracker |
--jira | Jira / Atlassian |
--slack | Slack messaging |
--discord | Discord messaging |
--teams | Microsoft Teams |
Desktop and Browser
| Flag | Description |
|---|---|
--web | Enable web search |
--desktop [NAME] | Enable desktop automation session |
--browser [PROFILE] | Enable browser profile (default: “default”) |
Passthrough Arguments
Arguments after -- are passed verbatim to the underlying agent CLI:
ah codex "Fix the build" -- --full-autoExamples
# Interactive session
ah codex
# Non-interactive with prompt
ah codex "Fix the failing test" --non-interactive
# With MCP servers
ah codex --github --context7 "Add GitHub integration"
# ACP mode
ah codex --acp "Refactor the parser"