CClawMetryDocs

Configuration

Environment variables#

ClawMetry is zero-config by design; everything here is an override for a situation auto-detection cannot see. Nothing on this page is required.

Paths and identity#

VariableDefaultEffect
CLAWMETRY_HOME~/.clawmetryClawMetry's own state directory
CLAWMETRY_LOCAL_STORE_PATHinside CLAWMETRY_HOMEThe DuckDB store file
CLAWMETRY_NODE_IDhostnameThis node's identity
OPENCLAW_HOME~/.openclawOpenClaw workspace root
CLAWMETRY_OPENCLAW_DIR~/.openclawOpenClaw config directory. Same as --openclaw-dir.
OPENCLAW_DATA_DIROpenClaw data directory
OPENCLAW_WORKSPACEOpenClaw workspace directory
OPENCLAW_SESSIONS_DIRSession transcript directory
OPENCLAW_LOG_DIRLog directory
OPENCLAW_METRICS_FILEMetrics persistence file
CLAWMETRY_REPO_ROOTRepository root, for git-join features

Gateway#

VariableEffect
OPENCLAW_GATEWAY_TOKENGateway authentication token
OPENCLAW_GATEWAY_URLGateway URL
OPENCLAW_GATEWAY_PORTGateway port (default 18789)
CLAWMETRY_ENABLE_WS_TAP0 disables the gateway WebSocket tap. Default on.

Ingest#

VariableDefaultEffect
CLAWMETRY_FAMILY_SESSION_LIMIT50Recent sessions ingested per runtime per pass
CLAWMETRY_FAMILY_EVENT_CAPEvents pulled per session
CLAWMETRY_INTERCEPT0Activate the HTTP interceptor at startup
CLAWMETRY_TRACK0Activate the interceptor on package import
CLAWMETRY_NO_INTERCEPTOpt out even when clawmetry.track is imported
CLAWMETRY_SOURCEName the intercepted source
CLAWMETRY_INTERCEPT_HOSTS_EXCLUDEComma-separated hosts to skip
CLAWMETRY_INGEST_TOKENToken for the custom-runtime ingest API
CLAWMETRY_VM_USAGE_LOGHosted-VM loopback usage log path
CLAWMETRY_VM_USAGE_RUNTIMEWhich runtime that log belongs to
CLAWMETRY_DISABLE_CLAUDE_SESSION_INGESTTurn off the Claude Code adapter

OpenTelemetry#

VariableDefaultEffect
CLAWMETRY_OTLP_ALLOW_UNAUTH0Accept unauthenticated OTLP. Loopback only.
CLAWMETRY_OTLP_MAX_DECOMPRESSED_MB64Reject payloads expanding beyond this
CLAWMETRY_OTLP_APP_CAPCap on distinct applications accepted
CLAWMETRY_OTEL_EXPORT_ENDPOINTOTLP endpoint to push ClawMetry's own metrics to
CLAWMETRY_OTEL_EXPORT_HEADERSJSON object of headers for that push
CLAWMETRY_OTEL_EXPORT_INTERVALExport cadence in seconds

Store#

VariableDefaultEffect
CLAWMETRY_LOCAL_FLUSH_SECSFlush cadence
CLAWMETRY_LOCAL_FLUSH_BATCHFlush batch size
CLAWMETRY_LOCAL_MAX_GBSoft cap on store size
CLAWMETRY_DUCKDB_MEMORY_LIMITDuckDB memory limit
CLAWMETRY_DUCKDB_THREADSDuckDB thread count
CLAWMETRY_AUTO_VACUUMAutomatic compaction
CLAWMETRY_RETENTION_DAYStier capRetention window, within tier limits
CLAWMETRY_RETENTION_INTERVAL_HOURSHow often retention runs
CLAWMETRY_ROLLUP_BACKFILL_CHUNK5000Rows per rollup-backfill pass
CLAWMETRY_INTEGRITYMaintain the tamper-evident hash chain
CLAWMETRY_CCR0Compress content on write
CLAWMETRY_ROLEProcess role. The dashboard sets dashboard so it never takes a writer lock.

Guard and detectors#

VariableDefaultEffect
CLAWMETRY_DETECTORS1Run the trajectory detectors
CLAWMETRY_STUCK_DETECT1The same switch, older spelling
CLAWMETRY_GUARD_POLICIES1Evaluate policies at all
CLAWMETRY_POLICY_ENFORCE0Let a policy actually signal a process
CLAWMETRY_DETECT_WINDOW200Newest events any detector examines
CLAWMETRY_LOOP_IDENTICAL_K3Identical calls for stuck_loop
CLAWMETRY_LOOP_MAX_CYCLE4Maximum cycle length
CLAWMETRY_LOOP_CYCLE_REPEATS3Cycle repeats needed
CLAWMETRY_NOPROG_TOOLS20Tool calls for no_progress
CLAWMETRY_REPEAT_FAIL_M3Failures for repeated_tool_failure
CLAWMETRY_ACTION_DISCREPANCY_MIN1Occurrences for action_discrepancy
CLAWMETRY_BLAST_FILES25Files for file_blast_radius
CLAWMETRY_EGRESS_HOSTS8Distinct hosts for network_egress
CLAWMETRY_BASELINE_MIN_SESSIONS20Sessions before a learned baseline is used
CLAWMETRY_BASELINE_SIGMA2.0Standard deviations above the mean
CLAWMETRY_BASELINE_FLOOR0.5Lower clamp, as a ratio of the default
CLAWMETRY_BASELINE_CEIL5.0Upper clamp, as a ratio of the default
CLAWMETRY_GUARD_CRITICAL_USD5Spend at which a warning becomes critical

Per-runtime tuning. Append __<RUNTIME> to any detector threshold variable to scope it:

bash
CLAWMETRY_NOPROG_TOOLS__CODEX=40
CLAWMETRY_BLAST_FILES__CLAUDE_CODE=60

Thresholds and baselines

Proxy and budgets#

VariableEffect
CLAWMETRY_PROXY_DAILY_USDDaily budget
CLAWMETRY_PROXY_MONTHLY_USDMonthly budget
CLAWMETRY_PROXY_AUTO_ROUTEAutomatic model routing
CLAWMETRY_HARD_BLOCKHard block behaviour
CLAWMETRY_HARD_BLOCK_ESCAPEEscape hatch for a hard block

Cloud and licensing#

VariableEffect
CLAWMETRY_ENDPOINTWhere snapshots are pushed
CLAWMETRY_INGEST_URLIngest URL override
CLAWMETRY_API_KEYAPI key
CLAWMETRY_TOKENAuth token for API calls
CLAWMETRY_NO_CLOUD1 forces local-only mode
CLAWMETRY_OFFLINESkip every network call
CLAWMETRY_SELF_HOSTEDSelf-hosted server mode
CLAWMETRY_SELF_HOSTED_DBDatabase for that server
CLAWMETRY_SELF_HOSTED_E2EEnd-to-end encryption on a self-hosted endpoint
CLAWMETRY_FLEET_KEYFleet authentication key
CLAWMETRY_FLEET_DBFleet database path
CLAWMETRY_LICENSE_SERVERAlternative license server
CLAWMETRY_LICENSE_PINGWhether an optional check-in happens
CLAWMETRY_ENFORCEEnable entitlement enforcement
CLAWMETRY_ENFORCE_ATEnforce as though at a given tier

Security and network#

VariableDefaultEffect
CLAWMETRY_API_TOKENSComma-separated tokens accepted on the API
CLAWMETRY_REDACT1Redact secret-shaped values. 0 opts out.
CLAWMETRY_CA_BUNDLECustom CA bundle
CLAWMETRY_TLS_NO_VERIFYDisable TLS verification. Diagnostics only.
CLAWMETRY_MAX_REQUEST_MBGlobal request size cap
CLAWMETRY_ADMIN_USERAdmin user for protected surfaces

Updates#

VariableDefaultEffect
CLAWMETRY_AUTO_UPDATE1Kill switch for unattended upgrades
CLAWMETRY_UPDATE_CHECK_SECS60PyPI check cadence
CLAWMETRY_AUTOUPDATE_MIN_AGE_HOURS0Stability window before installing a release
CLAWMETRY_AUTOUPDATE_RETRY_SECSRetry interval after a failed update

Evals and insights#

VariableEffect
CLAWMETRY_EVALS_ENABLEDMaster switch for the eval subsystem
CLAWMETRY_EVALS_REGRESSION_ENABLEDSwitch for regression replay
CLAWMETRY_EVALS_REGRESSION_MAXDefault replay ceiling
CLAWMETRY_EVALS_AGENT_CMDCommand used to run a replay
CLAWMETRY_INSIGHTSEnable the insights digest
CLAWMETRY_NARRATOR_MODELModel used for narrative summaries
CLAWMETRY_REVIEW_SAMPLE_SIZESample size for review accuracy
CLAWMETRY_SELFEVOLVE_AUTOAllow Self-Evolve to act automatically
CLAWMETRY_OUTCOME_FAILURE_PATTERNSPipe-separated regexes classifying a session as failed

Behaviour and diagnostics#

VariableEffect
DEBUGVerbose logging
CLAWMETRY_NO_BROWSERNever open a browser
CLAWMETRY_NO_TELEMETRYDisable ClawMetry's own usage telemetry
CLAWMETRY_SHOW_INTERNAL_SESSIONSSurface ClawMetry's own internal sessions. For debugging ClawMetry itself.
CLAWMETRY_PROVIDERData backend: local or turso
CLAWMETRY_QUERY_CACHE_PUSHPush cached query results in the snapshot. Default off.
CLAWMETRY_HARNESS_HOOKSEnable test-harness hooks. Not for production.
NO_COLORPlain output

Per-runtime data locations#

Each runtime has its own override. The full list, with the discovery order, is on each runtime's reference page. The pattern:

RuntimeClawMetry overrideRuntime's own
Claude CodeCLAWMETRY_CLAUDE_DESKTOP_DIRCLAUDE_CONFIG_DIR
CodexCODEX_HOME
CursorCLAWMETRY_CURSOR_DB, CLAWMETRY_CURSOR_AGENT_ROOT, CLAWMETRY_CURSOR_CHATS_ROOT
ClineCLAWMETRY_CLINE_DATA_DIRCLINE_DATA_DIR, CLINE_DIR
CopilotCLAWMETRY_COPILOT_HOME
Gemini CLICLAWMETRY_GEMINI_CLI_HOMEGEMINI_CLI_HOME
Qwen CodeQWEN_HOME
AntigravityCLAWMETRY_ANTIGRAVITY_HOME
GooseCLAWMETRY_GOOSE_DBGOOSE_PATH_ROOT, XDG_DATA_HOME
opencodeCLAWMETRY_OPENCODE_DBXDG_DATA_HOME
DevinCLAWMETRY_DEVIN_DB, CLAWMETRY_DEVIN_HOMEXDG_DATA_HOME
OpenHandsCLAWMETRY_OPENHANDS_HOMEOPENHANDS_PERSISTENCE_DIR
OpenWorkerCLAWMETRY_OPENWORKER_STATE_DIRCOWORKER_STATE_DIR
Deep AgentsCLAWMETRY_DEEPAGENTS_DB
DeepSeek HarnessDSH_HOME
KimiCLAWMETRY_KIMI_ROOTSKIMI_SHARE_DIR
GrokCLAWMETRY_GROK_HOME
HermesHERMES_HOME
PicoClawPICOCLAW_HOME
NanoClawCLAWMETRY_NANOCLAW_DIR
PiCLAWMETRY_PI_DIRPI_CODING_AGENT_SESSION_DIR
ExoCLAWMETRY_EXO_ROOTS
n8nCLAWMETRY_N8N_DB, CLAWMETRY_N8N_URL, CLAWMETRY_N8N_API_KEYN8N_USER_FOLDER
QMCLAWMETRY_QM_DATABASE_URLDATABASE_URL
AiderAIDER_HISTORY_DIRS
Cookie preferences