Environment variables

Every SMITH_ variable and GOMEMLIMIT that smith reads or sets, what reads it, and what it changes.

Each variable has what reads it (file:line) and its effect. Names ending in _ are prefixes: smith builds the full name from a run input, a task id or a server name. "Not checked" means the code read for this page does not settle it.

Two variables are explained on their own pages and not covered here: SMITH_DESK_HOME is the shell data folder, see where smith keeps its files; SMITH_ALLOW_VOLATILE_ROOTS lets a launch use a temporary folder, see troubleshooting.

01the core and the desk#

variable read by effect
GOMEMLIMIT applyDeskMemoryLimit, smith desk sets a soft limit of a quarter of the machine's memory (MemTotal), at least 512 MiB and at most 2 GiB, unless this is set and not empty, in which case the Go runtime's own value stands. See the desk command.
SMITH_PPROF_ADDR resolveDeskPprofAddr, address for a pprof listener on its own mux; used when --pprof-addr is empty. A non-loopback address is refused and the core fails to start.
SMITH_CANVAS_STATIC_DIR staticFiles, serve the pages from this directory instead of the copy built into the binary, so a page change is a reload. A dev setting.
SMITH_DESK_APP_VERSION set by the shell for the core, the app's version, handed to the core it spawns. What reads it in the core is not checked.
SMITH_CORE coreBinary, the smith binary the shell runs as the core; wins over the bundled one. A dev setting.
SMITH_DEBUG_PORT debugPort, a valid port (1 to 65535) opens the app's devtools port on 127.0.0.1, and wins over the desktop.json debug_port setting even when that is off.

02model providers#

variable read by effect
SMITH_ANTHROPIC_API_KEY NewAnthropicProvider; the Anthropic API key; takes precedence over the config file's. With neither, it fails with "no Anthropic API key configured". Checks run with a synthetic, non-secret value of this name, never yours.
SMITH_ANTHROPIC_ENDPOINT the API base url; default https://api.anthropic.com.
SMITH_OLLAMA_ENDPOINT NewOllamaProvider; the ollama url; else the config file's value; else http://localhost:11434.
SMITH_CLAUDE_DISABLE_PLUGINS comma-separated claude plugin names to switch off, added to the built-in list. A claude protocol error names it when a plugin needs switching off.
SMITH_KEEP_PATH AdoptLoginPath, on macOS smith adopts the login shell's PATH at start; SMITH_KEEP_PATH=1 keeps the process PATH as it is. Does nothing off macOS.
SMITH_HOME_VISIBLE , 138 not an environment variable that is read: it is a marker line the isolation probe prints when its sandboxed unit still sees the real home. It shows up in the probe's note "the unit still saw the real home".

03memory, knowledge and tickets#

variable read by effect
SMITH_MEMORY_DIR defaultContextFactory, registers the memory context source on the memory renderer, rooted here. Unset, no memory source. See the ticket harness.
SMITH_MEMORY_RENDERER the renderer executable, optional when memory-render is already on PATH.
SMITH_MEMORY_ENDPOINT defaultMemorySource, the memory renderer's read API url for the canvas memory rack; unset, there is none.
SMITH_MEMORY_BEARER_TOKEN the bearer token for that API; kept by the smith process, not sent to the browser (see the memory rack text in the MCP control plane).
SMITH_KNOWLEDGE_DIR registers the knowledge source; a node names exact files inside this folder. smith harness run --knowledge takes files from it.
SMITH_TICKETS_ENDPOINT smith runs index --endpoint default, 94 the tickets MCP endpoint that run history is indexed into. Required for runs index.
SMITH_TICKETS_TOKEN the tickets bearer token for the same command.
SMITH_TRACKER_TOKENS ; parseTrackerTokens, comma-separated name=token or plain tokens the tracker's /mcp accepts as bearer. Unset, /mcp is open and the tracker logs a warning.
SMITH_DISCORD_BOT_TOKEN DefaultDiscordTokenEnv, 196-199 the discord bot token, when desk.json discord.token_env names no other variable. Else discord.token_file is read.
SMITH_TEST_PG_DSN , 47 tests only: the postgres connection string tests use. Unset, a postgres:17 container is started, and the test skips when none can be.

04conductor sessions#

variable read by effect
SMITH_DESK_BEARER , 213 set for a codex conductor session: the desk's launch token, named as the desk MCP server's bearer_token_env_var. An inherited value is dropped.
SMITH_DESK_CONV , 214 set for a codex session: the conversation id, sent as the conversation header.
SMITH_MCP_ codexExtraBearerEnv, prefix for an extra MCP server's token: SMITH_MCP_<NAME>_BEARER, the server name upper-cased with every other character turned into _. An inherited SMITH_MCP_*_BEARER is dropped before the session's own are set.

05shell tasks#

Smith sets these for a task's shell script (internal/executor/shell.go). They are for the legacy task-tree commands in the command line page.

variable set by effect
SMITH_INPUT_ prefix; SMITH_INPUT_<NAME> for each run input entry, on root tasks only. The stdin entry goes to stdin instead.
SMITH_DEP_ prefix; SMITH_DEP_<ID> holds the canonical output file path of each sibling dependency.
SMITH_PARENT_OUTPUT the parent's output file path: output/task/result.md for a two-phase parent, else its canonical output.
SMITH_SOURCE_PATH for module-backed tasks where the source differs from the runtime path.
SMITH_CONTEXT_DIR the materialized static context directory, when the task has static context.
SMITH_TOOL_ID buildEnv, the id of the shell tool being run.