Updated:

Codex FAQ

Here are common questions and solutions when using Codex.

For help, choose a channel under pre-sales and after-sales support.

Base URL and routes

The examples use the Mainland China route, https://api-lb.cubence.ai/v1. For global use, set the Base URL to https://api.cubence.ai/v1; outside Mainland China, you can use https://api.cubence.com/v1. Keep /v1 and any request path when switching routes. See API endpoints and Base URL configuration.


Usage Tips

What to do if the model feels dumber?

Answer quality can depend on task clarity, model choice, and available context. Suggestions:

  1. Task decomposition: Break complex requirements into small, modular tasks, instead of submitting vague requests like "help me build a management system"
  2. Keep key information clear: State the current goal and acceptance criteria, and correct stale or conflicting details; do not use a fixed context percentage to judge task scope
  3. Understand context management: Compaction summarizes history, so keep important decisions in project documents. See Codex context management and check experimental feature eligibility first
How to improve usage efficiency?
  1. Describe requirements clearly and specifically
  2. Do one thing at a time
  3. Start new conversations in time to avoid overly long context
  4. Use AGENTS.md file to add global prompts

Configuration Issues

What to do about encoding issues on Windows?

Enable UTF-8 locale setting in Windows system settings:

  1. Open "Settings" → "Time & Language" → "Language & Region"
  2. Click "Administrative language settings" → "Change system locale"
  3. Check "Beta: Use Unicode UTF-8 for worldwide language support"
  4. Restart your computer
How to resolve 401 error?

401 error usually indicates API Key configuration issues:

  1. Check if API Key in auth.json file is correct
  2. Confirm API Key format is correct without extra spaces or quotes
  3. Confirm API Key has not expired in Cubence console
How to resolve 403 error?

403 error usually indicates account access or request permission issues:

  1. Check if Cubence account balance is sufficient
  2. Confirm the API key has access to the selected model and group
  3. Wait a few minutes and retry
How to switch models?

Modify the model field in config.toml file, for example:

model = "gpt-5"

Available models include gpt-5, codex-max, etc. Check Cubence console for specific supported models.


Other Issues

What to do about connection failure?
  1. Check if network connection is normal
  2. Confirm base_url uses your selected route with /v1, such as https://api-lb.cubence.ai/v1 for Mainland China
  3. If using a proxy, ensure proxy configuration is correct
  4. Try turning off VPN or proxy and retry
What to do if tokens are consumed too fast?
  1. Reduce the content length of each request
  2. Start new conversations in time to avoid overly long context
  3. Use more concise prompts
  4. Consider using MCP tools (like Serena, Desktop-Commander) to optimize file operations