Cross-tool · Tested with aisw v0.3.10 · Desktop v0.2.1 · Updated September 10, 2026
Switch Four Coding-Agent Accounts Together
Create a context that maps one named profile for Claude Code, Codex CLI, Gemini CLI, and Antigravity CLI, then run `aisw context use <name>` to switch the complete setup. Each tool can keep its own profile name, and aisw applies the mapped accounts in one transactional operation.
When a project uses more than one coding agent, changing accounts one tool at a time creates an easy failure mode. You switch Claude Code, forget Codex CLI, and start the repository with a mixed identity. An aisw context gives the whole setup one name.
Before you start
Install aisw and create the individual profiles first. You can import accounts that are already active or add them through each provider’s native sign-in flow:
aisw initaisw add claude acme-claude --from-liveaisw add codex acme-codexaisw add gemini acme-geminiaisw add antigravity acme-antigravity --from-liveThe profile names do not need to match the account email, provider name, or context name. Choose names that make the boundary obvious.
Create the four-tool context
Map the profile for each tool under one reusable context name:
aisw context create client-acme \ --claude acme-claude \ --codex acme-codex \ --gemini acme-gemini \ --antigravity acme-antigravityInspect the mapping before activating it:
aisw context show client-acmeIf one provider is not part of this project, omit that mapping. A context only changes the tools it contains.
Switch all four accounts
Activate the context from any directory:
aisw context use client-acmeaisw statusaisw resolves the mapped profiles, snapshots the affected live state, applies the changes in a deterministic order, and commits the active metadata after the complete operation succeeds. If one tool cannot be switched, the operation reports the failure and rolls back the earlier writes.
Verify before opening the repository
Use machine-readable output when another shell function or script needs to inspect the result:
aisw status --jsonaisw verifyFor a hard repository boundary, bind the repository to the context and enable strict guard mode:
cd ~/code/client-acmeaisw workspace bind . --context client-acmeaisw workspace guard --mode strictThat check protects the location as well as the account switch. If you later enter a personal repository with a different context active, the shell hook can warn or block before a coding agent launches.
Desktop method
AI Switcher Desktop exposes the same context mappings in a visual interface. Open the Sets or Contexts view, select client-acme, inspect the four mapped profiles, and activate the set. The active and live-match indicators make it clear whether every provider reached the expected state.

Antigravity CLI remains visible as a shared-state tool. That means its saved account is part of the context, while its upstream runtime state is not claimed to be isolated per profile. Use the workspace guard when the account boundary matters most.
Common problems
If context create reports that a profile does not exist, create or rename the missing profile first, then run context set client-acme --<tool> <profile>.
If only some tools change, inspect the context mapping with aisw context show client-acme. A tool omitted from the context is intentionally left untouched.
If verification reports drift after a provider refreshes its credentials, use the provider’s native sign-in flow and capture the live account again with aisw add <tool> <profile> --from-live, then update the context if necessary.
If a repository guard blocks the launch, run aisw workspace status to see the expected context and activate it with aisw context use <name> before launching the coding agent.
Frequently asked questions
Do all four tools need to be included in every context?
No. A context can map any subset of the supported tools. Include all four when a work or client setup needs Claude Code, Codex CLI, Gemini CLI, and Antigravity CLI to move together; leave a tool out when it should remain unchanged.
Can the profile names differ across tools?
Yes. The context name is the reusable setup name, while each mapping points to the profile that exists for that specific tool.
Does Antigravity CLI use isolated state in a context?
Antigravity CLI is currently supported through shared live switching because upstream does not document an isolated auth root. aisw still saves named profiles and applies the selected Antigravity account as part of the context operation.
