Skip to content

Environment Variables

Complete reference for all environment variables that PanCode reads or writes.

These variables can be set in your shell, .env file, or system environment.

VariableDescriptionExample
PANCODE_MODELOrchestrator model (provider/model-id)localhost-ollama/llama3.2
PANCODE_WORKER_MODELDefault worker modeldynamo-ollama/codellama
PANCODE_SCOUT_MODELScout model overridelocalhost-ollama/llama3.2
PANCODE_DEFAULT_MODELAlias for PANCODE_MODELlocalhost-ollama/llama3.2
VariableDescriptionDefault
PANCODE_SAFETYSafety level: suggest, auto-edit, full-autoauto-edit
PANCODE_REASONINGReasoning preference: off, minimal, low, medium, high, xhighmedium
PANCODE_THINKINGBackward-compatible alias for PANCODE_REASONING(none)
PANCODE_THEMETUI theme namedark
PANCODE_PROFILEConfig profile namestandard
PANCODE_PROJECTWorking directory override(cwd)
PANCODE_HOMEBase directory for user config~/.pancode
PANCODE_TIMEOUT_MSDefault timeout in milliseconds120000
PANCODE_PROMPTDefault prompt textlist files...
PANCODE_TOOLSDefault tool set (comma-separated)read,bash,grep,find,ls
VariableDescriptionDefault
PANCODE_BUDGET_CEILINGSession budget ceiling in dollars10.0
PANCODE_PER_RUN_BUDGETPer-dispatch cost cap in dollars(none)
PANCODE_DISPATCH_MAX_DEPTHMaximum recursion depth for dispatch2
PANCODE_WORKER_TIMEOUT_MSWorker timeout override in milliseconds(uses timeoutMs)
PANCODE_MAX_RUNSMaximum run history entries (ring buffer)500
PANCODE_MAX_METRICSMaximum metric history entries (ring buffer)1000
PANCODE_STARTUP_BUDGET_MSBoot time budget before warning3000
VariableDescriptionExample
PANCODE_LOCAL_MACHINESAdditional machines for engine discoverymini=192.168.86.141,dynamo=192.168.86.143
ANTHROPIC_API_KEYAnthropic API key for Claude modelssk-ant-...
OPENAI_API_KEYOpenAI API keysk-...
VariableDescriptionDefault
PANCODE_DEFAULT_AGENTDefault agent for dispatchdev
PANCODE_STRICT_TIERSEnforce strict tier matching (set to “1”)(off)
PANCODE_HEARTBEAT_INTERVAL_MSWorker heartbeat interval in milliseconds10000
VariableDescriptionDefault
PANCODE_VERBOSEEnable verbose logging to stderr(off)
PANCODE_INTELLIGENCEEnable intelligence domain (set to “enabled”)(off)

PanCode sets these automatically. Do not override them unless you understand the implications.

VariableDescription
PANCODE_PACKAGE_ROOTAbsolute path to PanCode installation directory
PANCODE_BIN_PATHPath to the loader script
PANCODE_HOMEUser config directory (default: ~/.pancode)
PANCODE_AGENT_DIRAgent engine directory (~/.pancode/agent-engine)
PI_CODING_AGENT_DIRPi SDK agent directory (defaults to PANCODE_AGENT_DIR)
PANCODE_ENTRYPOINTBoot target: orchestrator or other
VariableDescription
PANCODE_INSIDE_TMUXSet to "1" when running inside PanCode tmux session
PANCODE_PRESETName of the active boot preset
PANCODE_SESSION_IDUnique session identifier
PANCODE_RUNTIME_ROOTPath to .pancode/runtime/
PANCODE_ENABLED_DOMAINSComma-separated list of loaded domain names
PANCODE_EFFECTIVE_THINKINGResolved thinking level for current model
PANCODE_BUDGET_SPENTCurrent session spend (updated on each dispatch)
PI_SKIP_VERSION_CHECKSet to "1" to suppress Pi SDK version checks
VariableDescription
PANCODE_DISPATCH_DEPTHCurrent recursion depth (incremented per dispatch level)
PANCODE_RUN_IDWorker’s run identifier
PANCODE_AGENT_NAMEName of the agent spec this worker uses
PANCODE_BOARD_FILEPath to shared board file for coordination
PANCODE_CONTEXT_FILEPath to context registry file
PANCODE_PARENT_PIDPID of the parent orchestrator process

PanCode reads a .env file from the project root at startup. Existing environment variables are not overwritten.

.env
PANCODE_MODEL=localhost-ollama/llama3.2
PANCODE_WORKER_MODEL=dynamo-ollama/codellama
PANCODE_SCOUT_MODEL=localhost-ollama/llama3.2
PANCODE_BUDGET_CEILING=25.00
PANCODE_LOCAL_MACHINES=mini=192.168.86.141,dynamo=192.168.86.143
ANTHROPIC_API_KEY=sk-ant-...

Format: one KEY=VALUE per line. Lines starting with # are comments. Empty lines are skipped.