Reference
Environment variables
Coincide starts agents with your login shell’s environment, plus a few variables of its own. This page lists the variables that matter to you: those you can set for Coincide, those your agents and scripts receive, and those Coincide sets for agent accounts.
Updated
What agents start with
Coincide reads your login shell’s environment once, as a new Terminal window would, and starts every agent with it. It adds the usual install folders to PATH and removes variables that would make an agent think it’s running inside another Claude Code session, for when you start Coincide from one. On each agent’s page in Settings, Environment Variables adds your own on top, for example a custom base URL.
Variables Coincide reads
| Variable | Effect |
|---|---|
COINCIDE_DATA_DIR | Use this folder instead of ~/Library/Application Support/Coincide for Coincide’s data, its worktrees and Antigravity’s profile. Meant for testing; see data storage. |
COINCIDE_CONTROL_SOCKET | Read by the coincide command: the socket to talk to. --socket overrides it. |
COINCIDE_THREAD_ID | Read by the coincide command: the thread this means. |
COINCIDE_AGENT_HOST=1 | In a Debug build from source, use the background agent host instead of running agents in the app. |
CLAUDE_CONFIG_DIR, CODEX_HOME | Where File › Import CLI Session… looks for Claude Code and Codex histories, when set in Coincide’s own environment. |
Variables Coincide gives agents
| Variable | When | Value |
|---|---|---|
PATH | While Command-line control is on | Gains the folder with the coincide tool inside Coincide.app |
COINCIDE_CONTROL_SOCKET | While Command-line control is on | The socket of the Coincide that started the agent |
COINCIDE_THREAD_ID | While Command-line control is on | The agent’s own thread, so coincide … this works |
BW_SESSION | When you connected Bitwarden and turned on Let agents use your unlocked password managers in Settings › Browser | Bitwarden’s unlocked session, so the agent’s bw can read your vault without unlocking it |
Agents already running get BW_SESSION when they next start. Leave that setting off unless you want agents to read any item in your Bitwarden vault without asking.
Variables for your shell and scripts
| Variable | Where | Meaning |
|---|---|---|
COINCIDE_RESOLVING_ENVIRONMENT=1 | Your shell’s startup files, while Coincide reads your environment | Lets a slow .zshrc skip work Coincide doesn’t need. Agents never see it. |
COINCIDE_PROJECT_ROOT | Project scripts run from the terminal | The project’s folder |
COINCIDE_WORKTREE_PATH | Project scripts, when the thread has its own worktree | The worktree’s folder, for example to copy .env into it |
T3CODE_PROJECT_ROOT, T3CODE_WORKTREE_PATH | Project scripts | The same values under T3 Code’s names, so scripts from t3.json work unchanged |
Variables Coincide sets for agent accounts
The default account of each agent uses its tool’s own settings. For each account you add, Coincide sets the variable that moves the tool’s sign-in to a folder of that account, or the one that carries its API key. It also clears API-key variables your shell exports for that agent, so the account uses only its own sign-in.
| Agent | Sign-in folder | API key |
|---|---|---|
| Claude Code | CLAUDE_CONFIG_DIR | ANTHROPIC_API_KEY |
| Codex | CODEX_HOME | OPENAI_API_KEY, saved in that CODEX_HOME with codex login --with-api-key |
| Cursor | — | CURSOR_API_KEY |
| Grok Build | GROK_HOME | XAI_API_KEY |
| OpenCode | XDG_DATA_HOME | OPENCODE_API_KEY (OpenCode Zen), or ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, XAI_API_KEY, GROQ_API_KEY, DEEPSEEK_API_KEY or MISTRAL_API_KEY |
| Antigravity | — | GEMINI_API_KEY |
Keys come from the Keychain and go only into that agent’s process. More in Accounts and API keys.