Core Configuration
TYPEMUX_CC_BACKEND
The LSP backend to use for type-checking.Valid values:
pyright- Microsoft’s pyright type checker (default)ty- Astral’s experimental type checker (by the creators of uv)pyrefly- Meta’s experimental type checker
Make sure the corresponding backend binary is available in your PATH:
pyright: requirespyright-langservercommandty: requirestycommandpyrefly: requirespyreflycommand
Backend Pool Management
TYPEMUX_CC_MAX_BACKENDS
Maximum number of concurrent backend processes that can run simultaneously.Each virtual environment gets its own backend process. When the pool reaches this limit, the least recently used (LRU) backend will be evicted when a new one is needed.Constraints:
- Minimum value:
1 - Recommended:
4-16depending on available RAM
TYPEMUX_CC_BACKEND_TTL
Backend time-to-live in seconds. Idle backends are automatically evicted after this duration.Default:
1800 (30 minutes)Special value:0- Disables TTL-based eviction (backends only evicted when pool is full)
TTL helps reclaim memory from idle backends. Set to
0 if you frequently switch between many projects and want to avoid re-initialization delays.TYPEMUX_CC_WARMUP_TIMEOUT
Warmup timeout in seconds. After spawning, backends need time to build their cross-file index.During warmup, index-dependent requests (definition, references, implementation, typeDefinition) are queued. The backend transitions to “ready” when either:
- The backend sends a
$/progressend notification (index build complete) - This timeout expires (fail-open: queued requests are sent anyway)
2 (seconds)Special value:0- Disables warmup entirely (all requests forwarded immediately)
Logging Configuration
TYPEMUX_CC_LOG_FILE
Path to log file for persistent logging.Default behavior: Logs are written to stderr onlyWhen set: Logs are written to both stderr AND the specified fileExample:See Logging for monitoring and log analysis techniques.
RUST_LOG
Controls logging verbosity. Uses the
tracing crate’s env filter syntax.Common values:typemux_cc=info- High-level events (venv switches, warmup transitions)typemux_cc=debug- Default. Includes venv search details and LSP method namestypemux_cc=trace- Very verbose (all search steps, detailed debugging)
The log level affects all output (both stderr and file). Lower verbosity improves performance but provides less debugging information.
Setting Environment Variables
Method 1: Direct Export (Temporary)
Method 2: Inline (Single Execution)
Method 3: Config File (Persistent)
For persistent configuration across Claude Code restarts, use the config file:Precedence Rules
When multiple configuration methods are used:- CLI flags (e.g.,
--backend ty) - Highest priority - Environment variables - Middle priority
- Built-in defaults - Lowest priority
CLI flags like
--backend, --max-backends, --backend-ttl, and --log-file override the corresponding environment variables.Quick Reference Table
| Variable | Type | Default | Description |
|---|---|---|---|
TYPEMUX_CC_BACKEND | string | pyright | LSP backend to use (pyright, ty, pyrefly) |
TYPEMUX_CC_MAX_BACKENDS | integer | 8 | Max concurrent backend processes (min: 1) |
TYPEMUX_CC_BACKEND_TTL | integer | 1800 | Backend TTL in seconds (0 = disabled) |
TYPEMUX_CC_WARMUP_TIMEOUT | integer | 2 | Warmup timeout in seconds (0 = disabled) |
TYPEMUX_CC_LOG_FILE | string | (not set) | Log file path (stderr + file when set) |
RUST_LOG | string | typemux_cc=debug | Log level (info, debug, trace) |
Related Pages
- Config File - Persistent configuration for Claude Code plugin
- Logging - Log monitoring and analysis techniques