Skip to content

TokenPilot Configuration

TokenPilot settings control how aggressively it manages context. All settings have sensible defaults — you can start without changing anything.

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:

ModeStabilizerReductionEvictionBest For
conservativeOn (developer target)LightOffSafety-critical sessions
normalOn (developer target)BalancedOnGeneral use
aggressiveOn (user target)StrongOn (earlier threshold)Maximum savings

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, falsetrue (normal mode)Enable context eviction
eviction.thresholdToken countMode-dependentWhen to start evicting

Changing Settings

Via CLI

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

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

Via Config File

Edit the plugin config file directly (format depends on host):

json
{
  "enabled": true,
  "mode": "normal",
  "stabilizer": {
    "enabled": true,
    "target": "developer"
  },
  "reduction": {
    "enabled": true,
    "mode": "balanced"
  },
  "eviction": {
    "enabled": true
  }
}

Changes take effect on the next turn (no restart needed).

Next

Released under the MIT License.