# Faithful R2 lean-ctx arm — engine config (config.toml). # # Copy to the lean-ctx config dir ($XDG_CONFIG_HOME/lean-ctx/config.toml) or drop # into the repo workspace as `.lean-ctx.toml` (project-local override). Every key # below is a real engine setting — no env var is required for these to take effect, # though each also has a LEAN_CTX_* override (see faithful-arm.env). # # Goal: neutralize the R1 +38% injected-prefix tax and keep cold reads # capability-safe-cheap on a phase-isolated harness. # Zero-injection: do not inject rule files into the agent's context. The R1 tax # was a ~3K-token per-turn prefix (rule file + tool schemas) re-billed every turn # on a non-caching rail. "off" removes the rule-file half entirely. rules_injection = "off" # Minimal overhead: trims the per-tool schema/preamble surface so the fixed # injected cost per turn is as small as possible. minimal_overhead = true # Minimal tool profile: expose the 6-tool core instead of the full ~15 ctx_* # surface, shrinking the other half of the injected prefix (the tool schemas). tool_profile = "minimal" # Structure-first cold reads: on a fresh process (no warm session cache to # amortize a full read) bias `auto` toward `map` for medium source files. This # is the only read saving that survives phase isolation, and it aids # localization (deps + located API + task-relevant body). All capability guards # stay in force: active_diagnostic / edit-fail / small-file / task-named files # are always read full. structure_first = true # Proxy: the cross-tool wire compressor. The only path that reaches another # tool's output (e.g. forge_* store reads) and native shell/build/test logs, so # "installed = compressing the whole addressable surface", not just ctx_* tools. proxy_enabled = true proxy_port = 4444 [proxy] # cache-aware history pruning keeps the request prefix byte-stable so a # cache-priced rail (Anthropic) keeps hitting the prompt cache (#498). Never use # "rolling" on a cached rail — it rewrites a stable message every turn and turns # cheap cache reads into full-price writes. history_mode = "cache-aware"