Skip to main content

Troubleshooting

Start with the two diagnostic commands, then drill into the specific failure below.

llmenv doctor # validate config + wiring; run llmenv clean to clean the cache
llmenv context # show resolved scopes/tags/bundles for the current dir

My config isn't being picked up​

  • Wrong config path. llmenv reads $LLMENV_CONFIG_DIR if set, otherwise the platform config dir (~/.config/llmenv). Confirm with llmenv status, which reports the file it loaded.
  • Parse error. llmenv doctor reports YAML parse failures and missing required fields. A common cause is an unquoted value with a colon — see Configuration → YAML gotchas.

A scope never activates​

llmenv status scopes # marks active scopes
llmenv status tags # marks active tags
  • Network scopes match on gateway_mac, cidr, or ssid. A VPN or captive network can change or hide the gateway, leaving the scope unmatched. An ssid scope never matches when the platform hides the SSID (macOS 15 prints <redacted>), and llmenv doctor says so. Fall back to a host scope (matches by hostname, always reliable) that emits the same tag.
  • Host scopes match case-insensitively against the local hostname. Run hostname and compare.
  • User scopes match $USER exactly.

A project marker isn't detected​

  • The .llmenv.yaml walk ascends from the current directory to $HOME inclusive, then stops. A marker above $HOME is intentionally ignored.
  • When $HOME is unset, only the current directory itself is checked.
  • Confirm detection with llmenv context — LLMENV_ACTIVE_PROJECT and LLMENV_PROJECT_ROOT are set only when a marker matched.
  • Malformed marker YAML degrades to defaults (id/name from the folder basename) and logs a warning; it does not fail the whole resolution.
  • A marker that is a link to a file outside its folder is refused (changed in v3.13.0). The notice names the marker and the target. Replace the link with a regular file, or move the target into the folder.

A bundle / MCP server / plugin won't fire​

These all select by tag intersection. If a contributor's tags aren't in the active set, it stays dormant.

  • Check the active tags with llmenv status tags.
  • llmenv doctor flags orphans: a contributor whose tags no scope emits, and a scope whose tags no contributor consumes.
  • To force a bundle on inside a project regardless of tags, add it to the marker's enable_bundles list.

The agent is running stale config​

After you change config, a running agent keeps the directory it booted with. The SessionStart hook runs llmenv hook-run session_start, which compares the booted content hash against the current one and prints a restart hint on drift (it ran as a separate llmenv check-stale hook before v3.11.0). You can run the check on its own:

llmenv check-stale

Restart the agent to pick up the new config.

The cache is growing / I want a clean slate​

llmenv clean --dry-run # preview every item a real run removes
llmenv clean # old-version folders, orphaned *.tmp, and old state files
llmenv clean --older-than 14d # also current-version folders older than 14d
llmenv clean --all # nuke everything (re-materializes on next export)

Claude Code says CLAUDE.md is large​

(added in v3.12.0)

Claude Code warns at startup when the instruction files it loads are large, and the warning names files under ~/.cache/llmenv/. Do not edit those files, because llmenv regenerate overwrites them. Run llmenv doctor and read the Instruction size (Claude Code): section. It prints the total and the largest contributors with their bundle names. Trim the named bundle's CLAUDE.md text or rule, or add a paths: list to a rule that only matters for some files. Then run llmenv regenerate.

Doctor warns about retired Claude Code settings​

(added in v3.12.0)

Claude Code retires settings keys, environment variables, and tools over time. A retired entry in your config does nothing, and Claude Code does not tell you. llmenv doctor reads the rendered settings.json and .claude.json in the folder that CLAUDE_CONFIG_DIR points to, and prints a Retired Claude Code settings: section when it finds one. Run doctor in a shell that has the llmenv hook; without CLAUDE_CONFIG_DIR, doctor skips the check and says so. Each line names where the entry is, the Claude Code version that dropped it, and what to use instead:

âš  settings.json env: CLAUDE_CODE_CONNECT_TIMEOUT_MS has no effect since Claude Code 2.1.186.
Use API_TIMEOUT_MS instead.
âš  settings.json: voiceEnabled is deprecated. Use voice.enabled.

A settings.json that an older llmenv rendered can hold advisorSize. llmenv wrote that key before v3.12.0 and Claude Code never read it, so doctor warns and names advisorModel. Run llmenv regenerate to clear it.

The list follows Claude Code's own settings reference, environment-variable reference, and changelog. The rendered files collect entries from native.claude_code, capabilities.env, permission rules, MCP entries, and keys that Claude Code writes itself, so remove the entry from whichever of those holds it. The check only warns: it never changes the exit status, and llmenv validate does not report it. If a rendered file is not valid JSON, doctor names the file and skips it.

Four token-efficiency checks also changed in v3.12.0:

  • CLAUDE_AUTOCOMPACT_PCT_OVERRIDE must be a whole number from 1 to 100. Doctor warns about a value outside that range, and about a value above 70, because PreCompact hooks then have too little room to run.
  • When native.claude_code.autoCompactEnabled is false, doctor reports info and recommends no CLAUDE_AUTOCOMPACT_PCT_OVERRIDE, because automatic compaction is off. When autoCompactWindow is set, at top level or under modelSettings, the message names the window the percentage applies to. The unset warning says the variable only matters in sessions that compact before the model's limit.
  • When native.claude_code.bashOutputMaxChars is set, doctor reports it and skips BASH_MAX_OUTPUT_LENGTH, because Claude Code ignores the variable while the setting is set.
  • CLAUDE_CODE_PROMPT_CACHE_TTL takes precedence over ENABLE_PROMPT_CACHING_1H. The prompt-cache check passes when the TTL is 1h, and warns when it is set to another value. When the TTL is unset, it checks ENABLE_PROMPT_CACHING_1H. When neither is set, it prints an info line instead of a warning: subscription plans get the 1-hour TTL on the main conversation without any variable.

Background work that did not finish​

(added in v3.12.0)

llmenv runs four jobs in a detached child: post-session consolidation, the ICM store of a web fetch, the transcript record of a session event, and the codebase-memory-mcp index. Each job writes a checkpoint file to <state dir>/checkpoints/ first, and deletes it when the job succeeds. A file that stays means the job did not finish, for example because the memory proxy was down.

llmenv doctor prints a Background work: section with one line for each checkpoint: the job, its age, the attempts so far out of 3, its phase, and the log to read (<state dir>/detached-hook.log). A checkpoint that is not yet old enough to be stale shows as info, because its child may still be running.

At each new session start, llmenv runs a stale job again, up to 3 attempts, and at most 20 jobs. A job runs in the directory of its first run. If that directory is gone, llmenv does not run it. After the third attempt the file stays, so doctor keeps showing it. To abandon a job, delete its file under checkpoints/. llmenv deletes checkpoints that are older than 7 days.

settings.json.corrupt appears in the config folder​

(added in v3.12.0)

llmenv found a settings.json that is not valid JSON, for example after a half-written save. It moved the file to settings.json.corrupt and wrote a new one, and it printed a warning with the parse error. Compare the two files, copy any key that you need back into your llmenv config, and delete the .corrupt file. If llmenv cannot move the file, the render stops and names the file. Fix or remove it, and run llmenv regenerate. When settings.json is a symlink, llmenv moves the file that the link points to, and the link stays (changed after v3.12.2).

A .corrupt file appears in the slippage state folder​

(added in v3.14.0)

Each session keeps its read_before_edit record in slippage/<session>.json under the llmenv state folder. When a Read finds that file unparseable, llmenv moves it to <session>.json.corrupt and starts a new record. A second corruption uses <session>.json.corrupt.1, then .2, so an earlier copy is never replaced. The notice to the agent names the copy. llmenv removes a copy once it is 7 days old, the same age as the stats log it came from. Delete the copy sooner when you no longer need it. llmenv moves the file only for a regular file that it cannot parse, and only while it holds the session lock. For any other read failure, such as a permission error, the file stays where it is, and the Read is not recorded.

(changed after v3.12.2)

llmenv keeps a symlink at settings.json, .claude.json, plugins/installed_plugins.json, or config.yaml. It writes the file that the link points to, and it does not change the permissions of that file's folder. The written file is readable by its owner only. A link whose target does not exist stops the write with an error that names the link and its target. Create the target file, or remove the link so that llmenv writes a plain file.

A bundle hook warns that a path is not in the bundle files​

(changed in v3.12.0)

A bundle hook command can name a script. llmenv copies a script from the bundle to the cache folder and points the command at the copy. The warning says the command names a script path that is not in the bundle files, so llmenv did not copy it. It names the bundle and the path, and it prints once for each bundle and path.

  1. Put the script in the bundle, in a folder such as hooks/.
  2. Use a path inside the bundle, such as bash hooks/guard.sh.

The warning does not fire for an inline shell command. A / that is part of shell syntax, such as the jq // operator, 2>/dev/null, or a URL, is not a script path. A path in a system folder, such as /usr/bin/env, is not a script path either.

A program is reported as not found​

(changed in v3.13.0)

llmenv looks for a program only in the absolute folders of PATH. A relative folder such as . names a different place in each working folder. So a file in a cloned repository could stand in for the real program. This covers the engines, icm, mcp-proxy, uvx, lsof, and codebase-memory-mcp. It also covers a stdio MCP server, git, and the gh that the statusline runs. The network and SSID scope detectors are covered too. They are route, arp, ip, networksetup, ipconfig, iw, nmcli, and netsh. When one of them is not found, its scopes do not match. llmenv also gives mcp-proxy the absolute path of icm, because mcp-proxy would otherwise do its own PATH search. The hook commands in each engine's config name the running llmenv binary by its absolute path (changed in v3.14.0). When that path is not UTF-8, or the OS cannot report it, llmenv export and llmenv regenerate fail. The error names the path and the fix. A bare llmenv would let a PATH entry run another program, so no fallback is used. llmenv doctor uses the same lookup and reports the same error (added in v3.14.0). llmenv doctor also warns when the hook path is in a cargo target folder or a temp folder, or names a binary that was removed. Install llmenv, then run llmenv regenerate with the installed binary (added in v3.14.0).

If a program is installed but reported as not found, run llmenv doctor. It names the relative PATH folders that llmenv skips. Add the program's folder to PATH as an absolute path.

A task command refuses​

(added in v3.12.0)

The task tracker refuses some commands, to keep the task list true. Each refusal names the fix.

  • task start says a task is queued behind another task. Top-level tasks run one at a time, in the order you added them. Finish the task ahead with llmenv task done <slug>, or park it with llmenv task wait <slug> "<reason>". Pass --force, or add the task with --parallel, when it can run beside the other task.
  • task done says a task was never started. Run llmenv task start <slug> first, or pass --force when the work is done without tracking.
  • task done on a parent lists sub-tasks that are not done. Finish them, or pass --force.
  • task session finish lists the tasks that are open, wip, or waiting. Finish them, clear one with llmenv task clear <slug>, or pass --abandon-open.
  • git commit or gh pr create is denied once with no task in progress. Run the commands in the message, then run the same command again. Set features.task_tracker.enforce_commit: false to turn the deny off. A commit that the Monitor tool starts is denied the same way (changed in v3.14.0).
  • git commit is denied with "cannot be read" in the message (changed in v3.13.0). The message names the file or the task store that cannot be read. Fix that file or its permissions, then run the command again. The deny repeats until the file is readable.
  • An agent follows an instruction that says the task tools are blocked. Run llmenv doctor and read the Task tracker instructions: section. It names the bundle file that holds the text. Reword it in the source bundle, then run llmenv regenerate.

See task for the rules.

An error says an environment variable is not valid UTF-8​

(added in v3.12.2)

llmenv reads HOME, USER, CLAUDE_CONFIG_DIR, LLMENV_EXTRA_TAGS, CLAUDE_CODE_SESSION_ID, and CLAUDE_PID. A value that is not UTF-8 is no longer treated as unset. A command that reads HOME, USER, or CLAUDE_CONFIG_DIR stops with an error that names the variable. An example is HOME is not valid UTF-8; set HOME to a UTF-8 value and retry. This covers llmenv doctor, llmenv setup, user-scope matching, the keychain read, and the task project tag. (changed in v3.13.0) EDITOR, VISUAL, SHELL, BASH_COMPLETION_USER_DIR, and ZSH_CUSTOM also stop with this error. The statusline and color settings log the error and read the variable as unset.

  • The config guard prints its error and does not run.
  • For LLMENV_EXTRA_TAGS, a command stops, and a hook logs the error and skips the bundle features.
  • For CLAUDE_CODE_SESSION_ID and CLAUDE_PID, a llmenv task command stops with an error that names the variable (changed in v3.13.0; before, llmenv logged a warning and treated the variable as unset).
  • A path that starts with ~, such as cache.cache_dir, stops with an error that names HOME and the path (added in v3.13.0). A path with no ~ never reads HOME. The session log file is turned off and the error is printed, instead of writing a log into the working directory.
  • llmenv doctor skips a token-efficiency check that reads a non-UTF-8 variable, and says that the result is unknown (changed in v3.13.0; before, it used the value in settings.json).

To fix it, export the variable again with a UTF-8 value, or unset it where it is optional.

Memory commands list too much​

(added in v3.12.0)

llmenv memory list and llmenv memory diff ask ICM for the memories of the project that the current folder belongs to. When llmenv cannot tell the project, it warns cannot tell the project of this folder, so memories of all projects are used. Run the command from inside the project folder. llmenv memory prune reads only the project of the current folder, and it refuses to run when it cannot tell the project. It also refuses to run while the active features.memory entry sets retention. See memory.

Memory backend issues​

  • Server not activating — it renders only when one of memory.tags is active. Check llmenv status tags.
  • Client can't reach the server — confirm the host: address resolves and the port is open: nc -vz <addr> <port>.
  • A managed MCP server is down or stuck (added in v3.12.0) — the session start output starts with llmenv: MCP health check failed at session start. and names each server that did not answer an MCP initialize within 5 seconds, with the reason and the fix. llmenv doctor prints the same result under MCP servers:. A stopped ICM proxy on the server host restarts by itself. For a proxy that holds its port but does not answer, run llmenv doctor --restart-memory-proxy (added in v3.12.0). It sends SIGTERM to the one proxy that the pidfile names, only when that process runs mcp-proxy ... -- icm serve, then starts the proxy again. Do not use pkill: it stops the proxy that other sessions use. Each proxy start writes one line to mcp-proxy.log next to the pidfile: llmenv: started mcp-proxy pid=... source=export|session-start|restart with the pid, session, and process group of the spawner. After an unexplained shutdown, compare the time of Shutting down with the last such line. For a stuck codebase-memory-mcp daemon, make one list_projects call first (changed in v3.13.0): the server is often only slow to start, and the notice says it did not answer yet. If the call fails, run pkill -f cbm-daemon-internal, then /mcp to reconnect. See Session-start health check.
  • Old ICM server (added in v3.12.0) — on the host that serves memory, llmenv doctor reports the icm version under ICM server:. It warns below 0.10.60, where recall filters by keyword and topic after the limit, so adaptive recall returns little or nothing. It warns again below 0.10.64, where recall ranking is weaker. (changed in v3.13.0) It warns below 0.11.3, where recall cannot answer in JSON, so the tool-failure recall matches the memory summary only, not its keywords. (changed in v3.14.0) It warns below 0.11.5, where JSON recall has no record ids and no multi-query form, so memory dedup and consolidation cannot read the records. Run icm upgrade --apply on that host. On a memory client, doctor cannot read the server version, because mcp-proxy does not forward it; run icm --version on the server host.
  • mcp-proxy missing — the server host needs mcp-proxy or uvx on PATH. llmenv export errors with an install hint if neither is present.
  • mcp-proxy won't start (added in v3.8.0) — the warning quotes the tail of the proxy's stderr log; read the whole thing at ${XDG_STATE_HOME:-$HOME/.local/state}/llmenv/mcp-proxy.log.
  • no memory backend active for this scope (added in v3.8.0) — the message names which of the four causes applies: no bundles fired, nothing declares features.memory, a firing bundle has no content directory (so its bundle.yaml was never read), or the only bundle supplying memory is turned off via disable_bundles. llmenv doctor --all flags that last case too.
  • Web-fetch stores, consolidation, or transcript records go missing (added in v3.8.0) — those run in detached children with no terminal. Their stderr is captured to ${XDG_STATE_HOME:-$HOME/.local/state}/llmenv/detached-hook.log (owner-only, rotated at 512 KiB), and their failures log at error level so the default log filter doesn't drop them.

See MCP & Memory for the full topology and security model.

Memory recall is skipped at session start (added in v3.15.0)​

A memory server that is slow or down costs each hook a timeout. After three failed recall calls in a row, hooks skip recall for five minutes, and one notice names the cause. A session start also shares a five-second budget across its recall calls. A call past the budget is cut, and the agent sees a notice that says the budget ran out. (added in v3.14.2) A prompt and a subagent start share a three-second budget in the same way. A call that the budget cuts off counts as a failed call for the skip, so a server that is always too slow starts the skip too. A call that starts after the budget ran out never reaches the server, and it does not count.

Run llmenv doctor to check the memory server. The skip ends by itself after five minutes, and the next recall call tries the server again.

The agent sees an llmenv notice​

(added in v3.13.0)

A hook's stderr never reaches the agent, so llmenv puts a short notice in the hook output when it drops something the agent depends on. Each notice starts with llmenv: and appears once per hook run.

  • memory <event> skipped: <reason> — the memory step of the hook failed, for example a bad tag or an MCP error. Read the reason, then run llmenv doctor for MCP health.
  • a memory recall call failed, so its records were not sent. — one recall call to the memory server failed. Run llmenv doctor and check the memory backend.
  • recall was skipped: the recall ledger cannot be read or updated. — the per-session recall state has an unsafe session id, a busy lock, or an unreadable file. Check the files under recall_session/ in the state directory.
  • recall state was not saved, so some records may repeat. — a recall state update did not run. Repeated records are the only effect.
  • the recall ledger could not be saved, so some records may repeat. — the recall state file could not be written, for example on a full disk. Free disk space, or fix the state directory permissions.
  • the recall ledger is corrupt, so it started fresh. — the recall state file did not parse. The next save replaces it.
  • the recall ledger was not reset after a context reset. — a compaction or clear could not reset the recall state. Records seen before the reset can stay filtered from recall.
  • recent tool activity was not saved, so later recall may miss it. — a post_tool_batch or subagent record could not be saved. Check the state directory.
  • the task reminder was skipped: the project tag cannot be resolved. — llmenv cannot resolve the project for the task tracker. Run llmenv task in the project to see the error.
  • the agent config could not be read, so its model history was reset. — the per-session agent config file could not be read and was replaced. The model history starts again.
  • memory <event> skipped: the memory backend failed to load — (added in v3.14.0) a bundle or config that declares features.memory failed to load. The notice names the cause. Fix that bundle or config.
  • memory <event> skipped: bundle(s) <names> fired, but each has no content folder — (added in v3.14.0) a bundle fired, but its content folder is missing, so llmenv cannot read whether it declares a memory backend. The notice shows once per session for each bundle. Fix: add the bundle content folder, or remove the bundle from config.yaml.
  • could not release proxy lockfile <path> — (added in v3.14.0) the MCP proxy lock stayed on disk, so later proxy starts fail. Remove the file by hand.
  • proxy attribution line not written to <path> — (added in v3.14.0) the proxy log directory is not writable. Make it writable.
  • could not remove proxy lock staging file <path> — (added in v3.14.0) a leftover staging file stays on disk. Remove it by hand.
  • cannot stop the process group of MCP server <name> and cannot stop the MCP text probe <name> — (added in v3.14.0) a probe process may still run. Stop that process by hand.
  • cannot write the trace file <path>, cannot write a trace line to stderr, and trace line dropped — (added in v3.14.0) a trace line was lost. Fix LLMENV_TRACE_FILE, or unset LLMENV_TRACE_TIMING, as the notice says.

Notices from detached jobs​

(added in v3.14.0)

The memory store, the session log record, memory consolidation, and the code index run as detached jobs after the hook returns. A notice from such a job is written to notice_spool/ in the state directory. The next hook run prints it and removes the file, so the agent sees it one hook later. The state directory is shared by all sessions, so that hook run can belong to another session. One hook run prints at most 32 of these notices, oldest first, and the rest wait for the next run. A link or a folder in notice_spool/ is removed unread.

  • a memory was not stored in ICM — a detached memory store failed. Run llmenv doctor to check the memory server.
  • a session log record was not written — a detached session log write failed. Run llmenv doctor to check session_log.file.path.
  • memory consolidation failed — the consolidation job at session end failed. Run llmenv doctor.
  • the code index job failed — the codebase-memory-mcp index job failed, for example because the indexer is not installed.
  • cannot read the detached job notice <path> or cannot remove the detached job notice <path> — a file in notice_spool/ is broken. Remove the file.
  • a background job finished, but its checkpoint stays — llmenv cannot remove the checkpoint of a finished job, so a later session can run the job again. Remove the named file.
  • the memory store has no state folder or memory consolidation has no state folder — the job cannot check for duplicates, so a memory or a rule can be stored twice. Set HOME or LLMENV_STATE_DIR.

These notices come from the hook itself (added in v3.14.0):

  • cannot save the idempotency seen-set, the idempotency seen-set ... is corrupt, and cannot read the idempotency seen-set — the record of handled events is lost, so an event can run again. Check the state directory, or remove the named file.
  • recalled memory was not shown, because the tool call was denied — a deny replaces the whole hook output. The memory comes back on the next prompt.
  • memory consolidation is skipped, the fetched page is not stored in memory, the model switch is not recorded, the task reminder is skipped, and the session-end duplicate check is skipped — a hook step could not run. The notice names the cause and the fix.
  • cannot create the index result file, cannot remove the old index result file, the earlier code index checkpoint ... cannot be read, and the code index job runs without its wrapper — the code index job cannot report its result. Check the state directory, or remove the named file.
  • the repeat check is off for this event and the stop reminder can repeat — the session id is not safe in a file name, so the check that keeps state per session does not run.
  • the repeat check is off for this event, because the PreToolUse payload has no tool name, and the read cache is off for this Read call — the engine sent a payload without a required field. Report it as a Claude Code payload bug.
  • the cd check is off for this command — the command nests too deep to check.
  • extra memory recall(s) were skipped — the main recalls were slow, so the extra recalls did not run for this prompt. Run llmenv doctor to check the memory server.
  • the resume cost notice stays on — CLAUDE_CODE_VERSION is not a version, so llmenv keeps its own resume notice.
  • the declared code index root <path> cannot be read and the recorded code index root <path> does not resolve — the code index root check leaves that root out.
  • CLAUDE_CODE_VERSION is read as unset — the variable is not valid text, so the version checks use their defaults.
  • the transcript <path> cannot be opened (or examined, or read) — the checks that read the transcript pass without a check. Check the permissions of the file.
  • the session-end duplicate record <path> cannot be read — the context chunk can be stored again. Remove the file.
  • the recall ledger is not updated, the agent config is not written, and a detached job runs with no checkpoint — the state folder is missing or not valid. Set HOME or LLMENV_STATE_DIR.
  • the activity time of session <id> is not saved — the task change is saved, but the session can look idle. Run llmenv task session show.

These notices come from the hook itself (added in v3.14.2):

  • the shared MCP session file <path> cannot be read, was not saved, or cannot be deleted — hooks open their own session with the memory server, which costs a round trip each. Check the permissions of the state folder, or remove the named file.
  • N more line(s) of notices were left out — the notices of one hook output did not fit under the point where Claude Code cuts a hook output. The first notices stay whole, and the rest are in the llmenv log. Run llmenv doctor.
  • auth: the cached credential at <path> is not valid JSON or holds no OAuth credential — llmenv ignored the file and replaced the account. Run llmenv login.
  • auth: <path> does not hold a timestamp — the keychain is read on each export until llmenv writes the marker again. Delete the named file.

Profiling hook-run latency​

Lifecycle hooks run on the agent's hot path, so a slow hook-run shows up as prompt lag. To see where the time goes, set LLMENV_TRACE_TIMING (to any value) before the hook fires. Every hook-run invocation then emits one line to stderr (stdout is untouched), whether it completes the full memory/session-log stage or takes one of the hook's several early-return paths:

llmenv-trace {"config_load_us":123,"scope_eval_us":456,"prep_us":78,"mcp_us":9012}

Each value is an integer microsecond count for that phase:

  • config_load_us — reading and parsing config.
  • scope_eval_us — evaluating scopes against the environment.
  • prep_us — everything between scope evaluation and the MCP round-trip: building recall queries, generating the context chunk, constructing the MCP client (reqwest/TLS on a connection cache miss), building the scope context, and the one-time ~3 ms tokio runtime build on the session's first hook-run.
  • mcp_us — the MCP round-trip plus session logging; usually the dominant term.

(added in v3.8.0) Each field is present only if that phase actually ran, so an event that early-returns before scope evaluation (e.g. a PreToolUse with no active sinks) reports config_load_us alone, one that early-returns after scope evaluation adds scope_eval_us, and so on — earlier versions only emitted this marker for events reaching the full memory-dispatch stage (4 of 11 hook events), so every other event's config_load/scope_eval cost was invisible. Runs that error before the marker point still emit nothing. The var is off by default and adds no measurable overhead when unset.

Profiling cache hit/miss rates​

(added in v3.10.0) The same LLMENV_TRACE_TIMING var also enables cache telemetry: one stderr line per cache lookup, across every persistent cache layer llmenv has —

[LLMENV_CACHE] content_hash hit 0.012ms
[LLMENV_CACHE] merge_sig miss 0.412ms
[LLMENV_CACHE] read_once hit 0.001ms path=CLAUDE.md
[LLMENV_CACHE] plugin_marketplace miss 842.100ms name=my-marketplace
  • content_hash — the materialize cache's HashingMode::Strict folder reuse (materialize). Loose/Normal mode always writes in place and has no hit/miss concept, so it emits nothing.
  • merge_sig — the disk-persisted bundle-merge memory/host slice (materialize::merge_cache), read by hook-run to skip a full merge.
  • read_once — the per-session read-once dedup cache (hook-run's PreToolUse handler), tagged with the file path that was looked up.
  • plugin_marketplace — whether a plugin marketplace's git clone was already present, tagged with the marketplace name. A pinned marketplace's forced refresh (re-clone to converge on the pin) always reports miss, even when a clone already existed, since it's a deliberate cache invalidation rather than a reuse.

Profiling per-MCP-call timing​

(added in v3.10.0) The same LLMENV_TRACE_TIMING var also enables per-call MCP timing: one stderr line per tool call, covering every MCP call the process makes (icm_wake_up, icm_memory_recall, icm_memory_store, icm_transcript_show, and so on), not just the aggregate mcp_us bucket in the per-phase marker above —

[LLMENV_MCP_CALL] icm_wake_up 66544us
[LLMENV_MCP_CALL] icm_memory_recall 2340us

The duration includes a stale-session retry's full cost when one happens (the retry itself already logs a warning) — this is deliberately "wall time this call actually took", not "time excluding recovery". No result or entry count is reported: the client has no notion of what a "result" means for an arbitrary tool.

Off by default, same as the markers above — enabling LLMENV_TRACE_TIMING enables all four (per-phase, cache, per-MCP-call, context/recall).

Profiling memory-recall and injected-context size​

(added in v3.10.0) The same LLMENV_TRACE_TIMING var also enables recall/injection telemetry for TurnStart's memory-recall dispatch (project-scoped recall, plus one tag- and bundle-scoped recall per active tag/bundle):

[LLMENV_CONTEXT] recall_entries=4 recall_bytes=3896 injected_entries=4 injected_bytes=3896 advisory_stripped=2
  • recall_entries/recall_bytes — how many of the dispatched recall actions came back non-empty, and their total byte size, before dedup.
  • injected_entries/injected_bytes — how many of those actually ended up in the injected context, and their total byte size, after dedup.
  • advisory_stripped — recall actions that came back non-empty but weren't injected: either the whole response was advisory-only noise (e.g. "No memories found."), or it exactly duplicated an already-kept action's text (the same memory recalled under more than one active tag/bundle).

Granularity is per recall action (one per project/tag/bundle scope), not per individual memory record inside a response — parsing ICM's recall-response text format to count individual records would couple this telemetry to a format owned by a separate system. Only emitted when the dispatched actions included at least one recall (SessionStart's icm_wake_up and SessionEnd's icm_memory_store never emit this line).

Sync conflicts​

llmenv sync runs git add/commit/push on the config repo. If the remote has diverged, resolve it like any git conflict (pull/rebase, fix, re-run). llmenv does not force-push.