Crux Daemon · 5. Configuration reference

The Crux Daemon is configured entirely by environment variables, with an optional YAML file covering 26 keys. This chapter is the complete list. Read §5.1 before you read anything else: four properties of the configuration surface will bite you, and three of them are silent.

This chapter is reference. The traps are in §5.1 to §5.6; the tables are §5.9 onward.

5.0 In plain English

The daemon has no settings screen and no configuration wizard in its request path. Every dial it has is an environment variable, plus an optional YAML file covering 26 keys. This chapter is the full dial board: 393 variables, each with its type, its default, what it actually changes, and the code that reads it. Think of it less as a manual and more as a parts catalogue. Nobody reads it end to end; you come here to look one thing up.

Configuring by environment is a deliberate trade. It means the daemon deploys identically on a laptop, in a container and on a host with no config management, because the environment is the only input it needs. What you give up is a validation pass. There is no schema check that tells you a variable name was misspelled, and an unknown variable is simply an unknown variable: it sits in the environment doing nothing, and nothing complains.

You come here in one of two situations. Either you are setting the daemon up and need the correct name and default for something, in which case go to the topic tables from §5.9 onward. Or, far more often, you set a flag, restarted, and the behaviour did not change. That is the case §5.1 to §5.6 exists for, and it is worth reading those six sections once in full even when nothing is broken, because they describe failures that produce no error and no log line.

The one thing people get wrong, above every other trap in this chapter, is assuming that a boolean is a boolean. It is not. Nine mutually incompatible parsing rules are in use across the codebase, so yes enables some flags and silently leaves others off; CRUX_PASSPORT_REVOCATION=yes reads to a human as "revocation on" and actually turns it off. Use =1 to enable and =0 to disable, always, everywhere. It is the only pair of values that means the same thing under all nine rules.

Two more that catch people in the same way, both silent: a YAML file that fails to read or parse produces no error at all and is indistinguishable from having no file, and the default data directory is a relative path, so starting the daemon from a different working directory silently gives you a different, empty store. Set CORECRUXD_DATA_DIR to an absolute path before you do anything else.

5.1 Read this first: four things that fail silently

1. Booleans are parsed by nine mutually incompatible rules. A value like yes, on or True enables some flags and silently leaves others off. CRUX_PASSPORT_REVOCATION=yes reads to a human as "revocation on" and actually turns it off. The nine rules are enumerated in §5.5. 1 is the only value that works under every rule in this codebase. Use =1 to enable and =0 to disable, and nothing else.

2. Config-file read and parse failures are entirely silent. A YAML syntax error, a typo'd path, or a permission problem produces no log line and no error. The daemon boots with an empty file config and every value falls back to its default. A broken config.yaml looks exactly like "no config file" (config.rs:709).

3. An unset XDG_CONFIG_HOME disables file configuration outright. There is no ~/.config/crux/config.yaml fallback. If XDG_CONFIG_HOME is unset, common on macOS and many Linux desktops, the daemon reads no config file at all unless CORECRUXD_CONFIG_PATH is set explicitly (config.rs:728).

4. The default data_dir is the relative path ../CoreCruxData/v1. It resolves against the daemon's working directory (config.rs:838). Running corecruxd from two different directories gives you two different data directories, and the LOCK single-instance guard cannot catch it because they are different locks. Always set CORECRUXD_DATA_DIR to an absolute path.

Two more, less dangerous but equally silent: an unparseable host or port falls back to the default with no warning (config.rs:800), and RUST_LOG silently overrides CORECRUXD_LOG_LEVEL entirely (main.rs:2066).

5.2 How much of this surface is documented in the repository

BucketCount
Distinct environment variables read anywhere in crates/393
, CORECRUXD_*306
, CRUX_*51
, CORECRUX_*15
, OS, toolchain and third-party (HOME, PATH, USER, HOSTNAME, XDG_*, CARGO*, VAULT_*, OTEL_*, RUST_LOG, OPENAI_API_KEY, LOG_FORMAT, CLAUDE_PROJECT_DIR, …)21
Compile-time only (env! / option_env!)4
Test-only, every read site is test or example code14
Documented in config.example.env96
Documented but read nowhere in code, stale3
Read in code but absent from config.example.env299
YAML config-file keys26 across 6 sections
Distinct boolean-parsing rules9

The existing configuration documentation covers about 24% of the surface: config.example.env documents 96 of roughly 363 production runtime variables. Three variables it documents do not exist in the code at all, see §5.8.

All eight cargo feature flags across the four crates that declare them, corecrux-memory, corecrux-storage, corecruxctl and corecruxd, are off by default. On corecruxd alone the count is four (otel, wasm-extensions, dense-embed-model, hosted-surfaces); both figures appear in this documentation and they are different populations, not a contradiction. See chapter 3 §3.7 for the complete register.

5.3 The resolution model

corecruxd is environment-variable-first with an optional YAML overlay. The module doc states it plainly: "Daemon configuration: parses CORECRUXD_* environment variables into a typed Config at startup" (config.rs:6).

Order of resolution (config.rs:793): the YAML file is loaded first into a FileConfig, then every field resolves as env → file → hard-coded default. Env always wins.

Config-file discovery, configured_config_path() (config.rs:723):

  1. CORECRUXD_CONFIG_PATH if set and non-blank, after path expansion (config.rs:724).
  2. Else, only if XDG_CONFIG_HOME is set and non-blank, $XDG_CONFIG_HOME/crux/config.yaml (config.rs:728).
  3. Else None, no file is read.

Config-file failure modes, load_file_config() (config.rs:709):

SituationBehaviourLocation
No path resolvedEmpty file configconfig.rs:710
File read, YAML parsesUsedconfig.rs:715
File read, YAML malformedEmpty file config, the parse error is discardedconfig.rs:716
File not foundEmpty file configconfig.rs:718
Any other read error, e.g. permissionsEmpty file config, discardedconfig.rs:719

There is one saving grace. Because daemon.auth_mode is a file key, a malformed YAML that was meant to supply it instead trips the "must be set explicitly" abort at main.rs:304, which at least fails closed, though with a message pointing at the env var rather than at your broken file.

Path expansion, expand_config_value (config.rs:776), substitutes exactly four tokens, in order: $XDG_STATE_HOME (only if set and non-empty), $XDG_CONFIG_HOME (same), $HOME, and a leading ~/. It is applied to data_dir, state_dir, the config path itself and the passport key path. It is not general shell expansion.

Two helper behaviours worth knowing: env_string (config.rs:734) filters out empty strings, so FOO= is identical to FOO being unset for every string-valued setting; and env_csv (config.rs:753) splits on commas, trims each part and drops empties.

5.4 Logging precedence

init_tracing builds its filter as (main.rs:2066):

let filter = tracing_subscriber::EnvFilter::try_from_default_env()
    .unwrap_or_else(|_| tracing_subscriber::EnvFilter::new(level));

try_from_default_env() reads RUST_LOG. The precedence is therefore RUST_LOG > CORECRUXD_LOG_LEVEL > info. If RUST_LOG is set and valid it wins outright and CORECRUXD_LOG_LEVEL is ignored entirely.

The output format is selected by LOG_FORMAT, not by CORECRUX_LOG_FORMAT (main.rs:2068). CORECRUX_LOG_FORMAT is read by no code anywhere, yet it is set in the Dockerfile, the Helm chart, both compose files and config.example.env. JSON logging is silently off in every shipped manifest. This is defect B1 in chapter 16. Document and set LOG_FORMAT=json.

5.5 The nine boolean rules

Boolean environment variables in this workspace are parsed by nine mutually incompatible rules. This is the single biggest correctness hazard in the configuration surface.

IDExact ruleTrimmed?Case-insensitive?Unset meansDefined at
T1`matches!(v, "1" \"true" \"TRUE" \"yes" \"YES")`nopartial, only the listed spellingsfalseconfig.rs:765 (bool_value)
T2v.trim() != "0" && !v.trim().eq_ignore_ascii_case("false")yesyestrueconfig.rs:744 (env_default_on)
T3`matches!(v.trim(), "1" \"true" \"TRUE" \"yes" \"YES" \"on" \"ON")`yesno: On and True failfalseauth.rs:139, auth_rails.rs:61
T4`matches!(v.trim().to_lowercase(), "1" \"true" \"yes" \"on")`yesyesfalseagentgraph_kinds.rs:132, tools/facts.rs:26
T5`!matches!(v.trim().to_ascii_lowercase(), "" \"0" \"false" \"off" \"no")`, anything else is onyesyesfalse or true, varies per call siteactivity.rs:81, traces.rs:75, ledger.rs:63
T5bAs T5 but the off-set omits "no", so no is truthyyesyesfalsetools/reuse.rs:38, tools/engrams.rs:36, tools/autonomy.rs:46
T6`v == "1" \\v.eq_ignore_ascii_case("true"), **yes and on` do not work**noonly for truefalse or true per sitedispatch.rs:116, server.rs:88, legal_holds.rs:34
T7Identical to T5, separate helperyesyesfalseworkspace_scan_manifests.rs:31
T8`matches!(v.trim().to_ascii_lowercase(), "1" \"true" \"yes" \"on")`yesyesfalsehttp/extensions.rs:45, studio_library.rs:90
T9`matches!(v.trim().to_ascii_lowercase(), "1" \"true" \"on" \"yes")`, order differs onlyyesyesfalseincidents.rs:170

Three further one-off shapes exist:

  • matches!(v.as_deref(), Some("1") \| Some("true") \| Some("TRUE") \| Some("on")), yes does not work (provenance.rs:56).
  • matches!(v.as_deref(), Ok("1" \| "on")), true does not work (snapshot_sync.rs:84, for CRUX_COMPACTION_SYNC).
  • An "off" sentinel where any other value, including unset, means on, the crux-hook family, e.g. session_start.rs:80.

The dangerous one is CRUX_PASSPORT_REVOCATION. It is default-on when unset, but once set only 1 or a case-insensitive true keeps it on, and it does not trim. =yes, =on, =enabled and =TRUE all silently disable revocation enforcement (dispatch.rs:115). A security control that fails open. See chapter 16 defect B6.

5.6 The no-trim cluster: a container-deployment hazard

Six boolean flags parse with no .trim(). A trailing newline or space, routine with systemd EnvironmentFile=, docker --env-file and Helm configMapKeyRef, makes them silently off, with no warning.

VariableRead at
CORECRUXD_ALLOW_INSECURE_DEV_AUTH_BINDmain.rs:1959
CRUX_MCP_ALLOW_EMPTY_AGENT_REGISTRYmain.rs:1970
CORECRUXD_PUBLIC_PROBES_MINIMALhealth.rs:65
CORECRUXD_SYNC_ENABLEDhealth.rs:679, config.rs:1294
CORECRUXD_EMBEDDING_PROBE_ALLOW_LOCALconsole.rs:1850
CORECRUXD_ALLOW_WEAK_HS256_SECRETauth.rs:358

A related case-sensitivity split: CORECRUXD_TS_IDENTITY_ENABLED=True is off (T3), while CORECRUXD_OBSERVE=True is on (T4).

5.7 Variables that are startup-fatal

VariableFailure modeGuard
CORECRUXD_AUTH_MODERefuses to boot when neither it nor daemon.auth_mode is set. A present-but-unparseable value aborts separately.main.rs:304, main.rs:313
CORECRUXD_JWT_HS256_SECRETFatal under jwt_hs256. Also rejected below 32 bytes unless CORECRUXD_ALLOW_WEAK_HS256_SECRET is set.auth.rs:238
CRUX_AGENT_TOKEN / CRUX_AGENT_TOKENSFail-closed: if either is set but any token violates the 32..=256-byte [A-Za-z0-9._~-] policy, startup aborts. Unset is fine.agent.rs:74
CORECRUXD_EMBED_DELEGATE_URL / _TOKEN / _DIMENSIONSFatal as a set: once any of the three is present, an incomplete or ambiguous combination aborts with one of five distinct messages.config.rs:609
VAULT_ADDR, VAULT_TOKENHard error when the Vault-PKI C2PA X.509 signer is selected. Empty-after-trim counts as missing. In the witness path the same absence is caught, warned, and falls through to the in-process env key.vault_pki_x509_signer.rs:147; non-fatal at witness_submit.rs:447
CORECRUXD_C2PA_LEAF_TTL_HOURSHard error if set but unparseable as u64. Unset is fine.vault_pki_x509_signer.rs:183
CORECRUXD_WITNESS_VAULT_KEYError when the Vault-Transit witness signer is built, but caught and downgraded to a warning with fallback to CORECRUXD_WITNESS_SIGNING_KEY. Not fatal.witness_submit.rs:200
CORECRUXCTL_ENVCLI error if set to anything other than local, staging or production.tooling_env.rs:44
CRUX_C2PA_VERIFY_PUBLIC_KEY_HEXCLI error when corecruxctl output verify runs without --pub-key-hex. Must be exactly 64 hex chars.output_verify.rs:54
CORECRUXD_EMBEDDING_URLCLI error for corecruxctl ingest --embed. Optional in the daemon.ingest.rs:599
CRUX_LLM_SHIM, CRUX_CLOUD_WITNESSThe shim and witness subcommands refuse to run unless set to 1 or true.llm_shim/mod.rs:232
CORECRUXD_WORKSPACE_PATHThe workspace-scan surface is inert without it. Not fatal to boot.workspace_scan.rs:274
CORECRUXD_SYNC_REMOTE_URL, CORECRUXD_SYNC_API_KEYThe MCP sync_* tools return "sync not configured". Not fatal to boot.tools/sync.rs:24
CARGO_PKG_VERSION, CARGO_MANIFEST_DIRCompile-time env!(), the build fails if absent. Always set by Cargo.build.rs:51

Everything else in this chapter has a default and is safe to leave unset.

5.8 Documented but not read: three phantom knobs

VariableDocumented atReality
CORECRUX_LOG_FORMATconfig.example.env:153No such variable exists. The code reads LOG_FORMAT (main.rs:2068). The wrong name is also baked into the Dockerfile, both compose files, the quickstart README and the Helm chart, so JSON logging is silently off wherever those manifests are used.
CORECRUXD_DEBUG_ERRORSconfig.example.env:433Not read anywhere. Documented as "Include internal topology in error responses", the knob does not exist.
CORECRUXD_SESSION_TTL_DEFAULTconfig.example.env:436Not read anywhere. Documented as "Default session TTL in seconds", the knob does not exist.

5.9 The YAML config file: every key

The file schema is exhaustively defined by FileConfig and its five sub-structs (config.rs:642-706). Every field is Option<T> and #[serde(default)], so unknown keys are ignored and missing keys are absent. Precedence is env var, then file key, then hard-coded default, for every row.

YAML keyTypeOverriding env varDefaultDeserialised at
daemon.instance_idstringCORECRUXD_NODE_IDnone (derived)config.rs:656, read :846
daemon.state_dirstring pathCORECRUXD_STATE_DIRfalls back to data_dirconfig.rs:657, read :839
daemon.data_dirstring pathCORECRUXD_DATA_DIR../CoreCruxData/v1config.rs:658, read :834, undocumented in config.example.yaml
daemon.listen_addrstring IPCORECRUXD_HTTP_HOST / _GRPC_HOST / _MCP_HOST127.0.0.1config.rs:659
daemon.http_portu16CORECRUXD_HTTP_PORT14800config.rs:660
daemon.grpc_portu16CORECRUXD_GRPC_PORT4007config.rs:661
daemon.mcp_portu16CORECRUXD_MCP_PORT14801config.rs:662
daemon.mcp_enabledboolCORECRUXD_MCP_ENABLEDtrueconfig.rs:663
daemon.auth_modestringCORECRUXD_AUTH_MODEnone, startup-fatalconfig.rs:664, read :876
passport.key_pathstring pathCORECRUXD_PASSPORT_KEY_PATH<state_dir>/passport.keyconfig.rs:670
passport.claim_on_startupboolCORECRUXD_PASSPORT_CLAIM_ON_STARTUPtrueconfig.rs:671
passport.claim_endpointstring URLCRUX_PASSPORT_CLAIM_ENDPOINT, then CORECRUXD_PASSPORT_CLAIM_ENDPOINThttps://passport.vaultcrux.com/v1/claim-anonymousconfig.rs:672
content.manifest_pathstring pathCORECRUXD_CONTENT_MANIFEST_PATHnoneconfig.rs:678
content.verify_signaturesboolCORECRUXD_CONTENT_VERIFY_SIGNATUREStrueconfig.rs:679
router.refresh_interval_secondsu64CORECRUXD_ROUTER_REFRESH_INTERVAL_SECONDS60, clamped 1..=86400config.rs:685
router.cache_ttl_secondsu64CORECRUXD_ROUTER_CACHE_TTL_SECONDS60, clamped 1..=86400config.rs:686
router.fallback_policystringCORECRUXD_ROUTER_FALLBACK_POLICYdegrade_to_localconfig.rs:687
enterprise.enabledboolCORECRUXD_ENTERPRISE_ENABLEDfalseconfig.rs:693
enterprise.customer_idstringCORECRUXD_ENTERPRISE_CUSTOMER_ID""config.rs:694
enterprise.backend_idstringCORECRUXD_ENTERPRISE_BACKEND_ID""config.rs:695
enterprise.trust_root_kidstringCORECRUXD_ENTERPRISE_TRUST_ROOT_KID""config.rs:696
enterprise.trusted_issuer_kidslist of stringCORECRUXD_ENTERPRISE_TRUSTED_ISSUER_KIDS (CSV)[]config.rs:697
enterprise.airgapboolCORECRUXD_ENTERPRISE_AIRGAPtrueconfig.rs:698
enterprise.allow_vaultcrux_cross_signboolCORECRUXD_ENTERPRISE_ALLOW_VAULTCRUX_CROSS_SIGNfalseconfig.rs:699
llm.endpointstring URLCORECRUXD_LLM_ENDPOINTnoneconfig.rs:705
llm.modelstringCORECRUXD_LLM_MODELnoneconfig.rs:706

That is 26 keys against 393 environment variables. Any document presenting config.example.yaml as "the configuration file" without saying that roughly 93% of configuration is environment-only is misleading. Two further gaps in the shipped example: daemon.data_dir is absent from config.example.yaml even though it takes precedence over daemon.state_dir, and CORECRUXD_CONFIG_PATH is documented in neither example file.

One nuance on the auth-mode rule. auth_mode_raw is env_string("CORECRUXD_AUTH_MODE").or(file_config.daemon.auth_mode) (config.rs:876). So "CORECRUXD_AUTH_MODE has no default and the daemon refuses to start without it" is true but incomplete: setting daemon.auth_mode in the YAML file satisfies the requirement equally, and config.example.yaml:12 does exactly that.

Sources for §5.1 to §5.9

The reference tables follow in §5.10 onward. The Flag column gives the default state of a boolean feature flag; Parse cites a rule from §5.5.

5.10 Variables read from more than one place, with different behaviour

Each row is a live inconsistency, not a documentation nit. If you set one of these, know which consumer you are configuring.

#VariableDivergence
1CORECRUXD_FEATURE_AUDIT_EXPORTSame default (off), incompatible parse rules: T6 gates the tool; a T3-like rule drives the custody scorecard. =yes makes the scorecard report audit_export_online: true while the tool is disabled. audit_export.rs:61 vs context_custody_audit.rs:113
2CORECRUXD_FEATURE_RECEIPT_VERIFYSame default (off): T5 at the tool, a strict allow-list at the scorecard. =enabled turns the tool on while the scorecard reports off. receipt_verify.rs:52
3CORECRUXD_SYNC_REMOTE_URLThree different fallbacks: hard error, None, and false. Two sites do not trim and one does, so " " reads as configured to the sync client and not configured to the scorecard. tools/sync.rs:24
4CORECRUXD_SYNC_API_KEYHard error at one site, a boolean "configured" at another; config.rs uses unwrap_or_default(), i.e. the empty string. config.rs:1298
5CORECRUXD_SYNC_ENABLEDT1 at both sites, untrimmed and case-sensitive. " 1" is false at both. config.rs:1294
6CORECRUXD_DATA_DIRThree different defaults for the same variable: ../CoreCruxData/v1 after the YAML fallback chain in the daemon; the same literal in the MCP sync client but without the YAML fallback and without trimming; and no default at all in corecruxctl. config.rs:834
7CRUX_AGENT_TOKENTwo consumers, two validations: a strict 32..=256-byte charset policy that aborts startup, versus "any non-blank trimmed string" accepted as an outbound bearer. agent.rs:79 vs loopback_auth.rs:226
8CORECRUXD_JWT_HS256_SECRETFatal if missing in the daemon's auth path; silently returns None and falls back to an opaque bearer in the MCP loopback minter. auth.rs:238 vs loopback_auth.rs:180
9CORECRUXD_ENGINE_BASE_URL / _API_KEYThe console proxy treats absence as "not configured"; the memory snapshot sync treats absence as a fail-closed gate together with CORECRUXD_ENGINE_TENANT_ID. Different trimming. engine_console.rs:240 vs snapshot_sync.rs:115
10VAULT_ADDR / VAULT_TOKENRead by two independent subsystems with the same names and the same fatal semantics but different error types and different companion variables (CORECRUXD_VAULT_PKI_MOUNT versus CORECRUXD_WITNESS_VAULT_MOUNT). A host configured for one is implicitly configured for the other.
11Default-on flags parsed with T6CORECRUXD_FEATURE_SCOPED_FORGET, CRUX_PASSPORT_REVOCATION and CRUX_AGENT_CARD default on but use T6, so =yes, =on and =enabled silently disable them. The T5-based default-on flags (CORECRUXD_FEATURE_TOOL_TRACES, _MEMORY_PANEL, _FRESHNESS, _CONSOLIDATION) keep those same strings on. Opposite behaviour, same-looking flag family.
12CORECRUXD_QUERY_TEXT_SEARCH versus its siblingsis_query_feature_enabled special-cases this one name to the default-on helper (T2) and applies T6 to every other name it is passed. One function, two semantics, selected by string comparison. http/mod.rs:1878
13CORECRUXD_PASSPORT_KEY_PATH versus CRUX_PASSPORT_KEY_PATHTwo names for one concept. The daemon reads only CORECRUXD_*; corecruxctl and the hooks check CRUX_* first. Setting only CRUX_PASSPORT_KEY_PATH makes the CLI and the daemon disagree about which key is in use. config.rs:887
14CORECRUXD_AGENTGRAPHAdvertised but never read. route_auth.rs:528 declares it as the feature gate for /v1/orchestrators and /v1/punchcards, but the real gates are CORECRUXD_ORCHESTRATORS and CORECRUXD_PUNCHCARD. Every other feature-env label in that file resolves to a real variable; this one alone names a variable that does nothing.
15CORECRUXD_REPLICATION_AUTH_BEARERSecurity-relevant. main.rs:2005 treats it as presence-only and reports "not configured" in readiness when unset, but grpc.rs:860 substitutes the hardcoded literal replication:write and sends it as a real bearer. Operators reading /readyz believe replication auth is unconfigured while a guessable static credential is on the wire.
16CORECRUXD_SYNC_REMOTE_URL (fourth site)health.rs:682 does not trim; admin.rs:2509 does. A whitespace-only value reads as configured in /readyz and not configured in the admin privacy report.
17CORECRUXD_EMBEDDING_URLconsole.rs:151 does not trim when reporting the active endpoint; console.rs:1856 trims and parses for the probe-origin allowlist. A whitespace-padded URL is reported as active but fails its own SSRF exemption.
18CORECRUXD_DATA_DIR (fourth site)activity.rs:598 reads it independently of the config chain: unset, or a create_dir_all failure, silently leaves the activity journal in memory only, no durable audit log, no error.
19CORECRUXD_HTTP_ACCEPT_AGENT_TOKENSRead through two separate truthy helpers with currently identical semantics that can drift independently. auth.rs:147 vs infra.rs:69

5.11 Ports, planes, process identity

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_HTTP_HOSTIpAddr127.0.0.1: unparseable falls back to loopback, never errors-,HTTP API bind addressconfig.rs:796
CORECRUXD_HTTP_PORTu1614800-,HTTP API port, serving /healthz, /readyz, /metricsconfig.rs:801
CORECRUXD_GRPC_HOSTIpAddr127.0.0.1-,gRPC bind addressconfig.rs:807
CORECRUXD_GRPC_PORTu164007-,gRPC portconfig.rs:812
CORECRUXD_MCP_HOSTIpAddr127.0.0.1-,MCP bind addressconfig.rs:817
CORECRUXD_MCP_PORTu1614801-,Built-in MCP server port, JSON-RPC over Streamable HTTPconfig.rs:822
CORECRUXD_MCP_ENABLEDbooltrueONT1Disable the built-in MCP server entirelyconfig.rs:827
CORECRUXD_CONSOLE_ENABLEDbooltrueONT1Serve the embedded console SPAconfig.rs:830
CORECRUXD_SERVICEstringcorecruxd-,Service name in logs and metricsconfig.rs:844
CORECRUXD_CLUSTER_IDstringdev-,Cluster identifierconfig.rs:845
CORECRUXD_NODE_IDstringderived-,Override the derived node idconfig.rs:846
CORECRUX_NODE_IDstringfalls back to HOSTNAME, then unknown-node-,Node id for corecruxctl storage operationsstorage.rs:680
CORECRUXD_LOG_LEVELstringinfo-,Tracing level. Completely overridden by RUST_LOG when that is setconfig.rs:843
RUST_LOGstringunset-EnvFilter directive syntaxRead implicitly by EnvFilter::try_from_default_env(); takes full precedence over CORECRUXD_LOG_LEVEL. Undocumented in the repositorymain.rs:2066
LOG_FORMATstring"" (human-readable)-eq_ignore_ascii_case("json")Tracing output format. The manifests all say CORECRUX_LOG_FORMAT; that name is never readmain.rs:2068
CORECRUXD_CONFIG_PATHpath$XDG_CONFIG_HOME/crux/config.yaml, else no file-,Explicit YAML config pathconfig.rs:724
CORECRUXD_IO_BACKENDstringcpu-,IO backend selectionconfig.rs:952
CORECRUXD_OPERATING_MODE / CRUX_OPERATING_MODEenumOperatingMode::default()-OperatingMode::parseReported product posture; CORECRUXD_* winsconfig.rs:941
CORECRUXD_ENABLED_PRO_SERVICES / CRUX_ENABLED_PRO_SERVICESCSV[]-CSV, blanks droppedDeclared entitlementsconfig.rs:946
CORECRUXD_DEV_SPLIT_SHARDSu324-,Dev-mode shard split countconfig.rs:854
CORECRUXD_ROUTING_RELOAD_INTERVAL_MSu641000-,Routing table reload cadenceconfig.rs:847
CORECRUXD_ROUTING_STRICT_CLIENT_VERSIONboolfalseOFFT1 inlineReject clients on version skewconfig.rs:851
CORECRUXD_ROUTER_REFRESH_INTERVAL_SECONDSu6460, clamped 1..=86400-,Router refresh cadenceconfig.rs:903
CORECRUXD_ROUTER_CACHE_TTL_SECONDSu6460, clamped 1..=86400-,Router cache TTLconfig.rs:909
CORECRUXD_ROUTER_FALLBACK_POLICYstringdegrade_to_local-,Behaviour when the router is unreachableconfig.rs:915
CORECRUXD_PUBLIC_PROBES_MINIMALboolfalseOFFT1 inline, untrimmedStrip routing, valve and check detail from unauthenticated /healthz and /readyzhealth.rs:65
USERstringlocal-,Local passport owner namesession.rs:110
HOSTNAMEstringreads /etc/hostname, then unknown-node-,Host identity for config bundles and node idconfig_bundle.rs:42

5.12 Auth, identity, access control

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_AUTH_MODEenumnone, startup-fatal-AuthMode::parse; an unknown value is also fataloff / dev_scopes / jwt_hs256 / jwt_jwksconfig.rs:876
CORECRUXD_JWT_HS256_SECRETsecretnone, fatal in jwt_hs256-at least 32 bytes unless overriddenHS256 verification key; also mints MCP loopback JWTsauth.rs:238
CORECRUXD_ALLOW_WEAK_HS256_SECRETboolfalseOFFT1, untrimmedPermit an HS256 secret shorter than 32 bytesauth.rs:358
CORECRUXD_JWT_ISSstringnone-,Expected and emitted iss claimauth.rs:241
CORECRUXD_JWT_AUDstringnone-,Expected and emitted aud claimauth.rs:242
CORECRUXD_JWT_ALGSCSVdefault set; an invalid value is fatal-parse_jwt_algsAllowed JWT signature algorithmsauth.rs:258
CORECRUXD_JWT_JWKS_JSON, alias CORECRUXD_JWKS_JSONJSON stringnone-first non-error winsInline JWKS documentauth.rs:272
CORECRUXD_JWT_JWKS_PATH, alias CORECRUXD_JWKS_PATHpathnone-first non-error winsJWKS file on diskauth.rs:275
CORECRUXD_JWT_JWKS_URL, alias CORECRUXD_JWKS_URLURLnone-first non-error winsJWKS endpointauth.rs:278
CORECRUXD_JWT_OIDC_DISCOVERY_URL, alias CORECRUXD_OIDC_DISCOVERY_URLURLnone-first non-error winsOIDC discovery for JWKS resolutionauth.rs:281
CORECRUXD_JWT_JWKS_MIN_REFRESH_SECONDSu6430-,JWKS refresh floorauth.rs:260
CORECRUXD_HTTP_ACCEPT_AGENT_TOKENSboolfalseOFFT3Accept MCP agent tokens on the HTTP API under a JWT modeauth.rs:147
CORECRUXD_AGENT_TOKEN_HTTP_SCOPESspace or comma listadmin:read admin:write facts:write query:read sessions:read sessions:write-parse_scopes; an empty result falls back to the defaultScopes granted to an HTTP-accepted agent token. The default includes admin:writeauth.rs:157
CORECRUXD_AGENT_TOKEN_HTTP_TENANTstring*, all tenants-,Tenant binding for HTTP-accepted agent tokensauth.rs:162
CRUX_AGENT_TOKENsecretnone, MCP auth disabled-32..=256 bytes, [A-Za-z0-9._~-]; a violation aborts startupSingle-agent MCP bearer, agent name defaultagent.rs:79
CRUX_AGENT_TOKENSname:token,…none-same policy per token; any bad entry aborts startupMulti-agent MCP token registryagent.rs:74
CRUX_MCP_ALLOW_EMPTY_AGENT_REGISTRYboolfalseOFFT1, untrimmedDev and test only. Boot with MCP auth disabled even when a token variable is set but invalidmain.rs:1970
CORECRUXD_ALLOW_INSECURE_DEV_AUTH_BINDboolfalseOFFT1, untrimmedAllow a dev auth mode, or MCP with no agent token, to bind a non-loopback addressmain.rs:1959
CORECRUXD_ROUTE_AUTHenumshadow: any unrecognised value, including unset-trimmed and lowercased; off and enforce are explicitPer-route auth contract enforcement postureroute_auth.rs:579
CORECRUXD_TENANT_WRITE_STAMPenumOff (fail-safe)OFFtrimmed and lowercased; 1/true/on/enforce mean on, shadow/audit mean shadow, everything else means offStamp the tenant id on writesauth.rs:979
CORECRUXD_TS_IDENTITY_ENABLEDboolfalse, routes 404OFFT3Tailscale identity rail: /v1/auth/whoami, /v1/auth/tailscale/tokenauth_rails.rs:185
CORECRUXD_TS_IDENTITY_ALLOWLIST`login=tenant:scopeA\scopeB,…`""; nobody allowlisted-parse_ts_allowlist; malformed entries skipped, logins lowercasedAuthoritative tenant and scope mapping for tailnet loginsauth_rails.rs:190
CORECRUXD_TS_TRUSTED_PROXY_CIDRSCSV CIDR[], loopback always trusted-parse_cidr per entryExtra peers permitted to present identity headersauth_rails.rs:160
CORECRUXD_DEVICE_GRANT_ENABLEDboolfalse, routes 404OFFT3RFC 8628 device-authorization railauth_device.rs:209
CRUX_MCP_RESOURCE_URLURLnone, OAuth resource metadata disabledOFFtrimmed non-emptyThis daemon's public MCP resource URL (RFC 9728)oauth.rs:51
CRUX_MCP_AUTH_SERVERURLhttps://api.vaultcrux.com-trimmed non-emptyAuthorization Server base URLoauth.rs:55
CRUX_MCP_INTROSPECT_CLIENT_IDstringnone, introspection disabledOFFnon-emptyRFC 7662 introspection client idoauth.rs:118
CRUX_MCP_INTROSPECT_CLIENT_SECRETsecretnone, introspection disabledOFFnon-emptyRFC 7662 introspection client secretoauth.rs:119
CRUX_MCP_INTROSPECT_URLURL<auth server>/v1/auth/introspect-non-emptyOverride the introspection endpointoauth.rs:121
CRUX_MCP_OAUTH_TENANTstringwork-non-emptyTenant that hosted-client OAuth identities map tooauth.rs:313
CRUX_MCP_REQUIRE_RESOURCE_AUDboolfalseOFFeq_ignore_ascii_case("true"), 1 does not workEnforce the OAuth resource aud checkoauth.rs:320
CORECRUX_LOOPBACK_TOKENsecretnone, then CRUX_AGENT_TOKEN is tried-trimmed non-emptyFirst-choice opaque bearer for loopback HTTP callsloopback_auth.rs:226
CRUX_MCP_HANDOFF_SECRETsecreta random 32-byte seed, rotating per process-any value, BLAKE3-hashedStable handoff-bundle signing keydispatch.rs:371
CRUX_PASSPORT_REVOCATIONbooltrueONT6: =yes and =on disable itRevoked passports reduced to read-onlydispatch.rs:116
CRUX_AGENT_CARDbooltrueONT6: =yes and =on disable itExpose /.well-known/agent-card for A2A discoveryserver.rs:88
CORECRUXD_AGENT_PASSPORTSboolfalseOFFT1Stamp resolved passport ids as the fact actorconfig.rs:960
CRUX_AGENT_PASSPORTSagent:passport[:tenant],…built-in default map-comma-split; an empty parse result falls back to the defaultAgent to passport and tenant mappingagent_passport.rs:139
CORECRUXD_FEATURE_PASSPORT_MINT_REQUESTSboolfalseOFFT1Passport mint request plus operator approve and reject surface; adds the 119th MCP toolconfig.rs:961
CORECRUXD_PASSPORT_KEY_PATHpath<state_dir>/passport.key-$HOME, ~ and XDG expandedThe daemon passport private keyconfig.rs:887
CRUX_PASSPORT_KEY_PATHpathfalls through to CORECRUXD_PASSPORT_KEY_PATH, then <CORECRUXD_DATA_DIR>/passport.key-,CLI and hook-side passport key override, checked first, see §5.10 row 13compaction_sync.rs:183
CORECRUXD_PASSPORT_CLAIM_ON_STARTUPbooltrueONT1Claim an anonymous passport at boot, the one outbound call in a default configurationconfig.rs:890
CRUX_PASSPORT_CLAIM_ENDPOINT, then CORECRUXD_PASSPORT_CLAIM_ENDPOINTURLhttps://passport.vaultcrux.com/v1/claim-anonymous-CRUX_* winsPassport claim endpointconfig.rs:893
CRUX_PASSPORT_IDstringoperator:anonymous-trimmed non-emptyActor id stamped on hook-side capturesobserve_capture.rs:355
CORECRUXD_SEED_DEFAULT_PASSPORTSboolfalseOFFT4 inlineSeed the built-in passport set at bootmain.rs:1015
CORECRUXD_IDENTITY_LINKSboolfalseOFFT1/v1/identity/links* CRUD and the resolver extensionconfig.rs:1375
CORECRUXD_FEATURE_IDENTITY_CONTINUITYboolfalseOFFT6Identity split, merge and link-device toolsidentity.rs:67

5.13 Storage, data directory, append lane, compaction

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_DATA_DIRpath../CoreCruxData/v1 after the YAML fallback chain-$HOME, ~ and XDG expandedSegments, indexes, journals, control state. Three divergent read sites, see §5.10 rows 6 and 18config.rs:834
CORECRUXD_STATE_DIRpathfalls back to data_dir-expandedControl and state directoryconfig.rs:839
XDG_STATE_HOMEpathnot substituted if unset-,$XDG_STATE_HOME expansion in config pathsconfig.rs:778
XDG_CONFIG_HOMEpathno config file is loaded if unset-,Config path resolution and $XDG_CONFIG_HOME expansionconfig.rs:728
HOMEpathno $HOME or ~ expansion if unset-,Path expansion; hook and CLI config discoveryconfig.rs:784
CORECRUXD_BUILD_CCXIboolfalseOFFT1 inlineBuild .ccxi companion indexes at seal time, required for BM25config.rs:954
CORECRUXD_STORE_LOCK_STRATEGYenumSharded-mutex / rwlock / sharded, plus upper-case variantsStore lock implementationconfig.rs:1024
CORECRUXD_APPEND_LANE_ENABLEDbooltrueONT1 inline via is_none_or, any non-listed value disablesDedicated append laneconfig.rs:1029
CORECRUXD_APPEND_LANE_SCOPEenumGlobal-global / shardAppend-lane granularityconfig.rs:1032
CORECRUXD_APPEND_GROUP_COMMIT_BATCHESusize16, minimum 1-,Group-commit batch countconfig.rs:1239
CORECRUXD_APPEND_GROUP_COMMIT_MAX_DELAY_MSu640, batch-count boundary only-,Bounded group-commit delayconfig.rs:1246
CORECRUXD_TAIL_CACHE_ENABLEDbooltrueONT1 inline via is_none_orTail read cacheconfig.rs:1037
CORECRUXD_ENABLE_DIRECTORY_COMPACTIONboolfalseOFFT1 inlineDirectory LSM compactionconfig.rs:1253
CORECRUXD_DIR_L0_MAX_RUNSusize8-,L0 run count before compactionconfig.rs:1256
CORECRUXD_COLD_SCAN_MAX_SEGMENTSusize256-,Cold-scan segment capconfig.rs:1235
CORECRUXD_MAX_EVENTS_PER_BATCHusize1024-,Ingest batch event capconfig.rs:1215
CORECRUXD_MAX_BATCH_BYTESusize16777216 (16 MB)-,Ingest batch byte capconfig.rs:1219
CORECRUXD_MAX_EVENT_ID_BYTESusize128-,Maximum event-id lengthconfig.rs:1223
CORECRUXD_IDEM_HOT_CAPACITY_ENTRIESusize100000-,Idempotency hot-cache sizeconfig.rs:1227
CORECRUXD_EVENT_ID_HASH_PREFIX_LENusize16-,Event-id hash prefix lengthconfig.rs:1231
CORECRUXD_ADMIN_FORCE_SEALboolfalseOFFT1 inlinePermit force-sealing head segments via admin actionsconfig.rs:975
CORECRUXD_FACT_PERSISTENCEbooltrueONT1 inline via is_none_orJSONL persistence for the fact and session stores. Setting it off makes every write volatileconfig.rs:1261
CORECRUXD_RETENTION_DAYSu32none, retention off-must be above 0, else treated as unsetcompact-facts deletion-eligibility windowconfig.rs:980
CORECRUXD_FORGET_RECOVERY_WINDOW_DAYSi647-untrimmed parse, floored at 1Soft-delete recovery window before purgeforget.rs:80
CORECRUXD_EPHEMERAL_GCboolfalseOFFT1GC stale daemon-minted bookkeeping facts. Read once at bootconfig.rs:1327
CORECRUXD_PROJECTIONS_ENABLEDboolfalseOFFT1 inlineLiving Objects projectionsconfig.rs:963
CORECRUXD_PROJECTIONS_BATCH_FRAMESu321024-,Projection batch sizeconfig.rs:966
CORECRUXD_PROJECTIONS_TICK_INTERVAL_MSu641000-,Projection tick cadenceconfig.rs:970
CORECRUXD_SCRUB_SCHEDULER_ENABLEDboolfalseOFFT1 inlineBackground scrub schedulerconfig.rs:1074
CORECRUXD_SCRUB_INTERVAL_SECSu64300, clamped 10..=86400-,Scrub cadenceconfig.rs:1077
CORECRUXD_SCRUB_SCOPEstringrecent-,Scrub scopeconfig.rs:1082
CORECRUXD_SCRUB_MODEstringsampled-,Scrub modeconfig.rs:1083
CORECRUXD_SCRUB_SAMPLE_RATEf640.25, clamped 0.0..=1.0-,Scrub sampling rateconfig.rs:1084
CORECRUXD_OPERATOR_ACTION_MAX_PENDINGusize128, minimum 1-,Operator action queue depthconfig.rs:1063
CORECRUXD_OPERATOR_ACTION_TIMEOUT_SECSu64900, clamped 5..=86400-,Operator action timeoutconfig.rs:1068
CORECRUX_STORAGE_FAILPOINTstringnone-exact string equality against the failpoint nameFault-injection hook, compiled in for non-test buildscorecrux-storage/src/lib.rs:1982
CORECRUXD_SOURCE_ROOTSCSV/sources,/src-comma-split, trimmedAllowed source roots for plane-layer syncplane_layer_sync.rs:73

5.14 Ingress hardening, backpressure, capacity guard

All of these read 0 as "disabled or unbounded", so an emergency rollback needs no redeploy (config.rs:93). Unparseable values silently fall back to the default.

NameTypeDefaultRead at
CORECRUXD_MAX_REQUEST_BODY_BYTESusize16777216 (16 MiB)config.rs:265
CORECRUXD_SHUTDOWN_DRAIN_SECSu6430; 0 drains foreverconfig.rs:266
CORECRUXD_MAX_INFLIGHTusize1024; 0 means no capconfig.rs:267
CORECRUXD_RATE_LIMIT_RPSu64300; 0 disablesconfig.rs:268
CORECRUXD_RATE_LIMIT_BURSTu64600, clamped up to rate_limit_rpsconfig.rs:269
CORECRUXD_RATE_LIMIT_EXEMPT_CIDRSCSV CIDR127.0.0.0/8,::1/128; an empty string means no exemptionsconfig.rs:270
CORECRUXD_TRUSTED_PROXY_CIDRSCSV CIDR[], forwarded headers are ignored until setconfig.rs:271
CORECRUXD_GRPC_KEEPALIVE_INTERVAL_SECSu6430; 0 disables pingsconfig.rs:272
CORECRUXD_GRPC_KEEPALIVE_TIMEOUT_SECSu6410config.rs:273
CORECRUXD_GRPC_MAX_CONCURRENT_STREAMSu321024; 0 is unboundedconfig.rs:274
CORECRUXD_BACKPRESSURE_HIGH_WATERMARK_RATIOf640.90, clamped 0.01..=0.99config.rs:1044
CORECRUXD_BACKPRESSURE_LOW_WATERMARK_RATIOf640.80, clamped 0.0..=0.98, forced below the high watermarkconfig.rs:1048
CORECRUXD_BACKPRESSURE_RETRY_AFTER_MSu32250, clamped 1..=60000config.rs:1057
CORECRUXD_CAPACITY_GUARD_ENABLEDbooltrueconfig.rs:1089
CORECRUXD_CAPACITY_GUARD_INTERVAL_SECSu6430, clamped 10..=3600config.rs:1092
CORECRUXD_CAPACITY_WARNING_FREE_RATIOf640.20, clamped 0.01..=0.95, then raised to at least critical and emergencyconfig.rs:1097
CORECRUXD_CAPACITY_CRITICAL_FREE_RATIOf640.10, clamped 0.01..=0.90, re-ordered against the othersconfig.rs:1102
CORECRUXD_CAPACITY_EMERGENCY_FREE_RATIOf640.10; this is the /readyz gate thresholdconfig.rs:1107
CORECRUXD_CAPACITY_RESUME_FREE_RATIOf640.20, clamped 0.02..=0.99, forced above emergencyconfig.rs:1112
CORECRUXD_READ_RETRY_FAILED_READYZ_THRESHOLDu643; 0 disables the gateconfig.rs:1040
CORECRUXD_MAX_OBSERVATION_PAYLOAD_BYTESusize1 MiB, floor 64 KiB. Read once into a LazyLock, a later change has no effectobservations.rs:48

5.15 Sync, replication, update checks

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_SYNC_ENABLEDboolfalseOFFT1 inline, untrimmed at both sitesBackground pull and push sync loop; also reported in /readyz and /v1/versionconfig.rs:1294
CORECRUXD_SYNC_REMOTE_URLURL""-unwrap_or_default(): no trim, no validationRemote base URL. Four divergent read sitesconfig.rs:1297
CORECRUXD_SYNC_API_KEYsecret""-unwrap_or_default()Bearer for the remote sync targetconfig.rs:1298
CORECRUXD_SYNC_INTERVAL_SECSu64300, minimum 10-,Sync cadenceconfig.rs:1299
CORECRUXD_SYNC_MUTUAL_AUTHboolfalseOFF1 or case-insensitive true, yes does not workRequire issuer-signed Ed25519 peer handshakesconfig.rs:1304
CORECRUXD_SYNC_PEER_TRUST_ROOThexnone-exactly 64 hex chars; anything else silently becomes noneIssuer Ed25519 trust root for peer tokensconfig.rs:1307
CORECRUXD_SYNC_DELEGATION_ENFORCEboolfalseOFF1 or case-insensitive trueAccept recipient-bound v1.1 delegation tokens at the sync boundaryconfig.rs:1310
CORECRUXD_SYNC_PEER_SIGNING_KEYhex seednone-hex; invalid means warn and fall back to bearer onlyPeer handshake signing key, must be paired with the tokenmain.rs:175
CORECRUXD_SYNC_PEER_TOKENJSONnone-canonical capability-token JSONPeer capability tokenmain.rs:176
CORECRUXD_SYNC_PRIVATE_PREFIXESCSVthe built-in prefix set only-comma-split, trimmed, blanks droppedExtra never-synced fact prefixescorecrux-memory/src/sync.rs:876
CORECRUXD_ALWAYS_PRIVATE_PREFIXESCSVthe default private prefixes only-comma-split, trimmedExtra always-private fact prefixesfact_privacy.rs:179
CORECRUXD_SHARE_PREFIXES_OVERRIDECSV{}, no shareable prefixes-comma-split, trimmedReplace the shareable-prefix setfact_privacy.rs:185
CORECRUXD_COMMIT_LEVELenumLocalCommit-local / local_commit / local-commit versus replicated and friendsCommit durability levelconfig.rs:858
CORECRUXD_FOLLOWER_READS_ENABLEDbooltrue only if commit_level == ReplicatedCommit, else falsevariesT1 inlineServe reads from followersconfig.rs:863
CORECRUXD_REPLICATED_COMMIT_TIMEOUT_MSu645000, clamped 100..=120000-,Replicated-commit timeoutconfig.rs:867
CORECRUXD_REPLICATED_COMMIT_REQUIRE_ALL_FOLLOWERSbooltrueONT1 inline via is_none_orRequire every follower to acknowledgeconfig.rs:872
CORECRUXD_REPLICATION_AUTH_BEARERsecretthe hardcoded literal replication:write in the gRPC path; presence-only in the readiness report, see §5.10 row 15-trimmed non-empty; a bearer prefix is stripped case-insensitivelyBearer presented on replication segment pushesgrpc.rs:860
CORECRUXD_REPLAY_BATCH_MAX_EVENTSu3264, minimum 1-,Replay batch event capconfig.rs:1006
CORECRUXD_REPLAY_BATCH_MAX_BYTESu32262144, minimum 1024-,Replay batch byte capconfig.rs:1011
CORECRUXD_REPLAY_MANY_MAX_READSu3264, minimum 1-,replay_many read capconfig.rs:1016
CORECRUXD_REPLAY_USE_BATCHED_RPC_DEFAULTbooltrueONT1 inline via is_none_orDefault to the batched replay RPCconfig.rs:1021
CORECRUXD_UPDATE_CHECK_ENABLEDbooltrueONT1 inline via is_none_orBackground git update check for /v1/version and the MCP update_status toolconfig.rs:1313
CORECRUXD_UPDATE_CHECK_REMOTEstringorigin-,Git remote to compare againstconfig.rs:1316
CORECRUXD_UPDATE_CHECK_REFstringmain-,Tracking branchconfig.rs:1317
CORECRUXD_UPDATE_CHECK_INTERVAL_SECSu643600, clamped 60..=86400-,Update-check cadenceconfig.rs:1318
CORECRUXD_UPDATE_CHECK_REPO_DIRpathnone, the working directory-empty paths filtered outExplicit repository rootconfig.rs:1323
CRUX_COMPACTION_SYNCboolfalseOFF**`matches!(v, "1" \"on"): true` does not work**Opt-in compaction-snapshot syncsnapshot_sync.rs:84
CORECRUXD_ENGINE_BASE_URLURLnone, the gate is closed-trimmed non-empty, trailing / strippedEngine base URL for the console proxy and snapshot syncengine_console.rs:240
CORECRUXD_ENGINE_API_KEYsecretnone, the gate is closed-trimmed non-emptyEngine API keyengine_console.rs:247
CORECRUXD_ENGINE_TENANT_IDstringnone, the snapshot-sync gate is closed-trimmed non-emptyTenant id for snapshot syncsnapshot_sync.rs:117
CORECRUXD_ENGINE_SEARCH_TENANTstringwikicrux, a deployment-specific tenant baked in as the default-trimmed non-emptyTenant used by the console engine-search proxyengine_console.rs:232

5.16 Retrieval, memory, embeddings

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_QUERY_TEXT_SEARCHbooltrueONT2, only 0 and false disableLocal CPU BM25 text-search route; 404 when offquery.rs:445
CORECRUXD_QUERY_GRAPH_EXPANDboolfalseOFFT6Graph-expansion queriesquery.rs:157
CORECRUXD_QUERY_TIME_RANGEboolfalseOFFT6Time-range queriesquery.rs:283
CORECRUXD_EMBEDDING_URLURLnone, keyword-only unless the local embedder is on-non-empty, untrimmed in config, trimmed and parsed for the probe allowlistOpenAI-compatible embedding endpoint; also the origin exempted from the probe SSRF guardconfig.rs:1266
CORECRUXD_EMBEDDING_MODELstringnomic-embed-text in config and CLI-non-emptyModel requested from the embedding serviceconfig.rs:1267
CORECRUXD_EMBEDDING_PROBE_ALLOW_LOCALboolfalseOFFT1 inline, untrimmedLet the console embedding probe reach private, loopback, link-local and metadata targets, an SSRF guard overrideconsole.rs:1850
CORECRUXD_LOCAL_EMBEDDERbooltrueONT2Use the zero-dependency LocalHashEmbedder when no external embedding URL is setconfig.rs:1280
CORECRUXD_DENSE_MODELstringnone-non-emptyfastembed selects the feature-gated ONNX embedder; needs --features dense-embed-modelconfig.rs:1281
CORECRUXD_COMPUTE_PROVIDERboolfalseOFFT1Execute /v1/compute/embed work for peers. Mutually exclusive with delegationconfig.rs:1265
CORECRUXD_EMBED_DELEGATE_URLURLnone-trimmed non-empty; its presence makes the whole delegation set mandatoryDaemon-to-daemon embedding delegation targetconfig.rs:1268
CORECRUXD_EMBED_DELEGATE_TOKENsecretnone-trimmed non-empty; Debug prints [REDACTED]Delegation bearer, the only redaction-aware secret in Configconfig.rs:1271
CORECRUXD_EMBED_DELEGATE_DIMENSIONSusizenone-unparseable deliberately becomes 0 so validation fails closedVector dimensionality assertionconfig.rs:1275
CORECRUXD_SEMANTIC_DEDUPboolfalseOFFT1 inlineStore-time semantic near-duplicate flagging; it never drops a writeconfig.rs:1283
CORECRUXD_SEMANTIC_DEDUP_THRESHOLDf320.95, read only when dedup is on-,Cosine threshold for the dedup flagconfig.rs:1287
CORECRUXD_MEMORY_SALIENCEboolfalseOFFT4Record per-fact access counts on recall so hot facts decay slowertools/facts.rs:26
CORECRUXD_DECAY_VOLATILE_HOURSi64policy default; values at or below 0 ignored-,Staleness horizon for volatile factsdecay.rs:126
CORECRUXD_DECAY_MEDIUM_DAYSi64policy default-,Staleness horizon for medium-stability factsdecay.rs:127
CORECRUXD_DECAY_STABLE_DAYSi64policy default-,Staleness horizon for stable factsdecay.rs:128
CORECRUXD_CONSOLIDATION_SCHEDULERboolfalseOFFT1Periodic contradiction-candidate detection, surfaces only, never resolvesconfig.rs:1328
CORECRUXD_CONSOLIDATION_SCHEDULER_INTERVAL_SECSu643600, clamped 60..=86400-,Consolidation review cadenceconfig.rs:1329
CORECRUXD_CONTEXT_SURFACEboolfalse, 404OFFT1Provider-neutral /v1/context bundle surfaceconfig.rs:1342
CORECRUXD_AUTO_CAPTUREboolfalse, 404OFFT1Gated auto-capture /v1/memory/*config.rs:1343
CORECRUXD_LOCAL_INGESTbooltrueONT2Local CPU prose-ingest door /v1/local/ingestconfig.rs:1344
CORECRUXD_ASSEMBLY_CACHEboolfalseOFFT1Assembly cache for /v1/context bundlesconfig.rs:1361
CRUX_MEMORY_IMPORTboolfalseOFFT1 in the daemon; v == "1" exactly in the CLIPOST /v1/memory/importconfig.rs:1374
CORECRUXD_SESSION_TOKEN_BUDGETu64none, no limit; 0 also means no limit-trimmed parsePer-session token budget; drives budget_pcttoken_accounting.rs:95
CRUX_OUTPUT_HOLDOUTf640.0OFFtrimmed parse, clamped 0.0..=1.0Fraction of requests diverted to the unshaped control armholdout.rs:38
CORECRUXD_LLM_ENDPOINTURLnone-non-emptyLocal LLM endpointconfig.rs:949
CORECRUXD_LLM_MODELstringnone-non-emptyLocal LLM model nameconfig.rs:950
OPENAI_API_KEYsecretnone-trimmed non-emptyBearer for the embedding endpoint in corecruxctl ingest --embedingest.rs:608

5.17 Observability, redaction, OpenTelemetry

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_REDACTenumaudit: count, do not mutate-on / off / audit; unknown values fall back to auditSink-boundary log redaction moderedact.rs:68
CORECRUXD_REDACT_EXTRA_PATTERNSpatterns""-;;-separated id=regex; invalid entries warn and dropExtra redaction patternsredact.rs:220
CORECRUXD_OBSERVE_REDACTenumon: anything unrecognised, including unset-trimmed and lowercased; off and audit explicitLane-scoped redaction for /v1/observe/*, a stricter default than CORECRUXD_REDACTobserve_audit.rs:241
CORECRUXD_OBSERVEboolfalseOFFT4/v1/observe/* audit-chain surfaceagentgraph_kinds.rs:140
CORECRUXD_ORCHESTRATORSboolfalseOFFT4/v1/orchestrators/* surfaceagentgraph_kinds.rs:145
CORECRUXD_PUNCHCARDenumOffOFFtrimmed and lowercased; advisory / enforce, anything else means offPunchcard lease enforcement postureagentgraph_kinds.rs:162
CORECRUXD_AGENTGRAPH-never read-,Named in the route-auth contract for /v1/orchestrators and /v1/punchcards but read nowhere, see §5.10 row 14route_auth.rs:528
CORECRUXD_OBS_RETENTION_DAYSi64none, keep forever; values at or below 0 also disable-parse, must be above 0Hourly observation archival horizonmain.rs:1223
CORECRUXD_FEATURE_ACTIVITY_LOGboolfalseOFFT5Signed replayable activity log /v1/activityactivity.rs:81
CORECRUXD_FEATURE_ACTIVITY_LOG_TTL_SECSu6431536000 (365 days)-trimmed parse; unparseable falls back to the defaultActivity retention horizonactivity.rs:93
CORECRUXD_FEATURE_ACTIVITY_SIGNboolfalseOFFT5Co-sign each appended turnactivity.rs:256
CORECRUXD_FEATURE_TOOL_TRACESbooltrueONT5In-memory per-passport tool-trace ringtraces.rs:75
CORECRUXD_FEATURE_TOOL_TRACES_TTL_SECSu643600-trimmed parseTrace retention horizontraces.rs:87
CORECRUXD_FEATURE_TOOL_LEDGERboolfalseOFFT5Durable agent.tool_invocation.v1 ledger observationsledger.rs:75
CORECRUXD_TOOL_LEDGER_RAW_ARGSboolfalseOFFT5Include raw tool arguments, not just args_hash, local debug onlyledger.rs:79
CORECRUXD_FEATURE_OTEL_SPANSboolfalseOFFT5OpenTelemetry GenAI-semconv events per MCP tool dispatchotel.rs:40
OTEL_EXPORTER_OTLP_ENDPOINTURLnone, no exporter-,OTLP span exporter endpoint. Only compiled with --features otel; a bad endpoint fails silentlymain.rs:2085
CORECRUXD_FEATURE_STATUS_FEEDboolfalseOFFT5Live work-board feed /v1/status-feedstatus_feed.rs:41
CORECRUXD_FEATURE_INCIDENTSboolfalseOFFT9Incident reconstruction cases and certified exportsincidents.rs:170
CORECRUXD_FEATURE_LEGAL_HOLDboolfalseOFFT6Legal-hold placement and release, plus retention enforcementlegal_holds.rs:34
CORECRUXD_FEATURE_PROVENANCE_APIboolfalseOFF`Some("1"\"true"\"TRUE"\"on"), **yes` does not work**Provenance API surface; routes are mounted only when on, so they hard-404 otherwise, before any body is readprovenance.rs:56
CRUX_SELF_OBSERVEboolfalseOFF`matches!(v.to_lowercase(), "1"\"true"\"yes"): **on` does not work**, untrimmedSelf-observation lanecrux-observe/src/config.rs:13
CORECRUXD_REPO_WATCHboolfalseOFFT7-shaped inlineFilesystem repo watcherrepo_watch.rs:24
CORECRUXD_REPO_WATCH_POLLboolfalseOFFT7-shaped inlinePolling fallback for the repo watcherrepo_watch.rs:31

5.18 Extensions and the WASM host

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_EXTENSIONS_TIMEOUT_SECONDSu64struct default; unparseable silently ignored-,Outbound extension call timeoutextension_outbound.rs:131
CORECRUXD_EXTENSIONS_MAX_REQUEST_BYTESusizestruct default-,Outbound request size capextension_outbound.rs:136
CORECRUXD_EXTENSIONS_MAX_RESPONSE_BYTESusizestruct default-,Outbound response size capextension_outbound.rs:141
CORECRUXD_EXTENSIONS_DEFAULT_RATE_PER_MINu32struct default-,Default per-extension rate limitextension_outbound.rs:146
CORECRUXD_EXTENSIONS_ALLOW_PLAIN_HTTPboolfalseOFFT8Permit http:// extension endpointsextension_outbound.rs:151
CORECRUXD_EXTENSIONS_ALLOW_UNSIGNEDboolfalseOFFT8Accept unsigned extension bundles, development onlyhttp/extensions.rs:45
CORECRUXD_WASM_FUEL_DEFAULTu641000000-unparseable falls backWasmtime fuel budget per callwasm_host.rs:92
CORECRUXD_WASM_MEMORY_BYTES_DEFAULTu6416000000-,WASM linear-memory capwasm_host.rs:93
CORECRUXD_WASM_WALL_MS_DEFAULTu64 ms1000-,Wall-clock cap per WASM callwasm_host.rs:94
CORECRUXD_WASM_EPOCH_TICK_MSu64 ms10-,Wasmtime epoch interruption tickwasm_host.rs:95
CORECRUXD_STUDIO_ALLOW_UNSIGNEDboolfalseOFFT8Accept unsigned Studio templates, development onlystudio_library.rs:90
CORECRUXD_STUDIO_SIGNING_KEY_HEXhex seednone, bare-mirror state; malformed is an error-32-byte hex seedOperator signing key for Studio packsstudio_pack.rs:628
CORECRUXD_RESULT_ENVELOPE_KEYSCSV[], no trusted platform keys-comma-splitPinned trusted platform verification keysresult_envelope.rs:54

5.19 Integrations, console, upstream proxies

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_INTEGRATIONS_ENABLEDbooltrueONT1 inline via is_none_orThe declarative integration libraryconfig.rs:1377
CORECRUXD_INTEGRATIONS_SAFE_MODEboolfalseOFFT1 inlineRestrict integration capabilitiesconfig.rs:1380
CORECRUXD_INTEGRATIONS_ALLOW_EXECUTABLE_HELPERSboolfalseOFFT1 inlinePermit integration packs to run executablesconfig.rs:1383
CORECRUXD_CONSOLE_DEV_PATHpathnone, bundled assets-trimmed non-emptyServe console assets from disk, for developmentconsole.rs:126
CORECRUXD_CONSOLE_ALLOWED_ORIGINSCSV originsa built-in deployment-specific list; an empty-after-trim value also falls back to it-comma-splitConsole CORS allowlist. Replaced a permissive CORS layerconsole.rs:273
CORECRUXD_CORECRUX_BASE_URL, then CORECRUXD_CORECRUX_URL, then CORECRUX_BASE_URLURLnone, the proxy errors-first non-empty after trim and trailing-/ stripUpstream operator proxy for console lane-weight controlsconsole.rs:1228
CORECRUXD_CORECRUX_GRAPH_BASE_URL, then CORECRUX_GRAPH_BASE_URLURLnone, the proxy errors-first non-empty after trimGraph mediation proxy; drives the console_link_graph capabilityconsole.rs:761
CORECRUXD_CORECRUX_ADMIN_TOKEN, then CORECRUX_ADMIN_TOKENsecretnone-trimmed non-emptyBearer forwarded to the upstream admin APIconsole.rs:1390
CORECRUXD_CORECRUX_GRAPH_TOKEN, then CORECRUX_GRAPH_TOKENsecretnone-trimmed non-emptyBearer forwarded to the upstream graph APIconsole.rs:782
CORECRUXD_CORECRUX_PASSPORT_ID, then CORECRUX_PASSPORT_IDstringnone-trimmed non-emptyPassport id forwarded upstreamconsole.rs:1398
CORECRUXD_GPU1_BASE_URL, then CRUX_GPU1_BASE_URLURLnone, the client is not constructed and the routes are inert-trimmed non-emptyRerank dataplane base URL. Needs --features hosted-surfacesgpu1.rs:961
CORECRUXD_GPU1_API_KEY, then CRUX_GPU1_API_KEYsecretnone-trimmed non-emptyRerank dataplane API keygpu1.rs:966
CORECRUXD_GITHUB_SYNC_INTERVAL_SECSu64900 (15 min)-no minimum clamp: 0 is accepted, unlike the witness and sync loopsGitHub integration poll cadencemain.rs:1499
CORECRUXD_VAULT_WATCH_ROOTScolon-separated absolute paths"", the watcher is inactive-splits on :, not ,, unlike every other list variable here. Non-absolute or unreadable entries are rejected and reportedDirectories the file-watcher pack monitors; also requires an installed file-watcher packvault_watcher.rs:194
CORECRUXD_VAULT_WATCH_INTERVAL_SECSu64300; 0 is rejected and falls back-,Watch poll cadencevault_watcher.rs:262
CORECRUXD_VAULT_WATCH_TENANTstringthe default tenant-,Tenant for watcher-ingested contentvault_watcher.rs:239
CORECRUXD_VAULT_WATCH_CORPUSstringthe default corpus-,Corpus for watcher-ingested contentvault_watcher.rs:240
CORECRUXD_APPROVALS_SLACK_WEBHOOK_URLURLnone: a silent no-op, never panics-unset or blank-after-trim returns earlySlack notification for approval requestsapprovals.rs:191
CORECRUXD_OPENAI_SHIMboolfalseOFFT1OpenAI function-calling shim over the MCP tool surfaceconfig.rs:1376
CORECRUXD_TOOL_SURFACEenumfull: any unrecognised value also means full, so it never silently shrinks-trimmed and lowercased; minimal / dynamicSize of the advertised tools/list surfacesurface.rs:96
CRUX_MCP_SSE_MAX_SESSIONSusize1024; 0 means unlimited-,Global SSE session capsse.rs:54
CRUX_MCP_SSE_MAX_SESSIONS_PER_OWNERusize64; 0 means unlimited-,Per-owner SSE session capsse.rs:55
CRUX_MCP_URLURLhttp://127.0.0.1:14801/mcp-,Target for the corecruxd mcp-stdio bridgemcp_stdio.rs:141
CORECRUXD_HTTP_URLURLhttp://127.0.0.1:14800-,Daemon base URL for corecruxctl subcommandscorecruxctl/src/extensions.rs:158
CRUX_HTTP_URLURLhttp://127.0.0.1:14800-trailing / normalisedDaemon base URL for the hook clientdaemon_client.rs:30

5.20 Receipts, witness, C2PA, audit export

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_RECEIPTS_VERIFY_ENABLEDbooltrueONT1 inline via is_none_orReceipt signature-verification projectionconfig.rs:985
CORECRUXD_RECEIPTS_RECOMPUTE_CANDIDATE_DIGESTboolfalseOFFT1 inlineRecompute candidate digests during verificationconfig.rs:988
CORECRUXD_RECEIPTS_KEYRING_PATHpathnone-no trim, no empty filter, a trailing space becomes part of the pathPinned receipt verification keyring fileconfig.rs:991
CORECRUXD_RECEIPTS_KEYRING_JSONJSON stringnone-no trimInline receipt verification keyringconfig.rs:992
CORECRUXD_WITNESS_ENABLEDboolfalseOFFT1Transparency-log witnessingconfig.rs:993
CORECRUXD_WITNESS_PROVIDERstringdisabled-non-emptyWitness provider, e.g. rekorconfig.rs:994
CORECRUXD_WITNESS_TIMEOUT_MSu645000, clamped 100..=120000-,Witness submit timeoutconfig.rs:995
CORECRUXD_WITNESS_INTERVAL_SECSu64300, minimum 1-,Background witness anchoring cadencemain.rs:1335
CORECRUXD_REKOR_URLURLnone-non-emptyRekor endpointconfig.rs:1000
CORECRUXD_REKOR_PUBLIC_KEY_PATHpathnone-non-emptyRekor verification keyconfig.rs:1001
CORECRUXD_TSA_ENABLEDboolfalseOFFT1RFC 3161 timestampingconfig.rs:1002
CORECRUXD_TSA_URLURLnone-non-emptyTSA endpointconfig.rs:1003
CORECRUXD_TSA_ROOT_CERT_PATHpathnone-non-emptyTSA root certificateconfig.rs:1004
CORECRUXD_TSA_POLICY_OIDstringnone-non-emptyTSA policy OIDconfig.rs:1005
CORECRUXD_WITNESS_SIGNING_KEYbase64 secretnone, no env key signer-trimmed; blank means none; standard base64Witness signing key; the env path is the defaultwitness_submit.rs:425
VAULT_ADDRURLnone, hard error in both Vault paths-trimmed; blank means missingVault addressvault_pki_x509_signer.rs:147
VAULT_TOKENsecretnone, hard error-trimmed; blank means missingVault tokenvault_pki_x509_signer.rs:154
VAULT_CACERTpathnone-trimmed; blank means noneVault CA bundlevault_pki_x509_signer.rs:161
CORECRUXD_VAULT_PKI_MOUNTstringthe default PKI mount-trimmed, / strippedVault PKI mount pathvault_pki_x509_signer.rs:169
CORECRUXD_WITNESS_VAULT_MOUNTstringtransit-trimmed non-emptyVault Transit mount for the witness signerwitness_submit.rs:201
CORECRUXD_WITNESS_VAULT_KEYstringnone: hard error when the Transit signer is built, but caught and downgraded-non-emptyVault Transit key namewitness_submit.rs:200
CORECRUX_C2PA_SIGNERenumnone, falls through to the legacy dual-flag pair-trimmed and lowercased; in_process / vault; an unknown value means in-process plus a warningCanonical single-flag C2PA signer selectorc2pa_signer_selector.rs:105
CORECRUXD_FEATURE_C2PA_OUTPUTboolfalseOFFT5The output_attest C2PA tooloutput_attest.rs:98
CORECRUXD_FEATURE_C2PA_X509_SIGNERboolfalseOFFT5Legacy dual-flag gate 1 for the Vault-PKI X.509 signeroutput_attest.rs:111
CORECRUXD_C2PA_SIGNER_BACKENDstringlegacy Ed25519-trimmed and lowercased; must equal vault-pki-p256Legacy dual-flag gate 2output_attest.rs:122
CORECRUXD_C2PA_SIGNING_KEY_B64base64 secretfalls back to CORECRUXD_WRITE_CONFIRMATION_SIGNING_KEY_B64-only used when paired with CORECRUXD_C2PA_KEY_ID, both non-blank; four base64 variants tried; at least 32 bytesC2PA manifest signing keyoutput_attest.rs:178
CORECRUXD_C2PA_KEY_IDstringfalls back to CORECRUXD_WRITE_CONFIRMATION_KEY_ID-must be paired as aboveC2PA manifest key idoutput_attest.rs:178
CORECRUXD_C2PA_LEAF_KEY_PATHpaththe default leaf key path-,Vault-PKI leaf private keyvault_pki_x509_signer.rs:174
CORECRUXD_C2PA_LEAF_CERT_PATHpaththe default leaf cert path-,Vault-PKI leaf certificatevault_pki_x509_signer.rs:177
CORECRUXD_C2PA_ROOT_ANCHOR_PATHpaththe default anchor path-,Vault-PKI root trust anchorvault_pki_x509_signer.rs:180
CORECRUXD_C2PA_LEAF_TTL_HOURSu64the default TTL; set-but-unparseable is a hard error-trimmed parseLeaf certificate TTLvault_pki_x509_signer.rs:183
CORECRUXD_WRITE_CONFIRMATION_SIGNING_KEY_B64base64 secretnone, signing unavailable-trimmed non-empty; standard base64CROWN write-confirmation signer, and the C2PA fallbackgrpc.rs:1060
CORECRUXD_WRITE_CONFIRMATION_KEY_IDstringlocal-env-ed25519 in the gRPC path; default-c2pa in the C2PA fallback, two different defaults-trimmed non-emptyWrite-confirmation key idgrpc.rs:1079
CORECRUXD_FEATURE_AUDIT_EXPORTboolfalseOFFT6 at the tool, T3-like at the scorecard, see §5.10 row 1Signed audit-bundle exportaudit_export.rs:61
CORECRUXD_AUDIT_EXPORT_DIRpaththe system temp dir plus crux-audit-export-blank-after-trim falls backWhere bundle artefacts are writtenaudit_export.rs:85
CORECRUXD_AUDIT_EXPORT_SIGNING_KEY_B64base64 secretfalls back to a persistent key auto-generated at <data_dir>/audit-export-signing.key, mode 0600-trimmed; four base64 variantsAudit-bundle signing keyaudit_signing_key.rs:98
CORECRUXD_AUDIT_EXPORT_KEY_IDstring""-unwrap_or_default()Signer key id in the bundle manifestaudit_signing_key.rs:72
CORECRUXD_FEATURE_RECEIPT_VERIFYboolfalseOFFT5 at the tool, strict at the scorecard, see §5.10 row 2The receipt_verify MCP toolreceipt_verify.rs:52
CORECRUXD_STREAM_RECEIPTSboolfalseOFFT1Stream and context receipt wiring, plus cloud-witness envelope ingestionconfig.rs:1345
CRUX_C2PA_VERIFY_PUBLIC_KEY_HEXhexnone, a CLI error unless --pub-key-hex is passed-exactly 64 hex charsVerifying key for corecruxctl output verifyoutput_verify.rs:54

5.21 Cost, credit, quota, usage receipts, coordination

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_FEATURE_COST_LENSboolfalseOFFT5The cost lens. When off there are zero on-disk writes for itcost.rs:38
CORECRUXD_CREDIT_METERboolfalseOFFT1Credit-burn rail for seeded comped walletsconfig.rs:1373
CORECRUXD_QUOTAboolfalseOFFT1Per-surface request quotaconfig.rs:1362
CORECRUXD_QUOTA_HOSTED_SURFACESCSV paths[]; everything is local compute-comma-split, trimmedPath prefixes classified as quota-limitedconfig.rs:1363
CORECRUXD_FEATURE_USAGE_RECEIPTSboolfalseOFFT1Local signed metadata-only usage pingsconfig.rs:1346
CORECRUXD_USAGE_RECEIPTS_SUBMITboolfalseOFFT1The only sanctioned outbound path. Enables the usage-ping submitterconfig.rs:1352
CORECRUXD_USAGE_RECEIPTS_ENDPOINTURLnone, no hardcoded endpoint-trimmed non-emptyUsage-ping destinationconfig.rs:1353
CORECRUXD_USAGE_RECEIPTS_CONSENT_ATtimestampnone-parse_consent_atRecorded operator consent timeconfig.rs:1358
CORECRUXD_HANDOFF_OBSERVATIONSboolfalseOFFT1 in config; T5 in the MCP handoff pathSigned handoff observations with vendor attributionconfig.rs:1347
CORECRUXD_COORDbooltrueONT1, an explicit 0 disablesMulti-agent coordination plane /v1/coord/*config.rs:1336
CORECRUXD_COORD_PRESENCE_TTL_SECSu64900, clamped from 60 to the coordination maximum-,Presence liveness horizonconfig.rs:1337

5.22 Workspace scan, code graph, ExecPlans

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_WORKSPACE_PATHpathnone, the scanner returns NotConfigured-non-blankRoot the workspace scanner runs againstworkspace_scan.rs:274
CORECRUXD_AST_SCANboolfalseOFFT7-shaped inlineAST-level scanningworkspace_scan.rs:293
CORECRUXD_EXTERNAL_DEPSboolfalseOFFT7Attach external dependency manifests to the scanworkspace_scan_manifests.rs:39
CORECRUXD_POLYGLOT_V2boolfalseOFFT7Adds JavaScript, JSX and Go to the code mapworkspace_scan_polyglot.rs:76
CORECRUXD_POLYGLOT_V3boolfalseOFFT7Adds Svelte, Java, C, C++, C#, Ruby, Swift and PHPworkspace_scan_polyglot.rs:80
CORECRUXD_CODEGRAPH_EDGESboolfalseOFFT7Emit code-graph edgesrepo_codegraph.rs:88
CORECRUXD_CODEGRAPH_EXTERNALboolfalseOFFT7Include external symbols in the code graphrepo_codegraph.rs:92
CORECRUXD_CODEGRAPH_FUSIONboolfalseOFFT7-shaped inlineFuse code-graph signal into retrievalcodegraph_fusion.rs:33
CRUX_EXECPLANS_ROOTpathnone: the ExecPlan projection returns an empty list, not an error-non-blankDirectory of *.md ExecPlans projected into /v1/workwork_execplans.rs:1130
CRUX_OPEN_DECISIONS_PATHpathnone: open_decisions stays empty-non-blankOpen-decisions registry pathwork_execplans.rs:1390
CORECRUXD_FEATURE_DRAFTING_STATEboolfalseOFFfeature_flag_enabledExpose the drafting ExecPlan statework_execplans.rs:116
CORECRUXD_FEATURE_NEXT_READY_MILESTONEboolfalseOFFfeature_flag_enabledExpose next_ready_milestone on work itemswork_execplans.rs:121

Nine additional code-map languages ship in every stock binary behind CORECRUXD_POLYGLOT_V2 and _V3. The tree-sitter grammars are unconditional dependencies, so enabling them costs nothing at build time. The default set is Rust, TypeScript, TSX, Python and Vue.

5.23 Remaining MCP tool feature flags

NameTypeDefaultFlagParseEffectRead at
CORECRUXD_FEATURE_MEMORY_PANELbooltrueONT5The memory_view and memory-panel surfacetools/memory.rs:72
CORECRUXD_FEATURE_FRESHNESSbooltrueONT5Freshness and decay, plus memory_reverifyfreshness.rs:59
CORECRUXD_FEATURE_CONSOLIDATIONbooltrueONT5The memory-consolidation surfaceconsolidation.rs:54
CORECRUXD_FEATURE_SCOPED_FORGETbooltrueONT6: =yes disables itmemory_forgetforget.rs:74
CORECRUXD_FEATURE_AUDIT_ENVELOPEboolfalseOFFT5Per-turn audit envelope on tool responsesenvelope.rs:105
CORECRUXD_FEATURE_MEMORY_ACKboolfalseOFFT5memory_acknowledge_use and memories_used[]memory_use.rs:94
CORECRUXD_FEATURE_MEMORY_ACK_INLINEboolfalseOFFT5Inline memory-ack annotation in the hook outputmemory_ack_inline.rs:40
CORECRUXD_FEATURE_APPROVAL_QUEUEboolfalseOFFT5Human-approval queue surfaceapprovals.rs:118
CORECRUXD_FEATURE_ARTEFACTSboolfalseOFFT5The artefacts tool familyartefacts.rs:60
CORECRUXD_FEATURE_AUTONOMY_CONTRACTboolfalseOFFT5b: no is truthyThe autonomy_contract toolautonomy.rs:46
CORECRUXD_FEATURE_REUSE_CHECKboolfalseOFFT5b: no is truthyThe reuse_check toolreuse.rs:38
CORECRUXD_FEATURE_ENGRAM_MCPboolfalseOFFT5b: no is truthyThe engram MCP tool surfaceengrams.rs:36
CRUX_CONTEXT_CUSTODY_AUDITboolfalseOFF`1\true\TRUE\yes\YES`, trimmed, case-sensitivecheck_config_audit and the context-custody scorecardcontext_custody_audit.rs:53

5.24 The Claude-hook family

These use an off sentinel: unset, or any value other than the exact string off, leaves the hook enabled. Two members have the opposite polarity, and they are marked.

NameTypeDefaultFlagParseEffectRead at
CRUX_HOOK_SESSION_STARTstringenabledON== "off" disablesSessionStart hook, the boot bannersession_start.rs:80
CRUX_HOOK_COORDstringenabledON!= "off" enablesLive-sessions section of the boot bannersession_start.rs:145
CRUX_HOOK_WIZARD_CHECKstringenabledON!= "off" enablesBundled-profile drift check in the bannersession_start.rs:172
CRUX_HOOK_CONFIG_AUDITstringenabledON== "off" disablesUnaudited-config warning in the bannerconfig_audit.rs:162
CRUX_HOOK_PRE_COMPACTstringenabledON== "off" disablesPreCompact hookpre_compact.rs:35
CRUX_HOOK_CONTEXT_MONITORstringenabledON== "off" disablesLoop and context-pressure warningscontext_monitor.rs:24
CRUX_HOOK_CODE_CONTEXTstringdisabledOFF`matches!(v, "1"\"true"\"on"\"yes")`, untrimmed and case-sensitive. Opposite polarity to its siblingsPreToolUse code-context injectioncode_context.rs:39
CRUX_HOOK_OBSERVE_CAPTUREbooldisabledOFFT4Audit capture writes to the daemon; pair with CORECRUXD_OBSERVE=1observe_capture.rs:34
CRUX_EXECPLAN_SLUGstringfalls back to .crux/active-execplan-non-blankPins the ExecPlan scope for file-mod observationsobserve_filemod.rs:71
CRUX_MILESTONEstringfalls back to .crux/active-execplan-non-blankPins the milestone scopeobserve_filemod.rs:72
CLAUDE_PROJECT_DIRpathskipped if unset-,Project root whose settings files are hashed for the config auditconfig_audit.rs:37
CRUX_LLM_SHIMbooldisabled, the subcommand refuses to runOFF1 or case-insensitive trueThe experimental LLM shimllm_shim/mod.rs:232
CRUX_CLOUD_WITNESSbooldisabled, the subcommand refuses to runOFF1 or case-insensitive trueCloud-witness modellm_shim/mod.rs:243
CRUX_CLOUD_WITNESS_SESSION_TOKENsecretnone, no session auth-non-empty; BLAKE3-hashed, constant-time comparedSession auth token for the cloud witnessllm_shim/mod.rs:119
CRUX_CLOUD_WITNESS_TEST_UPSTREAMURLnone-validated; only consulted when already permittedInsecure test upstream overridellm_shim/mod.rs:258
CARGO_HOMEpath$HOME/.local/bin is tried first-,$CARGO_HOME/bin/corecruxctl discoveryhooks_bridge.rs:44
PATHpath list-,split_pathscrux-hook binary discoverycrux-config-wizard/src/hooks_install.rs:149

5.25 The corecruxctl CLI and compile-time variables

NameTypeDefaultEffectRead at
CORECRUXCTL_ENVenumlocalTooling environment; local / staging / production. An invalid value is an error. Non-local requires ops evidencetooling_env.rs:44
CORECRUXD_BINARYpatha derived defaultDaemon binary used by the integration-test harnesscrux-integration-tests/src/lib.rs:265
CORECRUXD_STARTUP_TIMEOUT_SECSu6410Per-attempt daemon boot timeout for the harnesscrux-integration-tests/src/lib.rs:91
CARGO_PKG_VERSIONcompile-timethe build fails if absentServer version, agent-card version, client_version, the default C2PA claim generatordispatch.rs:394
CARGO_MANIFEST_DIRcompile-timethe build fails if absentFixture and proto path resolution in build scripts and testscorecruxd/build.rs:51
CORECRUX_GIT_SHAbuild-time envfalls back to git rev-parse, then unknownBaked into --version; a 40-char CI sha is truncated to 7corecruxd/build.rs:21

5.26 Test-only variables

Every read site of these is inside test or example code. They must not appear in an operator's environment.

NamePurposeRead at
CORECRUX_SOAK_SECSSoak-test duration, default 2corecrux-storage/src/tests.rs:968
CORECRUX_SOAK_MAX_EVENTSSoak-test event cap, default 50000corecrux-storage/src/tests.rs:972
CORECRUX_SOAK_STREAMSSoak-test stream count, default 16corecrux-storage/src/tests.rs:976
CORECRUX_SOAK_LOG_EVERYSoak-test log cadence, default 5000corecrux-storage/src/tests.rs:980
CORECRUX_SOAK_EQ_CHECK_EVERYSoak-test equality-check cadence, default 1024corecrux-storage/src/tests.rs:984
CRUX_LIVE_REKOR_SEEDVaries the head digest across live Rekor staging runs to avoid duplicate-entry conflictswitness_submit.rs:938
CRUX_BENCH_COMMITCommit sha stamped into token-bench recordstoken_bench.rs:274
CRUX_BENCH_RUN_IDRun id stamped into token-bench recordstoken_bench.rs:275
CRUX_C2PA_DUMP_DIRDump C2PA leaf, body and signature for third-party verificationvault_c2pa_m4_integration.rs:102
C2PATOOL_BINPath to c2patool for the interop legvault_c2pa_m4_evidence.rs:148
C2PA_M4_SUMMARY_OUTMachine-readable evidence summary output pathvault_c2pa_m4_evidence.rs:304
VAULT_C2PA_ROOT_PEMRoot PEM for the evidence test; the test fails if absentvault_c2pa_m4_evidence.rs:147
CORECRUXD_QUERY_GRAPH_EXPAND_TEST_FAKE_ENVA deliberately non-existent name, proving the opt-in default is offhttp/tests.rs:4254
CORECRUXD_QUERY_TIME_RANGE_TEST_FAKE_ENVThe same, for time-range querieshttp/tests.rs:4255
CORECRUXD_TEST_DEFAULT_ONExercises env_default_onconfig.rs:1881
CORECRUXD_TS_TEST_FLAG_XExercises env_flag_enabled truthy valuesauth_rails.rs:382
__TEST_GATE_ENABLED__Exercises is_query_feature_enabledhttp/tests.rs:4474
CARGOPath to the cargo binary for re-invoking an exampletoken_bench_determinism.rs:20
CARGO_BIN_EXE_corecruxctlCargo-provided path to the built CLIcorecruxctl integration tests

CRUX_BANNER_CARD appears only as an assertion string in profile.rs:237, checking that the bundled profile text documents the switch. It is not read as an environment variable anywhere.

5.27 Strings that look like environment variables but are not

Recorded so you do not chase them.

  • FUSION_RRF_LANE_WEIGHTS and FEATURE_FUSION_RRF (console.rs:291) are tenant and global settings-overlay map keys, not environment.
  • The strings at route_auth.rs:358 and eight sibling lines are documentation labels passed to RouteAuthContract::gated(...). The real reads live in config.rs. CORECRUXD_AGENTGRAPH at route_auth.rs:528 is the one label with no corresponding read.
  • "CORECRUXD_TRUSTED_PROXY_CIDRS" and "CORECRUXD_RATE_LIMIT_EXEMPT_CIDRS" at ingress.rs:232 are error-message labels; the values arrive from Config, not from the environment.
  • IO_READ_FAILED, SEGMENT_CORRUPT and the DRIFT_* family at corecrux-types/src/lib.rs:38 are error and drift codes.
  • The AKIA… strings scattered through the redaction tests are fixtures.

5.28 Secret handling

Three facts an operator should know before putting secrets in this environment.

  • Only one secret is redaction-aware. CORECRUXD_EMBED_DELEGATE_TOKEN is wrapped in RedactedSecret, whose Debug implementation prints [REDACTED] (config.rs:307). Every other secret in Config is a plain String and will appear verbatim in a Debug dump, notably sync_api_key and receipts_keyring_json.
  • CORECRUXD_SYNC_API_KEY and CORECRUXD_SYNC_REMOTE_URL use unwrap_or_default(), so an unset value becomes "", indistinguishable from a deliberately blank one.
  • CORECRUXD_RECEIPTS_KEYRING_PATH and _JSON are read with no trimming and no empty-string filter (config.rs:991); a stray trailing space becomes part of the path.

Separately: the daemon passport key encrypts stored third-party integration credentials via a derived subkey (main.rs:856). Losing or rotating the passport key makes stored integration tokens undecryptable. Treat it as a backup-critical secret, see chapter 6 §6.4.

5.29 A practical operator subset

Of the 393 variables, a typical deployment sets fewer than twenty. This is the working set, and none of it is a substitute for the tables above.

VariableWhy you set it
CORECRUXD_AUTH_MODEMandatory. The daemon will not start without it
CORECRUXD_DATA_DIRBecause the default is relative
CORECRUXD_HTTP_HOST / _PORTIf you are not on loopback
CORECRUXD_ALLOW_INSECURE_DEV_AUTH_BINDOnly with off or dev_scopes on a non-loopback bind, and only knowingly
CORECRUXD_JWT_HS256_SECRET or the JWKS setWith a JWT auth mode
CRUX_AGENT_TOKEN / CRUX_AGENT_TOKENSTo authenticate the MCP plane
LOG_FORMAT=jsonFor a structured-log pipeline. Not CORECRUX_LOG_FORMAT
RUST_LOG or CORECRUXD_LOG_LEVELLog verbosity
CORECRUXD_REDACT=onIf you ship logs off-box; the default only counts
CORECRUXD_PASSPORT_CLAIM_ON_STARTUP=0For an air-gapped or privacy-sensitive deployment
CORECRUXD_ROUTE_AUTH=enforceTo make the route-auth middleware actually block
CORECRUXD_CAPACITY_EMERGENCY_FREE_RATIOTo tune the readiness disk gate
CORECRUXD_OBS_RETENTION_DAYSObservations are retained forever by default
CORECRUXD_EPHEMERAL_GC=1To reclaim bookkeeping facts
CORECRUXD_BUILD_CCXI=1To build BM25 companion indexes at seal time