Skip to content

Troubleshooting

karurikwao edited this page Jul 5, 2026 · 1 revision

Troubleshooting

cargo Is Not Found

Install Rust from https://rustup.rs/ or use Docker verification:

docker run --rm -v "${PWD}:/work" -w /work -e CARGO_TARGET_DIR=/tmp/contextclean-target rust:1.85-bookworm sh -lc 'export PATH=/usr/local/cargo/bin:$PATH; cargo test --workspace --all-features --locked'

On Windows, Cargo may be installed at:

%USERPROFILE%\.cargo\bin

Output Is Still Too Large

Use a hard token budget:

ctxclean build.log --max-tokens 8000

Or use a model preset:

ctxclean repo . --fit gpt-4.1

Use report to identify the biggest noise sources.

Important Content Was Removed

Try a less aggressive mode:

ctxclean input.html --mode light
ctxclean input.html --mode standard

Use JSON output to inspect removed sections and warnings:

ctxclean input.html --format json

A Sensitive File Was Skipped

This is expected by default. If you explicitly need to process it:

ctxclean .env --include-sensitive

The content still passes through redaction unless you disable redaction. Avoid disabling redaction for shared context.

ctxrun Hangs Or Produces Too Much Output

Use:

ctxrun --timeout-seconds 120 --capture-limit-bytes 4194304 npm test

ctxrun drains stdout and stderr concurrently. The capture limit controls retained failed-output bytes per stream.

JSON Output Is Needed For Automation

Use:

ctxclean report build.log --format json
ctxclean build.log --format json

Prefer JSON when writing tests or dashboards around token savings.

A Dependency Update Fails MSRV

Do not merge it until the project intentionally raises MSRV or the dependency releases a compatible version. ContextClean currently treats Rust 1.85 as the supported floor.

Clone this wiki locally