1Code brings together multiple AI coding agents in one unified interface. Switch between Claude Code, Codex, and custom models without changing tools or workflows.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/21st-dev/1code/llms.txt
Use this file to discover all available pages before exploring further.
Why It Matters
Different agents have different strengths:- Claude Code excels at complex refactoring and architectural changes
- Codex offers advanced planning with structured proposals
- Custom models let you bring your own API keys and providers
- Use the right agent for each task
- Compare approaches from different models
- Switch providers without losing context
- Bring your own API keys (BYOK) for any provider
Available Agents
Claude Code
Claude Code is Anthropic’s official coding agent, integrated directly into 1Code. Setup:- Go to Settings → Accounts
- Click “Connect Claude Code”
- Sign in with your Anthropic account or import an existing token
- Full access to Claude 3.5 Sonnet and other Anthropic models
- Native tool support for file editing, bash commands, and web search
- OAuth integration for secure authentication
- Multi-account support for switching between workspaces
src/main/lib/trpc/routers/claude-code.ts:109) manages OAuth flows and token storage using Electron’s secure storage.
Codex
Codex is an AI coding agent from Zed Industries, featuring advanced planning capabilities. Setup:- Go to Settings → Accounts
- Click “Connect Codex”
- Sign in with your ChatGPT account or use an API key
- GPT-5.3 Codex model with high-quality reasoning
- Built-in plan mode with structured proposals
- API key authentication for direct access
- Session persistence across restarts
src/main/lib/trpc/routers/codex.ts:1) uses the Agent Communication Protocol (ACP) to communicate with the Codex binary.
Custom Models (BYOK)
Bring your own API keys to use any OpenAI-compatible provider. Supported Providers:- OpenAI (GPT-4, GPT-4o, o1)
- Anthropic (Claude via API key)
- Google Gemini
- Any OpenAI-compatible endpoint
- Go to Settings → Models
- Add your API key
- Configure base URL (for custom providers)
- Select your model
Switching Between Agents
In the UI
Per-Chat Configuration
Each chat can use a different agent. This is useful for:- Testing the same prompt with multiple models
- Delegating specific tasks to specialized agents
- Comparing output quality across providers
Agent Marketplace
Custom agents can be loaded from:- User agents:
~/.claude/agents/ - Project agents:
.claude/agents/in your repo - Plugin agents: Installed via the plugin marketplace
src/main/lib/trpc/routers/agents.ts:17) and can be referenced with @agent-name in chat.
Best Practices
Choose the Right Agent
- Use Claude Code for general coding tasks and refactoring
- Use Codex when you need structured planning before execution
- Use custom models for specialized domains or cost optimization
Compare Outputs
Fork a chat at any message to try the same prompt with a different agent.
Set Project Defaults
Configure default agents per project in
.claude/config.jsonRelated Features
- Plan Mode - Structured planning with Codex
- MCP Integration - Extend agents with custom tools
- Worktree Isolation - Run agents in isolated environments