Skip to content
Docs

Environment Variables

Environment variables control CodeForge runtime behavior. They can be set in devcontainer.json, the settings.json env block, your shell profile, or per-session on the command line.

Variables that control Claude Code’s core behavior inside the CodeForge container.

VariableDescriptionDefaultSet In
ANTHROPIC_MODELPrimary Claude model IDclaude-opus-4-6settings.json
ANTHROPIC_DEFAULT_OPUS_MODELOpus model IDclaude-opus-4-6settings.json
ANTHROPIC_DEFAULT_SONNET_MODELSonnet model IDclaude-sonnet-4-5-20250929settings.json
ANTHROPIC_DEFAULT_HAIKU_MODELHaiku model IDclaude-haiku-4-5-20251001settings.json
CLAUDE_CONFIG_DIRClaude Code configuration directory/home/vscode/.claudedevcontainer.json
CLAUDE_CODE_MAX_OUTPUT_TOKENSMaximum tokens per response64000settings.json
MAX_THINKING_TOKENSMaximum tokens for extended thinking63999settings.json
CLAUDE_CODE_SHELLShell used for Bash tool executionzshsettings.json
CLAUDE_AUTOCOMPACT_PCT_OVERRIDEContext usage percentage that triggers auto-compaction95settings.json
CLAUDE_CODE_DISABLE_AUTO_MEMORYDisable automatic memory features (0 = enabled)0settings.json

Variables that configure Claude Code’s multi-agent team capabilities.

VariableDescriptionDefaultSet In
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSEnable Agent Teams feature1settings.json
CLAUDE_CODE_ENABLE_TASKSEnable structured task trackingtruesettings.json
CLAUDE_CODE_EFFORT_LEVELResponse effort level (low, medium, high)highsettings.json
CLAUDE_CODE_PLAN_MODE_INTERVIEW_PHASEEnable interview phase in plan modetruesettings.json
CLAUDE_CODE_PLAN_V2_AGENT_COUNTNumber of agents in plan mode v23settings.json
CLAUDE_CODE_PLAN_MODE_REQUIREDRequire teammates to run in plan mode until approvedtruesettings.json

Variables that control timeouts, output sizes, and concurrency.

VariableDescriptionDefaultSet In
BASH_DEFAULT_TIMEOUT_MSDefault timeout for Bash tool commands (ms)240000settings.json
BASH_MAX_TIMEOUT_MSMaximum allowed Bash timeout (ms)600000settings.json
BASH_MAX_OUTPUT_LENGTHMaximum Bash output length (chars)15000settings.json
TASK_MAX_OUTPUT_LENGTHMaximum Task tool output length (chars)64000settings.json
MAX_MCP_OUTPUT_TOKENSMaximum MCP server output tokens10000settings.json
MCP_TIMEOUTMCP server connection timeout (ms)120000settings.json
MCP_TOOL_TIMEOUTIndividual MCP tool call timeout (ms)30000settings.json
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCYMaximum concurrent tool calls5settings.json
CLAUDE_CODE_MAX_RETRIESMaximum retries for failed API calls1settings.json

Variables that control CodeForge’s plugin system and features.

VariableDescriptionDefaultSet In
FORCE_AUTOUPDATE_PLUGINSAuto-update plugins on session start1settings.json
ENABLE_TOOL_SEARCHTool search mode and limitauto:5settings.json
ENABLE_CLAUDE_CODE_SM_COMPACTEnable smart compaction1settings.json
CLAUDE_CODE_FORCE_GLOBAL_CACHEForce global prompt cache1settings.json

Variables set by the DevContainer environment that define workspace paths.

VariableDescriptionDefaultSet In
WORKSPACE_ROOTWorkspace root directory/workspacesdevcontainer.json
CLAUDE_CONFIG_DIRClaude configuration directory/home/vscode/.claudedevcontainer.json
GH_CONFIG_DIRGitHub CLI configuration directory/workspaces/.ghdevcontainer.json
TMPDIRTemporary files directory/workspaces/.tmpdevcontainer.json
CLAUDECODESet to null to unset the detection flag, enabling nested Claude Code sessionsnulldevcontainer.json

Variables that configure individual tools within the container.

VariableToolDescription
CCMS_PROJECTccmsDefault project scope for session search (only when ccms is enabled)
CCMS_FORMATccmsDefault output format (text, json) (only when ccms is enabled)
RUFF_CONFIGruffPath to ruff configuration file
BIOME_CONFIG_PATHbiomePath to biome configuration file

These variables live in .devcontainer/.env and control what setup.sh does on each container start. Copy .env.example to .env and customize.

VariableDefaultDescription
CLAUDE_CONFIG_DIR/home/vscode/.claudeWhere Claude Code config files are stored
CODEFORGE_DIR(auto-detected)Source directory for user-customizable config files (.codeforge/). Replaces the deprecated CONFIG_SOURCE_DIR from v1.x.
SETUP_CONFIGtrueCopy config files per file-manifest.json
SETUP_ALIASEStrueAdd cc/claude/ccraw/cc-tools aliases to shell
SETUP_AUTHtrueConfigure Git/NPM auth from .secrets file
SETUP_PLUGINStrueInstall Anthropic plugins and register local marketplace
SETUP_UPDATE_CLAUDEtrueBackground-update Claude Code CLI binary
SETUP_TERMINALtrueConfigure VS Code Shift+Enter keybinding for Claude Code terminal
SETUP_PROJECTStrueAuto-detect projects for VS Code Project Manager
SETUP_POSTSTARTtrueRun post-start hooks from /usr/local/devcontainer-poststart.d/
PLUGIN_BLACKLIST""Comma-separated plugin names to skip during installation

Variables for language runtimes installed in the container.

VariableDescription
UV_PYTHONPython version used by uv
VIRTUAL_ENVActive virtual environment path
PYTHONPATHPython module search path
NVM_DIRnvm installation directory
NODE_VERSIONActive Node.js version
BUN_INSTALLBun installation directory

There are four ways to set environment variables, listed from lowest to highest precedence.

Applied when the container is created. Persists across all sessions.

{
"remoteEnv": {
"WORKSPACE_ROOT": "/workspaces",
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
}
}

Applied when Claude Code starts. These are set inside the env block.

{
"env": {
"ANTHROPIC_MODEL": "claude-sonnet-4-5-20250929",
"CLAUDE_CODE_EFFORT_LEVEL": "medium"
}
}

Add to ~/.zshrc or ~/.bashrc. Applied for every new shell session.

Terminal window
export CLAUDE_MODEL="claude-sonnet-4-5-20250929"

Set on the command line when launching Claude Code. Overrides everything else.

Terminal window
ANTHROPIC_MODEL="claude-sonnet-4-5-20250929" cc

Here are the environment variable changes you are most likely to make:

GoalVariableValue
Use Sonnet instead of OpusANTHROPIC_MODELclaude-sonnet-4-5-20250929
Increase Bash timeout for long buildsBASH_DEFAULT_TIMEOUT_MS600000
Reduce auto-compact aggressivenessCLAUDE_AUTOCOMPACT_PCT_OVERRIDE85
Disable extended thinking(remove alwaysThinkingEnabled from settings.json)
Limit concurrent tool callsCLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY3
  • Configuration — settings.json structure and file manifest
  • Commands — commands that use these variables
  • Architecture — how configuration layers interact at runtime