ctx_ledger
Session & MonitoringContext ledger — track persistent context pressure. WORKFLOW: status → evict → reset (reset only if budget needs full flush). ANTI-PATTERN: don't evict files you actively need — check status first. Actions: status, reset, evict.
Parameters
2
Required
1
Actions
3
Token Impact
Eviction reduces tracked token usage immediately. Reset clears all accumulated pressure to zero.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | "status" | "reset" | "evict" | Yes | status|reset|evict |
targets | string | No | Paths to evict (comma-separated) |
Actions
status ctx_ledger action="status"
reset ctx_ledger action="reset"
evict ctx_ledger action="evict"
Call shape
Derived from the input schema: required parameters, plus the most common optional ones.
ctx_ledger(action="status", targets="<targets>") Examples
Check current pressure
ctx_ledger action="status" Shows current token usage, entry count, and pressure percentage.
Evict specific files
ctx_ledger action="evict" targets="src/old_module.rs,src/unused.ts" Removes specified paths from the ledger and adds exclusion overlays to prevent re-accumulation.
Full reset
ctx_ledger action="reset" Clears all ledger entries and resets pressure to zero. Use when starting a new task focus.
CLI Equivalent
This tool is also available via the CLI:
lean-ctx ledger [status|reset|evict <paths...>] Related Tools
Schema MD5:
b1f711f17c2425b8ff8b063629ad6710875e89f7b72e0847992565f69ad4f964 ← Back to all tools