Codex
Run Codex through api.hanzo.ai with hanzo code codex: what is routed, what is not, and how to keep your own plan.
Set up
curl -fsSL hanzo.sh | sh
hanzo login
hanzo code codexGive it a task as one quoted argument to run it headless: hanzo code codex "port this module to the new store". Codex is its own tool here, never an alias of Hanzo Dev (hanzo code dev), which shares its driver.
What goes through Hanzo
With a signed-in account and no --no-route:
- Model calls go through Codex's
hanzoprovider athttps://api.hanzo.ai/v1, with your Hanzo token inHANZO_USER_KEY. The model isenso-autounless you set another with--modelor in~/.hanzo/settings.json. - Usage is metered into your org at api.hanzo.ai.
- The Hanzo toolset and your org's cloud tools are added as MCP servers through Codex's
-c mcp_servers.*overrides. Your ownconfig.toml, your servers and yourcodex loginare untouched, because the wrapper never repointsCODEX_HOME. - The session is registered in the cloud and, for a headless run, its events stream there. Pass
--no-linkto keep it local.
What does not
- Your
config.tomlwins where it sets a value. The wrapper addsapproval_policyandsandbox_modeonly when your file leaves them unset, and it keeps the workspace sandbox.--no-sandboxdrops the sandbox and approvals for one run;--askleaves Codex asking.
See usage and savings
A linked headless run prints the tokens Codex reported, the cached share and the cost at the listed price when it ends. Any other routed run prints the cloud's count for the session window. Then:
hanzo console # press 6 for Savings
hanzo usage summary --range 7dKeep your own plan
hanzo code codex --no-routeCodex uses its own login, ChatGPT plan or API key, and the wrapper leaves its environment alone. Hanzo meters none of that traffic.
Was this page useful?