Skip to content

TokenPilot Configuration ​

TokenPilot settings control how aggressively it manages context. Configuration differs by host.

HostConfiguration approach
OpenClawRuntime modes and individual feature settings below
CodexShared CLI settings; see supported features
Claude CodeShared CLI settings; see supported features
DeepSeek HarnessExplicit profile configuration: master switch, persistent state, estimator, and eviction settings
piShared CLI settings; see supported features
OpenCodeShared CLI settings; see supported features

DeepSeek Harness Configuration ​

The tokenpilot-dsh Cordis plugin is disabled by default. Supply a durable stateDir and configure the estimator and eviction settings before enabling it. It runs eviction before Harness native compaction by default and bypasses optimization failures so the agent can continue.

Use the DeepSeek Harness configuration example and reference. The runtime modes, stabilizer, reduction, and CLI settings below apply to the other host adapters, subject to their supported features.

Core Settings ​

SettingValuesDefaultDescription
enabledtrue, falsetrueMaster on/off switch
modeconservative, normal, aggressivenormalPreset that controls all sub-policies
logLeveldebug, info, warn, errorinfoHow much detail in logs

Mode Presets ​

Each mode is a preset that configures stabilizer, reduction, and eviction behavior:

ModeStabilizerReductionEviction
conservativeOn (developer target)LightOff
normalOn (developer target)BalancedOff
aggressiveOn (user target)StrongOn (earlier threshold)

See Runtime Modes for detailed behavior.

Stabilizer Settings ​

SettingValuesDefaultDescription
stabilizer.enabledtrue, falsetrueEnable stable-prefix rewriting
stabilizer.targetdeveloper, userdeveloperWhich message role gets the dynamic content

Reduction Settings ​

SettingValuesDefaultDescription
reduction.enabledtrue, falsetrueEnable context reduction
reduction.modelight, balancedbalancedHow aggressively to trim
reduction.pass.toolPayloadTrimtrue, falsetrueEnable tool output trimming

Eviction Settings ​

SettingValuesDefaultDescription
eviction.enabledtrue, falsefalse (off by default)Enable context eviction
eviction.thresholdToken countMode-dependentWhen to start evicting

Changing Settings ​

Via CLI ​

bash
# Change mode (applies the preset)
lightrsi mode aggressive

# Toggle individual features
lightrsi stabilizer off
lightrsi reduction mode light
lightrsi eviction on

Next ​

Released under the MIT License.