Doctor
The doctor command verifies you have the minimum needed dependencies for your installation mode. You can run it with:
ctxsift doctorDoctor is the fastest way to check whether your chosen runtime path is actually usable.
What is doctor
Section titled “What is doctor”Doctor reports required and optional runtime conditions, including:
- Python and platform support
- workspace initialization
- optional remote dependencies
- local inference prerequisites
- CUDA availability when relevant
- configured model and backend paths
Doctor should not be treated as a cosmetic step. It is the fastest way to catch a bad local model path, a missing optional package, or an incomplete remote setup before you start using compress and recall in a real workflow.
Typical workflow
Section titled “Typical workflow”ctxsift configurectxsift doctorIf doctor fails, fix the dependency or configuration issue first.
What doctor checks
Section titled “What doctor checks”ctxsift doctor resolves your effective config for the current directory (same resolution behavior as runtime), then runs a set of probes that are:
- Always-on core checks
- Mode-aware checks (local vs remote)
- Feature-aware checks (quantization, GGUF, optional packages)
Doctor is read-mostly, but it may initialize/validate your workspace database path to confirm schema health and extension availability.
How to read doctor output
Section titled “How to read doctor output”Each line is rendered as:
[severity] check_name: status - detailStatus logic:
required+ failing status means a hard blocker for normal operation.warning+ failing status means degraded behavior or misconfiguration risk.optional+ failing status means a capability is unavailable, but CtxSift may still run via fallback paths.
Check reference
Section titled “Check reference”| Check name | When it appears | Why it matters | If it fails |
|---|---|---|---|
database | Always | Verifies DB path can initialize and schema is usable | CtxSift storage cannot operate reliably |
git_workspace | Always | Detects git metadata support in current cwd | Compression/recall still work, but git-aware context is reduced |
remote_config | Always | Ensures remote settings are coherent when remote mode is enabled | Remote mode may be partially configured and unusable |
sqlite_core | Always | Confirms core SQLite availability | Hard blocker for storage |
sqlite_fts5 | Always | Confirms FTS5 virtual table support | Recall text search path is broken |
sqlite_vec | Always (or skipped detail after DB failure) | Confirms vector extension + embedding-model compatibility | Recall may fall back to FTS5-only |
cuda | Optional | Indicates whether torch CUDA path is usable | Local CUDA acceleration unavailable |
onnxruntime | Optional | Enables faster CPU embeddings path in supported setups | Embeddings can still run via torch fallback |
flashattention | Optional | Extra attention backend for supported CUDA stacks | Usually safe to ignore unless you expect this backend |
litellm | Remote mode only | Required adapter package for remote providers | Remote compression will not run |
local_runtime | Local mode only | Validates local runtime backend can resolve from config | Local compression backend unusable until fixed |
llama_cpp | Local CPU (llama.cpp) path | Confirms CPU local runtime package availability | CPU local compression unavailable |
gguf_artifact | Local CPU (llama.cpp) path | Verifies configured GGUF file resolution/cache state | Wrong GGUF config blocks CPU local compression |
accelerate | Local CUDA with quantization enabled | Required support package for quantized transformer loading | Quantized load path may fail |
bitsandbytes | Local CUDA with bnb-* quantization modes | Required for BnB quantization | BnB quantized path will fail |
Mode-specific interpretation
Section titled “Mode-specific interpretation”Local CPU (llama.cpp)
Section titled “Local CPU (llama.cpp)”Prioritize these checks:
database,sqlite_core,sqlite_fts5local_runtime,llama_cpp,gguf_artifactsqlite_vec
If gguf_artifact says “not cached locally yet,” that is not necessarily an error. First run may download it.
Local CUDA
Section titled “Local CUDA”Prioritize these checks:
database,sqlite_core,sqlite_fts5local_runtime,cudaaccelerateandbitsandbytes(only if quantization is enabled)
flashattention is performance-oriented, not a strict requirement for most environments.
Remote compression
Section titled “Remote compression”Prioritize these checks:
remote_config(base URL + model name coherence)litellm- Core storage checks (
database,sqlite_core,sqlite_fts5,sqlite_vec)
Even in remote compression mode, embeddings/recall are still local checks.
Common failure patterns and fixes
Section titled “Common failure patterns and fixes”remote_config warns about missing model name
Section titled “remote_config warns about missing model name”Cause: remote.base_url is set but remote.model_name is empty.
Fix:
ctxsift config set remote.model_name <provider-model>litellm missing in remote mode
Section titled “litellm missing in remote mode”Cause: remote extras not installed.
Fix:
uv tool install "ctxsift[remote]"llama_cpp missing in local CPU mode
Section titled “llama_cpp missing in local CPU mode”Cause: base local CPU runtime dependency unavailable.
Fix:
- Reinstall or upgrade CtxSift base package.
- Ensure your platform build prerequisites are present (compiler toolchain).
bitsandbytes fails with bnb-* quantization
Section titled “bitsandbytes fails with bnb-* quantization”Cause: quantization mode selected, but package/runtime compatibility missing.
Fix:
uv tool install "ctxsift[gpu,quant]"Then re-run doctor.
sqlite_vec model mismatch warning
Section titled “sqlite_vec model mismatch warning”Cause: vector index in DB was built with a different embedding model than current config.
Impact: recall degrades to FTS5-only until alignment is restored.
Fix options:
- Revert embedding model to the prior value.
- Rebuild/reinitialize workspace DB to regenerate vector index with the current embedding model.
Recommended usage cadence
Section titled “Recommended usage cadence”Run doctor:
- Right after
ctxsift configure - After changing local/remote backend settings
- After changing embedding model or quantization mode
- After upgrading Python, CUDA, PyTorch, or optional runtime packages
For most teams, this catches setup drift before it shows up as compression failures or degraded recall quality.
After doctor passes
Section titled “After doctor passes”Read Compress and Recall to understand the two core operations.