How to Configure Multiple Codex Tools Without Crossing Wires: A Setup and Verification Guide for CC Switch, OpenCode, and WorkBuddy

How to keep Provider, Endpoint, and Key separate when you use Codex alongside CC Switch, OpenCode, and WorkBuddy, and how to use call records to keep your configs from crossing wires.

12 min read
How to Configure Multiple Codex Tools Without Crossing Wires: A Setup and Verification Guide for CC Switch, OpenCode, and WorkBuddy

AI Code With · Multi-Tool AI Coding Setup and Troubleshooting

Once you start running Codex, Claude Code, OpenCode, and WorkBuddy side by side, it's easy to get a very reasonable-sounding idea that often wrecks your configuration: since they all end up calling a model, can't you just copy the same Key, the same Base URL, and the same model name into each one?

In practice, it's the opposite. The more tools you have, the less you should read “unified” as “every config looks the same.” CC Switch can switch configs for you, OpenCode can connect to multiple model providers, and WorkBuddy can add custom models. But each one reads its own config, protocol, and Endpoint, and those are not the same.

What AI Code With is actually good at unifying here is the account, API Key management, model entry points, and call records, not forcing every client into the same protocol. The current AI Code With docs also treat Codex, OpenCode, CC Switch, and WorkBuddy as separate integration scenarios, and that boundary matters.

The backend can be unified, but client configs must stay separate. Less duplication does not mean copy and paste.

1. The Short Version: What Can Be Unified and What Must Stay Separate

If you split a multi-tool workflow into a “management layer” and an “execution layer,” a lot of problems get simpler right away.

What can be unified is the management layer

• Manage multiple model entry points under a single AI Code With account.

• Create and name API Keys per tool, for example codex-main, claude-main, opencode-main, and workbuddy-main.

• Check call time, Key, model, tokens, cost, and other records in one backend.

• When you need to switch models, you don't have to register a new upstream account and payment method for each tool.

What you can't force into one shape is the client protocol

• Codex uses its own Provider configuration, and in the AI Code With setup it uses the Codex-specific Endpoint.

• Claude Code reads Anthropic-style auth variables and a root URL.

• OpenCode defines Providers in opencode.json, and the current AI Code With examples use different SDKs such as OpenAI-compatible and Anthropic.

• WorkBuddy's “Add Model” is a WorkBuddy feature in its own right. AI Code With only provides the corresponding model API, Key, and call entry point.

• CC Switch is a third-party config switching tool. It helps you switch, but it won't turn different protocols into one protocol for you.

2. Why Doesn't One Account Mean One Base URL for Everything?

An API Key answers “who are you and are you allowed to call this.” The Base URL and protocol answer “where does the request go and what format does the other side expect.”

It's like four courier companies billing to the same corporate account while each one still has its own shipping labels, drop-off points, and sorting rules. A unified payment account doesn't mean the package format is unified too.

So when a config is wrong, you may see confusing symptoms: the Key isn't flagged as invalid and the network connects, but you get a 404, a format error, or model not found. Or the client shows the model name correctly, yet the backend has no matching call record at all.

For a 401, check authentication first. For a 404, check the Endpoint and protocol first. For model not found, check the Model ID. Don't swap the Key every time as your first move.

3. One Table for the Entry Point Differences Across Codex, Claude Code, OpenCode, and WorkBuddy

Tool / ScenarioMain config locationAI Code With EndpointKey point
Codex CLI / App~/.codex/auth.json + config.tomlhttps://api.aicodewith.ai/chatgpt/v1Responses / wire_api = responses
Claude Code (CC Switch may switch to this config)~/.claude/settings.json, etc.https://api.aicodewith.aiANTHROPIC_AUTH_TOKEN + ANTHROPIC_BASE_URL
OpenCode~/.config/opencode/opencode.jsonhttps://api.aicodewith.ai/v1Configure per Provider SDK; don't substitute the Codex-specific Endpoint
WorkBuddy - ChatGPT-type modelsWorkBuddy Settings → Models → Add Modelhttps://api.aicodewith.ai/v1Enter the API Key + a currently valid Model ID
WorkBuddy - Claude-type modelsWorkBuddy Settings → Models → Add Modelhttps://api.aicodewith.aiUse the Claude entry point, which is not the same as the Codex config

What to remember isn't the five URLs. It's that these clients aren't reading the same configuration at all. The URL is just the result; the protocol and client behavior are the cause.

4. The Approach That Actually Saves Effort: One Backend, With a Clear Name for Every Chain

For long-term multi-tool setups, I'd recommend “one account, different Keys, different config names” over stuffing one master Key everywhere.

codex-main

claude-main

opencode-main

workbuddy-main

Likewise, don't name a Provider just custom, test, or new. A week later you won't know which one is which. A more practical approach is to put the tool and purpose in the name:

aicodewith-codex-dev

aicodewith-claude-review

aicodewith-opencode-project-a

The point isn't tidiness, it's giving your troubleshooting some evidence. When a chain fails, go to the backend and look up records by the matching Key and time. If there's a record, the request reached the platform. If there isn't, check whether your local config actually took effect.

5. CC Switch: Its Biggest Convenience Is Switching, and So Is Its Biggest Risk

CC Switch is useful for managing and switching Provider configs across different clients. It suits people who often move between Codex, Claude Code, and similar tools, but “saved successfully” doesn't mean the target client is running with the right protocol.

The most common mistake is filling in Codex and Claude Code with the same URL. If both connect through AI Code With, the addresses in the current docs are different by design.

The Codex chain

toml
base_url = "https://api.aicodewith.ai/chatgpt/v1"
wire_api = "responses"

Codex needs its own dedicated Endpoint and the Responses route. Don't paste the regular API address into Codex just because the regular API also has /v1.

The Claude Code chain

json
"ANTHROPIC_AUTH_TOKEN": "你的_API_KEY"
"ANTHROPIC_BASE_URL": "https://api.aicodewith.ai"

Claude Code's root URL is shorter than Codex's. That isn't an inconsistency in the tutorials; the two clients simply expect different paths.

Back up your existing config before switching. After switching, don't jump straight into a large project. Have Codex run one small read-only request, then have Claude Code run an equivalent small request, and check each one in Usage Records.

6. Codex + OpenCode: In a shared repo, the working tree gets crossed before the models do

Using Codex and OpenCode in the same project adds more than one command. It adds a second set of Providers, default models, config files, and call records.

AI Code With The OpenAI-compatible / Kimi and other Providers in the current OpenCode docs use:

https://api.aicodewith.ai/v1

Codex, on the other hand, uses:

https://api.aicodewith.ai/chatgpt/v1

Both addresses contain v1, but they are not the same endpoint. In particular, don't copy OpenCode's Base URL straight into Codex just because OpenCode can call a model without problems.

There's another layer that config tutorials often skip: check your Git status before switching tools. Unifying the API entry point does not automatically handle two Agents editing the same working directory.

git status

git diff

If Codex has already changed half the code and you switch to OpenCode to keep making large edits, it becomes hard to tell who changed what. A safer approach is to commit or stash first, or at least tell the next tool which changes must be kept and which files are off limits.

7. Codex + WorkBuddy: Less repetition only works if you don't treat product capabilities as the same thing

Both WorkBuddy and Codex may show Base URL, API Key, and Model Name in their config screens, which makes it tempting to think you can just copy the same values over. What you can actually reuse is the model account and the way you manage Keys, not the features of the tools themselves.

WorkBuddy's office, task execution, and Agent capabilities belong to WorkBuddy. Codex's code understanding, file editing, and command execution belong to Codex. What AI Code With provides in the middle is the model API, Keys, and a verifiable call entry point.

Connecting WorkBuddy to ChatGPT-type models

text
接口地址:https://api.aicodewith.ai/v1
API Key:<YOUR_KEY>
模型名称:从当前模型页 / 接入教程复制

The current WorkBuddy integration docs explicitly give the endpoint for ChatGPT-type models as /v1. Don't guess the Model ID from the display name in the dashboard. It's safer to copy it from the current model page or the matching tutorial on the day you publish or configure.

Connecting WorkBuddy to Claude-type models

text
接口地址:https://api.aicodewith.ai
API Key:<YOUR_KEY>
模型名称:从当前教程复制

Within the same WorkBuddy, Claude and ChatGPT-type models may use different addresses. This is another reminder not to look for a so-called universal Base URL.

8. A realistic workday: all four tools work, so how do you know none are crossed?

Say you use Codex to modify a project in the morning, switch to Claude Code through CC Switch for a Review at noon, try another model in OpenCode in the afternoon, and handle an office task in WorkBuddy in the evening. All four tools can appear to "answer," but that doesn't mean all four requests went through the route you expected.

I record a very simple piece of verification evidence for each chain:

TimeToolKey nameExpected result
09:30Codexcodex-mainA matching Codex call appears in the dashboard
11:10Claude Code / CC Switchclaude-mainA matching Claude call appears in the dashboard
14:20OpenCodeopencode-mainA related OpenCode model call appears in the dashboard
18:00WorkBuddyworkbuddy-mainA matching model request appears in the dashboard

If the first three have records and only WorkBuddy doesn't, don't reset all your Keys. The problem is already narrowed down to WorkBuddy. Check whether the custom model is actually selected, whether the address matches the current model type, whether the Key is correct, and whether the Model ID is valid.

Independent evidence from each tool matters more than memorizing more config parameters.

9. A minimal verification method: validate one chain at a time

After your first setup, don't immediately test with a complex project. When a complex task fails, you won't be able to tell whether it's a model capability issue, an Agent behavior issue, or an API config issue.

1. Back up the config that currently works. Don't wipe the original official login or old Provider in one go.

2. Configure only one new tool / Provider.

3. Give it a clear Key name.

4. Run a small task with no side effects, such as explaining the README or answering a simple question.

5. Record the test time.

6. Go to AI Code With Usage Records and look up the matching request by time and Key.

7. Check that the model, tokens, cost, and so on match what you expect.

8. Once everything checks out, move on to your real workflow.

10. When only one side fails, troubleshoot layer by layer instead of reconfiguring everything

SymptomCheck firstDon't start by
401 / Invalid API keyThe tool's own Key, the auth variable, and whether the Key was disabled or actually readDon't switch models first
404 / wrong pathThe client's Base URL, Endpoint, and protocolDon't keep creating new Keys
model not foundThe currently valid Model ID, the Key's model restrictions, and default config overridesDon't change other tools' configs
The client looks normal but the dashboard has no recordWhether the Provider / custom model actually took effect, and whether the request reached the expected platformDon't trust only the model name shown in the UI
Only one side of CC Switch failsThe failing tool's own config file and protocolDon't rewrite both the Codex and Claude setups
OpenCode works, Codex failsCodex-specific /chatgpt/v1 + ResponsesDon't reuse OpenCode's /v1
WorkBuddy saves successfully but makes no callsThe currently selected custom model, the address for the model type, and the Model IDDon't assume the integration is done just because the save succeeded

11. Does every tool need its own Key? Not necessarily

"Different Keys for different tools" is long-term management advice, not a hard rule.

If you're only trying OpenCode or WorkBuddy once, a low-quota test Key is perfectly fine. Just disable or revoke it when you're done.

But if several tools are in daily use, the value of splitting Keys becomes clearer: cleaner cost attribution, a smaller blast radius if one Key leaks, and easier model / channel / quota limits by purpose.

Don't design a simple workflow like a microservice architecture from the start. But don't wait until all four tools are tangled together to think about attribution, either.

12. One last thing: a unified model entry point is not a unified Agent workflow

AI Code With can serve as the model API and management entry point for these tools, but it won't manage project context between Codex, OpenCode, WorkBuddy, or Claude Code, and it won't automatically handle Git conflicts, repo permissions, or Agent division of labor.

If two Agents both need to modify the same repo, I'd recommend defining responsibilities at the workflow level: one implements, the other does Review. Or isolate them by branch / workspace. In the end, the Git diff, tests, and manual acceptance decide which version to keep.

This is also what separates a well-built multi-tool workflow from "a pile of installed AI tools": more tools doesn't mean more professional. What matters is that every layer knows what it's responsible for.

13. When is this unified approach most worth it?

• You use Codex, Claude Code, OpenCode, WorkBuddy, or other tools that support custom APIs over the long term.

• You switch between models often and don't want to maintain multiple upstream accounts separately.

• You want to separate call records and costs by tool / project.

• You need dashboard records to tell whether a given request actually reached the expected Provider.

• You're willing to name your configs, back them up, and run a minimal acceptance check, rather than just chasing "one-click switching."

If you only use one tool long term and its official login already covers everything you need, adding a Provider layer may just raise your maintenance cost. A unified entry point is only worth it if it actually cuts down on repeated management instead of creating a new configuration burden.

14. Run through this checklist before you finish configuring

□ I know which config file or settings entry each client actually reads.

□ Codex uses its own dedicated Endpoint and Responses configuration.

□ Claude Code is not mistakenly using Codex's /chatgpt/v1.

□ The Provider Base URL used in OpenCode has not been copied directly into Codex.

□ WorkBuddy's Claude and ChatGPT model addresses are separated according to the current docs.

□ Tools I use long term already have clear Key and Provider names.

□ Every chain has run at least one minimal request, instead of relying on a "saved successfully" message.

□ I can find the matching call records in the dashboard by time, Key, and model.

□ I checked the Git working tree before switching Codex or OpenCode.

□ I haven't described the capabilities of third-party tools as product features of AI Code With.

15. Real stability isn't making every config identical

CC Switch, OpenCode, and WorkBuddy all look like they're doing the same thing, getting more models into your tools, but they sit in different places. CC Switch manages config switching, OpenCode is a standalone AI coding client, WorkBuddy is an office Agent workspace, and Codex has its own Provider and execution system.

So the most reliable approach is not to hunt for one universal config, but to separate management from protocol:

One account

↓

Separate Keys by tool or purpose

↓

Each client uses its own Endpoint and protocol

↓

Verify with real call records

↓

Handle Git, Agent division of labor, and final acceptance at the workflow layer

Unify the dashboard, keep the protocols separate. Cut down on repeated configuration, but don't mash different tools into one tangled setup.

If you're connecting these tools through AI Code With , follow the dedicated tutorial for each one, and don't copy a Base URL from another tool. Get one chain working first, then add the next. It saves more time in the long run.

Related reading

• How to configure a Codex API Key: what the Key, Base URL, Provider, and model each do

• How to use Codex, Claude Code, and Gemini CLI together

• How to connect Kimi K3 to Codex: configuration, verification, and cost control

• What is Codex auth.json: location, risks, and safe troubleshooting

• How to configure Codex MCP: from a minimal connection to a safe rollback

Sources and verification notes

AI Code With docs home: https://docs.aicodewith.ai/zh/docs

AI Code With Codex: https://docs.aicodewith.ai/zh/docs/codex-cli

AI Code With Claude Code: https://docs.aicodewith.ai/zh/docs/claude-code-cli

AI Code With OpenCode: https://docs.aicodewith.ai/zh/docs/opencode-aicodewith

AI Code With WorkBuddy AI: https://docs.aicodewith.ai/zh/docs/WorkBuddy-AI

AI Code With CC Switch: https://docs.aicodewith.ai/zh/docs/cc-switch

Related articles

What is the UI SDK, and how do you use it? Vercel and shadcn's behavior library for agents, installed and tested in Claude Code / Codex / Cursor (0.1.0-beta.1)

What is the UI SDK, and how do you use it? Vercel and shadcn's behavior library for agents, installed and tested in Claude Code / Codex / Cursor (0.1.0-beta.1)

The UI SDK is Vercel's behavior library for agents, released on 12 November 2026 as 0.1.0-beta.1. Behaviors live in the framework-free @ui-sdk/core package and are rendered by adapters for React, Vue, Svelte, Solid, and Web Components. This guide follows the official docs on what it is, how to install it, and how to add the skill for Claude Code, Codex, and Cursor, and it records the commands, timings, and output from our test machine.

What Is AWS Emulator and How Do You Install It? Test AWS Apps Locally with Claude Code and Codex (Tested on 1.0.322)

What Is AWS Emulator and How Do You Install It? Test AWS Apps Locally with Claude Code and Codex (Tested on 1.0.322)

AWS Emulator is AWS's official local emulator of its service APIs, generally available since November 11, 2026 (US time). It has no additional service fee, its source is open, it needs no AWS account, and it covers more than 200 services. We tested version 1.0.322 on Debian 13. This guide covers the install commands, pointing the AWS CLI at the local endpoint to create an S3 bucket and a DynamoDB table, the errors we hit, and how to let Claude Code, Codex and Cursor write and test code against the emulator.

What Is T3 Code and How Do You Install It? Connect Claude Code and Codex, Use a Third-Party API Key, Fix Common Errors (Tested on 0.1.9)

What Is T3 Code and How Do You Install It? Connect Claude Code and Codex, Use a Third-Party API Key, Fix Common Errors (Tested on 0.1.9)

T3 Code is pingdotgg's open-source control surface for coding agents. It ships no model of its own; it drives the Claude Code, Codex, Cursor and other CLIs already on your machine. We tested T3 Code 0.1.9 on Linux. This guide covers the install commands, how to point Claude Code and Codex at an AICodeWith API Key so T3 Code can drive them, a full run of both agents with the t3 thread command, and the errors we hit along the way with their fixes.

    How to Configure Multiple Codex Tools Without Crossing Wires: A Setup and Verification Guide for CC Switch, OpenCode, and WorkBuddy | AI Code With