Skip to content

Environment variables

Every FOX_AGENT_* variable is also reachable through config; env wins over both
config files and loses to CLI flags.

Provider

VariableMeaning
FOX_AGENT_MODELModel id
FOX_AGENT_BASE_URLProvider base URL
FOX_AGENT_API_KEYAPI key
FOX_AGENT_PROVIDERopenai-compatible / openai-responses / anthropic / google / a plugin name

These are also honored as fallbacks when the FOX_AGENT_* form is unset:

OPENAI_BASE_URL, OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY,
GOOGLE_API_KEY.

Turn loop

VariableMeaning
FOX_AGENT_MAX_STEPSTurn step cap (0 = unlimited)
FOX_AGENT_RETRY_LIMITRetry count on 429/5xx
FOX_AGENT_COMPACT_WARN_ATFraction of the window at which the header tells the agent to compact (default 0.8)
FOX_AGENT_COMPACT_CTX_ONLY_ATFraction at which every tool except ctx is disabled (default 0.9)
FOX_AGENT_REQUEST_TIMEOUT_MSTime without progress before a request is aborted (default 120000, 0 disables)
FOX_AGENT_TOOL_OUTPUT_CAPPer-tool-result character cap (default 30000, minimum 1000)
FOX_AGENT_READ_CAPread's ceiling before it refuses and asks for offset/limit (default 50000, minimum 1000)
FOX_AGENT_SEARCH_LIMITDefault glob/grep result cap (default 500)
FOX_AGENT_SEARCH_HIDDEN1/true/yes/on makes glob/grep include dotfiles
FOX_AGENT_DELEGATION_DEPTHCarried across the process boundary so nesting stops at 3. Set by the harness, not by you

Behaviour and state

VariableMeaning
FOX_AGENT_HOMEState dir — sessions, index, pty logs, materialized docs. Default ~/.local/share/fox-agent
FOX_AGENT_CONFIGOverride the global config path. Tests and sandboxes use this; the writer always goes through it
FOX_AGENT_DIAGNOSTICS0/false/no turns off post-edit diagnostics
FOX_AGENT_THEMETheme name, same as the theme config key
FOX_AGENT_REASONING_EFFORToff / minimal / low / medium / high / xhigh; ignored when the value is not one of those
FOX_AGENT_TRACEWrite the screen's frame dumps (<path>.grid) for TUI render bugs
FOX_AGENT_FRAMEPROFILEWrite per-frame phase timings for TUI performance work
FOX_AGENT_NO_TRUST_CHECK1 skips the trusted-directory prompt (scripts, CI). 0/false also skips. FOX_AGENT_TRUST_CHECK is the older spelling of the same switch
FOX_AGENT_NO_RESUME_HINTSuppress the "resume this session" hint on exit
FOX_AGENT_MODELS_OFFLINENever reach the network for the models.dev catalog
FOX_AGENT_MODELS_CACHEAlternate path for the catalog cache
FOX_AGENT_ANTHROPIC_CACHEControl Anthropic prompt caching

Network safety

VariableMeaning
FOX_AGENT_ALLOW_PRIVATE_FETCH1 lets the fetch tool reach loopback/private/link-local hosts. Off by default — see the security model

Terminal

NO_COLOR is respected by fox ls, fox plugin and fox --help, which paint
only when stdout is a TTY.