Skip to Content

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

OptionDescriptionDefault
--model <MODEL>Model to useagent default
--prompt <TEXT>Prompt text (alternative to positional)
--acpLaunch in ACP mode (Codex, Claude, Opencode, Goose only)false
--non-interactiveSingle-turn executionfalse
--sandboxEnable sandboxfalse
--account <NAME>Credential account
--cwd <PATH>Working directorycurrent dir
--mcp-config <PATH>MCP configuration file

MCP Convenience Flags

FlagServer
--puppeteerPuppeteer browser automation
--githubGitHub API
--context7Context7 library docs
--linearLinear issue tracker
--jiraJira / Atlassian
--slackSlack messaging
--discordDiscord messaging
--teamsMicrosoft Teams

Desktop and Browser

FlagDescription
--webEnable 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-auto

Examples

# 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"