Configuration
Environment variables, data directories, scope rules, and troubleshooting for claude-smart.
Configuration
Environment Variables
All variables can be set in ~/.reflexio/.env (recommended — the dashboard's Configure page edits this file) or exported in your shell before launching Claude Code.
| Variable | Default | Purpose |
|---|---|---|
CLAUDE_SMART_USE_LOCAL_CLI | 0 (installer sets 1) | Route generation through the local claude CLI so no external API key is required. |
CLAUDE_SMART_USE_LOCAL_EMBEDDING | 0 (installer sets 1) | Use the in-process ONNX embedder (requires chromadb). |
CLAUDE_SMART_CLI_PATH | shutil.which("claude") | Override the path to the claude binary. |
CLAUDE_SMART_CLI_TIMEOUT | 120 | Per-call subprocess timeout (seconds). Raise for slow prompts. |
CLAUDE_SMART_STATE_DIR | ~/.claude-smart/sessions/ | Where the per-session JSONL buffer lives. |
CLAUDE_SMART_BACKEND_AUTOSTART | 1 | Set to 0 to stop the SessionStart hook from spawning the Reflexio backend on localhost:8081. |
CLAUDE_SMART_DASHBOARD_AUTOSTART | 1 | Set to 0 to stop the SessionStart hook from spawning the Next.js dashboard on localhost:3001. |
CLAUDE_SMART_BACKEND_STOP_ON_END | 0 | Set to 1 to tear down the backend at SessionEnd instead of leaving it long-lived. |
REFLEXIO_URL | http://localhost:8081/ | Point the plugin at a non-local Reflexio backend. |
Where Data Lives
| Path | What | Safe to delete? |
|---|---|---|
~/.reflexio/data/reflexio.db | Source of truth — profiles, user playbooks, interactions, FTS5 indexes, vec0 embedding tables (plus .db-shm / .db-wal WAL sidecars). | Destructive — wipes all learned rules. |
~/.reflexio/.env | Provider config and optional API keys. | Deleting will revert to defaults (re-seeded on next install). |
~/.claude-smart/sessions/{session_id}.jsonl | Per-session buffer with {"published_up_to": N} watermarks. | Yes for records up to the latest watermark (already persisted); records past the watermark may still be unpublished. |
~/.claude-smart/backend.log | Reflexio backend logs. Useful for debugging. | Yes. |
~/.cache/chroma/onnx_models/all-MiniLM-L6-v2/ | Cached ONNX embedder weights (~86 MB). | Yes — re-downloaded on first use. |
Scope: Profile vs. Playbook
| Aspect | User Profile | Project Playbook |
|---|---|---|
| Scope | Per-session | Cross-session, project-wide |
| Retrieval key | user_id = session_id | agent_version = project_id (git-toplevel basename) |
| Persists across new sessions? | No | Yes |
Reinjected on /resume, /clear, /compact? | Yes | Yes |
| Typical content | "uses pnpm, not npm"; "prefers terse answers" | "always pass --run to npm test — watch mode hangs CI" |
LLM Provider Priority
Reflexio's provider selection for generation is, in order:
claude-code— the localclaudeCLI. Wins wheneverCLAUDE_SMART_USE_LOCAL_CLI=1.local— in-process ONNX embedder. Used for embeddings whenCLAUDE_SMART_USE_LOCAL_EMBEDDING=1.anthropic— ifANTHROPIC_API_KEYis set.gemini— ifGEMINI_API_KEYis set.openai— ifOPENAI_API_KEYis set.
Confirm what's active by checking the startup log:
Primary provider for generation: claude-code
Embedding provider: localTroubleshooting
/show is empty after I corrected Claude
Extraction is asynchronous. Run /learn to force it, wait 20–30 seconds, then run /show — no new session needed.
"No embedding-capable provider"
Make sure CLAUDE_SMART_USE_LOCAL_EMBEDDING=1 is in ~/.reflexio/.env and that chromadb is installed in the plugin venv:
uv run --project "$HOME/.claude/plugins/marketplaces/reflexioai/plugin" \
python -c "import chromadb"To use a cloud embedder instead, drop the flag and set OPENAI_API_KEY or GEMINI_API_KEY in the same file, then run /restart.
claude-smart doesn't see my interactions
Inspect ~/.claude-smart/sessions/. If the current session's JSONL file has no User or Assistant rows, the hooks aren't receiving events. Check that the plugin is enabled (/plugin list inside Claude Code) and that uv is on PATH.
Hooks appear to time out
Each hook is capped at 15–60 seconds (see How It Works). If the LLM provider is slow, raise the subprocess timeout:
CLAUDE_SMART_CLI_TIMEOUT=180A different LLM is being used than expected
Check the startup log's Primary provider for generation: line. The priority order above explains who wins. If you want claude-code to handle generation, keep CLAUDE_SMART_USE_LOCAL_CLI=1 in ~/.reflexio/.env.
Wipe everything and start over
rm -rf ~/.claude-smart/sessions/
rm -rf ~/.reflexio/data/Or from inside Claude Code, /clear-all does the same thing with a confirmation.