PacketBenchDocs

Environment variables#

PacketBench reads environment variables in two very different roles, and the distinction decides whether a variable is any use to you. Most are developer and release-engineering overrides consumed by the Rust host or by a build script; a handful are provider endpoints that a saved setting outranks. Separately, and easy to confuse with them, PacketBench sets a small number of variables on the child processes it spawns — those are not configuration you supply.

This page indexes every variable the source reads, alphabetically, with its consumer and its value when unset; then it lists, separately, the variables PacketBench writes into a child's environment.

Variables PacketBench reads#

Ordered alphabetically, case-insensitively. Consumed by names the process that reads it and the file that does the reading. Default is the value used when the variable is unset or blank; means there is no default and the absence changes nothing on its own.

Variable Consumed by Default Effect
APPDATA Rust host, src-tauri/src/lib.rs:63 C:\ProgramData Windows log-directory base, used only when LOCALAPPDATA is also unset.
APPLE_API_ISSUER scripts/release-readiness.mjs:312 Counted as a macOS notarization signal. Presence only; the value is never read or logged.
APPLE_API_KEY scripts/release-readiness.mjs:311 Counted as a macOS notarization signal, and read by Tauri's bundler during a notarized build.
APPLE_API_KEY_PATH scripts/release-readiness.mjs:313 Counted as a macOS notarization signal.
APPLE_CERTIFICATE scripts/release-readiness.mjs:302 Counted as a macOS code-signing signal.
APPLE_CERTIFICATE_PATH scripts/release-readiness.mjs:303 Counted as a macOS code-signing signal.
APPLE_ID scripts/release-readiness.mjs:308 Counted as a macOS notarization signal.
APPLE_PASSWORD scripts/release-readiness.mjs:309 Counted as a macOS notarization signal.
APPLE_SIGNING_IDENTITY scripts/release-readiness.mjs:300 Counted as a macOS code-signing signal.
APPLE_TEAM_ID scripts/release-readiness.mjs:301 and :310 Counted as both a code-signing and a notarization signal.
CARGO_TARGET_DIR scripts/release-readiness.mjs:147 [build] target-dir in src-tauri/.cargo/config.toml, then cargo metadata, then src-tauri/target Bundle-root resolution for the artifact checks. The provenance of the choice is printed in the report header.
CI Playwright, playwright.config.ts:17 unset Any value forbids test.only, sets 1 retry and 1 worker, selects the github reporter, and stops the runner reusing an already-running dev server.
CLAUDE_HOME Rust host, src-tauri/src/core/agents_md.rs:126 ~/.claude Root of the user-level Claude home walked for CLAUDE.md and AGENTS.md. Mirrors Codex's CODEX_HOME for parity.
ComSpec scripts/prune-sidecar.js:148 cmd.exe Command interpreter used to invoke pnpm.cmd on Windows.
DISPLAY Rust host, src-tauri/src/core/ssh_askpass.rs:88 When unset, PacketBench sets DISPLAY=:0 on the ssh child so OpenSSH honours SSH_ASKPASS instead of prompting on a TTY that is not there.
HOME Rust host, src-tauri/src/core/shared.rs:18 Home directory, consulted only after USERPROFILE. Determines the data directory and, on Linux and macOS, the log directory.
LOCALAPPDATA Rust host, src-tauri/src/lib.rs:62 falls through to APPDATA Windows log-directory base.
NODE_OPTIONS scripts/prune-sidecar.js:138 empty Inherited by the spawned pnpm, with --trace-deprecation filtered out and --no-deprecation appended, so the prune step's output stays parseable.
PACKETBENCH_ACP_ENGINE Rust host, src-tauri/src/acp/mod.rs:718 PATH scan, then the documented install directories, then the bare name packetcode Absolute path to the ACP engine binary. A path pinned in Settings → Provider Endpoints outranks it, and the value is taken verbatim — no existence or executable-bit check — so a wrong path fails loudly at spawn.
PACKETBENCH_ACP_INSTALL_URL Rust host, src-tauri/src/acp/install.rs:158 this platform's compile-time install URL Overrides the engine installer URL. Validated before use; a value carrying a disallowed character is rejected rather than fetched.
PACKETBENCH_ASKPASS_FILE Rust host re-invoking itself, src-tauri/src/core/ssh_askpass.rs:20 Internal. Path to the single-use secret file the askpass helper reads. Set by PacketBench on the ssh child; setting it yourself has no supported meaning.
PACKETBENCH_CUSTOM_COMPAT_URL Rust host, src-tauri/src/core/storage.rs:990 — (no built-in default) Base URL for the custom OpenAI-compatible provider. A saved endpoint wins. With neither, the provider is unconfigured and callers fail with a Settings pointer rather than inventing a host.
PACKETBENCH_DEV_SIDECAR Rust host, src-tauri/src/commands/agent_sidecar/supervisor.rs:1438 unset 1 or true makes a release build honour PACKETBENCH_SIDECAR_PATH and PACKETBENCH_NODE_PATH. Debug builds honour them unconditionally. Both the refusal and the honoured override are logged.
PACKETBENCH_E2E_OLLAMA_MODEL Rust test, src-tauri/tests/ollama_e2e.rs:44 qwen2.5-coder:7b Model the Ollama end-to-end test requests. The test skips with a message when the model is absent from /api/tags.
PACKETBENCH_GITHUB_CLIENT_ID Rust host, src-tauri/src/commands/github.rs:547 the baked GITHUB_OAUTH_CLIENT_ID, which is empty in this tree OAuth App client id for the GitHub device flow. With neither set, the browser sign-in option is hidden and the connect step is the token field alone.
PACKETBENCH_LIVE_ANTHROPIC_SMOKE Sidecar test, agent-sidecar/test/anthropic-multi-turn-smoke.mjs:45 unset Exactly 1 runs the live provider round trip. Any other value, including unset, skips it.
PACKETBENCH_MCP_PROBE_TIMEOUT_MS Node sidecar, agent-sidecar/src/mcp-capability.ts:56 30000 Per-server MCP capability probe budget, read at call time so a slow host can raise it without a rebuild. The probe fails closed — every tool on that server becomes unavailable — so this is the knob for a legitimate server being denied on a slow machine.
PACKETBENCH_MINIMAX_URL Rust host, src-tauri/src/core/storage.rs:1137 https://api.minimax.io/v1 MiniMax base URL. A saved endpoint wins.
PACKETBENCH_NODE_PATH Rust host, src-tauri/src/commands/agent_sidecar/supervisor.rs:1523 system node in dev; the bundled Node sidecar in release Node binary that runs the agent sidecar. Ignored in a release build unless PACKETBENCH_DEV_SIDECAR opts in, because this selects the interpreter that will receive live API keys.
PACKETBENCH_OLLAMA_KEEP_ALIVE Rust host, src-tauri/src/core/llm_ollama.rs:101 30m Ollama keep_alive. A saved setting wins. Accepts a Go duration, a bare number of seconds, or a negative value meaning never unload; anything else is rejected before the request.
PACKETBENCH_OLLAMA_NUM_CTX_CAP Rust host, src-tauri/src/core/llm_ollama.rs:88 16384, with a floor of 2048 Ceiling on Ollama's num_ctx. A saved setting wins; a value below the floor is raised to it.
PACKETBENCH_OLLAMA_URL Rust host, src-tauri/src/core/storage.rs:934 http://localhost:11434 Ollama root base URL. A saved endpoint wins; the OpenAI-compatible URL is this value plus /v1.
PACKETBENCH_RELEASE_GATE_TIMEOUT_MS scripts/release-readiness.mjs:19 2700000 (45 minutes) Per-gate timeout for each of the nine required quality gates.
PACKETBENCH_RELEASE_REQUIRE_CLEAN scripts/release-gate.mjs:17 unset 1 is equivalent to --require-clean: a dirty working tree becomes a FAIL rather than a WARN.
PACKETBENCH_RELEASE_REQUIRE_SIGNING scripts/release-gate.mjs:19 unset 1 is equivalent to --require-signing: missing code-signing configuration becomes a FAIL.
PACKETBENCH_RELEASE_REQUIRE_UPDATER scripts/release-gate.mjs:21 unset 1 is equivalent to --require-updater: missing updater configuration becomes a FAIL.
PACKETBENCH_RELEASE_SKIP_GATES scripts/release-readiness.mjs:18 unset 1 skips executing the nine quality gates. They render as WARN … NOT EXECUTED, never as a pass that was not earned.
PACKETBENCH_RELEASE_TARGET scripts/release-readiness.mjs:253 the resolved build triple Names the platform whose bundle artifacts to look for — the escape hatch for a WSL-side run against a Windows build. A value outside the known set is refused rather than widened to every platform, because that can pass on a bundle for the wrong OS.
PACKETBENCH_REMOTE_NODE_PATH Rust host, src-tauri/src/commands/agent_sidecar/supervisor.rs:1660 node on the remote host's PATH Node binary the generated sidecar-over-SSH launch script executes. Read in the local PacketBench process and baked into the script.
PACKETBENCH_REMOTE_SIDECAR Node sidecar, agent-sidecar/src/session-registry.ts:100 unset The launch script sets it to 1 on the remote host. Without it the sidecar refuses a session carrying SSH workspace metadata rather than treating the remote path as a local one.
PACKETBENCH_REMOTE_SIDECAR_PATH Rust host, src-tauri/src/commands/agent_sidecar/supervisor.rs:1670 $HOME/.packetbench/agent-sidecar/dist/index.js Sidecar entry point on the remote host. A missing entry aborts the preflight with exit 93.
PACKETBENCH_SIDECAR_PATH Rust host, src-tauri/src/commands/agent_sidecar/supervisor.rs:1478 the source tree in dev; the Tauri resource directory in release Agent-sidecar entry script. Ignored in a release build unless PACKETBENCH_DEV_SIDECAR opts in, and the refusal is logged so a confused bug report is answerable.
PACKETBENCH_STATUSLINE_DIR The re-invoked status-line helper, src-tauri/src/core/claude_statusline.rs:228 ~/.claude/statusline-state State directory the collector writes to. PacketBench sets it on the pane, applied after your pane env so persisted workspace state cannot redirect it.
PACKETBENCH_UPDATER_MANIFEST scripts/release-readiness.mjs:353 three default latest.json paths under the bundle directory First candidate path searched for an updater manifest. No shipped build has ever had one, so the row reports WARN.
PACKETCODE_GUI_ENGINE Rust host, src-tauri/src/acp/mod.rs:718 Legacy alias for PACKETBENCH_ACP_ENGINE, read second. Kept so a pre-rename export keeps working.
PACKETCODE_GUI_INSTALL_URL Rust host, src-tauri/src/acp/install.rs:158 Legacy alias for PACKETBENCH_ACP_INSTALL_URL, read second.
PACKETCODE_HOME Rust host, src-tauri/src/acp/mod.rs:1815 ~/.packetcode The engine's home directory, not PacketBench's. It belongs to the sibling packetcode TUI, which writes the sessions/*.json files the disk fallback reads. Pointing it at PacketBench's own data directory makes that fallback read nothing.
PACKETCODE_OLLAMA_URL Rust host, src-tauri/src/core/storage.rs:935 Legacy alias for PACKETBENCH_OLLAMA_URL, read second.
PATH Rust host, src-tauri/src/acp/mod.rs:760 and src-tauri/src/core/shell_path.rs:31 inherited Searched for CLI and engine binaries. A GUI launch on macOS gets a truncated PATH, which is why fix_path_for_gui_launch() is the first statement in run().
PATHEXT Rust host, src-tauri/src/acp/mod.rs:765 Windows' own default Extensions tried during the Windows PATH scan for the engine binary.
PLAYWRIGHT_PORT Playwright, playwright.config.ts:3 1420 Port the end-to-end dev server binds and the tests connect to.
ProgramFiles Rust host, src-tauri/src/core/agent.rs:123 Windows Git Bash fallback candidate root. Absence drops the candidate rather than failing.
TAURI_BUNDLER_SIGN_COMMAND scripts/release-readiness.mjs:291 Counted as a Windows Authenticode signal, and used by Tauri's bundler when signing.
TAURI_DEV_HOST Vite, vite.config.ts:5 unset — the dev server binds locally Host the Vite dev server and its HMR socket bind to, for testing against a real device.
TAURI_ENV_TARGET_TRIPLE Build scripts, scripts/target-triple.js:93 the host triple Target triple, injected by Tauri for beforeBuildCommand. It outranks TAURI_TARGET, and a disagreement between the two throws rather than picking one.
TAURI_SIGNING_PRIVATE_KEY scripts/release-readiness.mjs:317 The updater minisign key, not a code-signing certificate. Deliberately excluded from the signing evidence: counting it once produced a false "signing credentials present" PASS on a build with zero Authenticode configuration.
TAURI_SIGNING_PRIVATE_KEY_PASSWORD scripts/release-readiness.mjs:317 Passphrase for the updater minisign key. Counted only alongside the key itself.
TAURI_SIGNTOOL_PATH scripts/release-readiness.mjs:292 Counted as a Windows Authenticode signal.
TAURI_TARGET Build scripts, scripts/target-triple.js:94 the host triple Manual target-triple override for standalone script runs. A stale export used to silently redirect fetch-node, prune-sidecar and release-gate to the same wrong target, so they agreed with each other and the gate could not see the problem.
USERPROFILE Rust host, src-tauri/src/core/shared.rs:17 Home directory, tried before HOME. Determines the data directory on Windows.
WINDOWS_CERTIFICATE_PATH scripts/release-readiness.mjs:289 Counted as a Windows Authenticode signal.
WINDOWS_CERTIFICATE_THUMBPRINT scripts/release-readiness.mjs:288 Counted as a Windows Authenticode signal.
WINDOWS_CODESIGN_CERTIFICATE_PATH scripts/release-readiness.mjs:290 Counted as a Windows Authenticode signal.
WSL_DISTRO_NAME scripts/release-readiness.mjs:86 Presence, or a microsoft match on the kernel release, marks the run as WSL so drive-letter paths are translated.
XDG_DATA_HOME Rust host, src-tauri/src/lib.rs:44 and src-tauri/src/commands/statusline/opencode.rs:70 $HOME/.local/share Linux log-directory base, and the base for OpenCode's share directory when the status-line reader looks for it.
XDG_STATE_HOME Rust host, src-tauri/src/commands/statusline/opencode.rs:69 the platform default beneath the home directory Base for OpenCode's state directory, read when collecting that CLI's status line.
Note

Sixteen of these are release-engineering signals the readiness report checks for presence only — the five Windows rows, the nine Apple rows, and the two TAURI_SIGNING_PRIVATE_KEY* rows. Setting one makes a WARN row read PASS; it does not make the build sign anything. Nothing in this repository is code signed today.

Variables PacketBench sets#

These are written into a child process's environment. They are listed here because they are routinely mistaken for configuration you supply, and they are not: setting them yourself either has no effect or is overwritten.

Variable Set on Value Why
ANTHROPIC_API_KEY The Claude Agent SDK child, agent-sidecar/src/providers/anthropic.ts:677 the key from the OS keyring The documented API-key mechanism for that SDK. The key never enters frontend state.
CI Quality-gate child processes, src-tauri/src/commands/quality_runner.rs:374 1 Most JS test runners read it to disable their interactive UI, which would otherwise corrupt the captured output.
CLAUDE_CONFIG_DIR A claude PTY pane launched under a named CLI account that account's config directory The entire multi-account mechanism — see Settings. PacketBench never reads this variable.
CODEX_HOME A codex PTY pane launched under a named CLI account that account's config directory As above, for Codex. PacketBench never reads this variable either.
DISPLAY The ssh child, src-tauri/src/core/ssh_askpass.rs:89 :0, only when unset in the parent Makes OpenSSH use SSH_ASKPASS rather than looking for a terminal.
NO_COLOR Quality-gate child processes, src-tauri/src/commands/quality_runner.rs:372 1 Stops ANSI escapes polluting the captured gate output.
PACKETBENCH_ASKPASS_FILE The ssh child, src-tauri/src/core/ssh_askpass.rs:87 path to a single-use secret file Hands the passphrase to the re-invoked helper without putting it on a command line.
PACKETBENCH_REMOTE_SIDECAR The remote sidecar, src-tauri/src/commands/agent_sidecar/supervisor.rs:1729 1 Proves to the sidecar that it really is running on the remote host.
PACKETBENCH_STATUSLINE_DIR A claude PTY pane, src-tauri/src/commands/pty.rs:943 the status-line state directory Applied after your pane env, so persisted workspace state cannot redirect it.
PACKETBENCH_STATUSLINE_HELPER A claude PTY pane, src-tauri/src/commands/pty.rs:942 path to the PacketBench binary Expanded by the shell inside the generated statusLine command (src-tauri/src/core/claude_statusline.rs:200). PacketBench writes it and never reads it back.
PACKETCODE_HOME A packetcode PTY pane, src-tauri/src/commands/agent.rs:217 the configured engine home Must be an absolute path; a relative one is rejected before spawn.
SSH_ASKPASS The ssh child, src-tauri/src/core/ssh_askpass.rs:85 path to the PacketBench binary PacketBench re-invokes itself as the askpass helper.
SSH_ASKPASS_REQUIRE The ssh child, src-tauri/src/core/ssh_askpass.rs:86 force Stops OpenSSH falling back to a TTY prompt that nothing is attached to.

Every PTY additionally gets TERM=xterm-256color and COLORTERM=truecolor, with your pane-supplied environment merged on top. A claude pane gets five more entries — two removals, two brand flags and an auto-updater disable — alongside a generated --settings flag. All six are enumerated with their reasons in Workspaces & terminals.

Important

CLAUDE_CONFIG_DIR and CODEX_HOME appear in the settings documentation as "the whole mechanism" for CLI accounts, which is true and is also the easiest thing on this page to misread. PacketBench writes them; it never reads them. Exporting one in the shell you launch PacketBench from changes what the CLIs do, not what PacketBench believes about them.