Codex CLI
Route the OpenAI Codex CLI through MarkDB.
Codex CLI (>= 0.135) speaks the OpenAI Responses API. MarkDB serves that surface and dispatches it natively to whatever provider you choose.
Codex anchors its work to the directory you run it from. Match that with one MarkDB workspace per repo: export that workspace's key before running Codex inside the repo, and its captured work (and recall) stays scoped to that workspace.
Install
npm i -g @openai/codexConfigure
Add a MarkDB provider to ~/.codex/config.toml:
model = "gemini-3.6-flash"
model_provider = "markdb"
[model_providers.markdb]
name = "MarkDB Proxy"
base_url = "https://proxy.markdb.cloud/v1"
env_key = "MARKDB_API_KEY"
wire_api = "responses"Then export your key and run Codex from inside the repo:
export MARKDB_API_KEY=mk_live_xxx # this workspace's key; keep it out of files
codex exec "list the files here and tell me how many are .go files"Use wire_api = responses
Codex 0.135+ only supports the Responses API. MarkDB translates the Responses wire format (including tool calls) to the underlying provider, so you can run Codex against Gemini or Anthropic, not just OpenAI.
Verify
Run a multi-turn task (codex exec then codex exec resume --last). In the
Work log you should see the whole agentic loop as one
chat thread, with tool_call and tool_result events captured.