Skip documentation navigation

Environment variables

Every variable uses the BEC_ prefix. Set them on the process that starts Claude Code or Codex.

Value formats:

  • Booleans read 1, true, yes, and on as true, and 0, false, no, off, and the empty string as false, case-insensitive. A value outside those two sets leaves the key alone.
  • Id lists are comma-separated and trimmed.
  • Path lists split on the platform path delimiter (: on Linux and macOS, ; on Windows).
  • A BEC_ALLOW_* or BEC_BYPASS_* value that starts with [ is parsed as a JSON array, and any other value as a comma list.

The layer column refers to the 5 config layers in configuration.md. Layer 2 sits under the BEC_CONFIG_PATH file, the user file, and the project file. Layer 5 sits over all three.

VariableValueEffectLayer
BEC_CONFIG_JSONJSON objecta whole config layer2
BEC_CONFIG_PATHpatha config file read under the user file and the project file; a relative path resolves against the cwd3
BEC_CONFIG_PATH_ONLYbooleanskips the user file and the project file, so only the BEC_CONFIG_PATH file applies3, 4
BEC_FEATURE_ENABLEid listturns features and checks on2
BEC_FEATURE_DISABLEid listturns features and checks off2
BEC_FEATURE_ALWAYS_ENABLEid listturns features and checks on over the config files5
BEC_FEATURE_ALWAYS_DISABLEid listturns features and checks off over the config files5
BEC_ENABLE_PATTERNSid listadds to features.aiWriting.enablePatterns2
BEC_DISABLE_PATTERNSid listadds to features.aiWriting.disablePatterns2
BEC_ALWAYS_ENABLE_PATTERNSid listthe same key, over the config files5
BEC_ALWAYS_DISABLE_PATTERNSid listthe same key, over the config files5
BEC_LOAD_LIB_PATHSpath listappended to features.aiWriting.packs2
BEC_HOOK_SOFT_FAILbooleansoftFail5
BEC_DISABLE_STOP_HOOKbooleanstopHook, inverted5
BEC_LOG_ENABLEDbooleanlog.enabled5
BEC_LOG_PATHpathlog.path5
BEC_LOG_MAX_SIZEbytes, or a k, m, g suffixlog.maxSize5
BEC_LOG_MAX_FILESpositive integerlog.maxFiles5
BEC_LOG_ROTATEsize, daily, or bothlog.rotate5
BEC_LOG_USE_JSONbooleanlog.format as json5
BEC_LOG_USE_PLAINTEXTbooleanlog.format as plaintext, which wins over BEC_LOG_USE_JSON5
BEC_MONITOR_PERSISTbooleanmonitor.persist5
BEC_MONITOR_DISABLED1skips the project registry, the record file, and the console feednone
BEC_ALLOW_PHRASESphrase listallowList.phrases5
BEC_ALLOW_PATTERNSregex listallowList.patterns5
BEC_BYPASS_PHRASESphrase listbypass.phrases5
BEC_BYPASS_PATTERNSregex listbypass.patterns5

Feature ids for BEC_FEATURE_*: emDash, aiWriting, dictionary, comments, fileSize, prBody, stopHook, and the scan switches codeFiles, notebooks, heredocWrites, shellWrites, mcp, plans, tasks, and questions.

Pattern ids for BEC_*_PATTERNS: a category id, a pack id, or tag:<tag>. An unknown id is ignored. The category ids are listed in categories.md.

Scenario 1: a cloud agent with no config file

A cloud agent checks the repo out fresh and writes no config file. Set the whole configuration in the environment.

export BEC_FEATURE_ENABLE=emDash,aiWriting
export BEC_ENABLE_PATTERNS=file-narration,benefit-tail
export BEC_HOOK_SOFT_FAIL=1
export BEC_LOG_ENABLED=1

After those 4 lines, the dash check and the AI writing check run under the default preset, file-narration and benefit-tail run on top of it, every deny comes back as an allow prefixed [concise] soft-fail:, and one record per hook call lands in ~/.cache/concise/concise.log.

Set preset from the environment with BEC_CONFIG_JSON:

export BEC_CONFIG_JSON='{"features":{"aiWriting":{"enabled":true,"preset":"technical"}}}'

Scenario 2: force one category off over the project file

The project file sets "preset": "ryan", which turns on formatting. A repo that prefixes commit subjects with a gitmoji trips it on every commit. Turn that one category off for your sessions.

BEC_ALWAYS_DISABLE_PATTERNS=formatting claude

BEC_DISABLE_PATTERNS sits at layer 2, under the project file, so a project file that lists formatting in categories would win. BEC_ALWAYS_DISABLE_PATTERNS sits at layer 5, over the project file, and takes the category off in both cases.

The feature form works the same way. BEC_FEATURE_ALWAYS_DISABLE=aiWriting turns the whole AI writing check off over a project file that enables it.

Scenario 3: turn logging on for one session

BEC_LOG_ENABLED=1 BEC_LOG_PATH=/tmp/concise.log BEC_LOG_USE_PLAINTEXT=1 claude

Each hook call appends one line of ts hook tool decision key summary to /tmp/concise.log, with - for an empty cell. Read the denials with:

grep ' deny ' /tmp/concise.log

To keep the default JSON records and rotate them daily instead:

BEC_LOG_ENABLED=1 BEC_LOG_ROTATE=daily BEC_LOG_MAX_FILES=7 claude

That writes ~/.cache/concise/concise.YYYY-MM-DD.log and keeps 7 of them.