Editor Extensions
Codex · IDE
The editor extension reads Codex user configuration and uses a custom Responses provider.
The vendor documents custom endpoints. Check model capabilities and verify the connection.
On this page
Before you begin
Install the official OpenAI Codex extension. It shares user configuration with the CLI; check the home directory used during remote development.
Have an A2Agent API key ready and copy an accessible model ID from the catalog. Replace every placeholder, back up existing settings and keep keys out of repositories.
Setup
File contents are usually shared; switching OS changes commands and paths. For WSL on Windows, select macOS / Linux.
01Install and open configuration
Install the extension from the official IDE page, then open config.toml through its settings.
Open official documentation02Add a provider
Back up your user config.toml. Merge these fields while preserving existing settings; put top-level fields before TOML tables.
~/.codex/config.tomlmodel = "YOUR_MODEL_ID" model_provider = "a2agent" [model_providers.a2agent] name = "A2Agent" base_url = "https://a2agent.me/v1" env_key = "A2AGENT_API_KEY" wire_api = "responses"03Pass the key to the editor
Set A2AGENT_API_KEY in the OS or the environment launching the editor, then fully quit and restart it. Exporting it in an already-open integrated terminal generally cannot update the extension process.
Shellexport A2AGENT_API_KEY='YOUR_A2AGENT_API_KEY' code .
Capabilities and limits
- Chat Completions cannot replace Responses here. Do not append /responses to base_url.
- The Codex editor extension may read the same user configuration. Record the previous provider and model before editing.
Verify the connection
Replace every placeholder and run locally. Expect JSON containing OK. Then start a new client conversation, test one read-only tool call separately, and confirm the requests in A2Agent usage records. This test incurs a small amount of model usage.
curl --fail-with-body --silent --show-error --max-time 60 'https://a2agent.me/v1/responses' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_A2AGENT_API_KEY' \
-d '{"model":"YOUR_MODEL_ID","input":"Reply with OK."}'Troubleshooting
If env_key is missing, fully quit the editor and launch from the configured terminal. Remote extensions need the environment set remotely.
401 / 403: authentication or access denied
Use a key issued by A2Agent, without extra spaces, and check that it is active and unexpired. Confirm the group permits the model and protocol. A vendor subscription credential cannot replace an A2Agent key.
404 / model not found: endpoint or model mismatch
Check the root URL, /v1 prefix and full request path against this guide; avoid duplicated paths. Model IDs are case-sensitive and must be accessible to the current key.
429: quota or rate limit
Check your balance, key limits, concurrent usage and service status. Wait before retrying and reduce simultaneous agents; repeated retries do not remove a quota limit.
Chat works, but tools fail or streaming stops
Test a short text request, then a single read-file tool call. Check tool support, output budget, proxy timeouts and client version. Inspect the diff before resuming a long task to avoid repeating actions.
Restore previous settings
Restore the previous model and model_provider, remove the a2agent table, and close the terminal containing the key.
Sources and check date
Status is based on official configuration docs, not end-to-end client testing with A2Agent.
Docs checked 2026-09-18
