Reflexio Docs
Claude Code Plugin

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.

VariableDefaultPurpose
CLAUDE_SMART_USE_LOCAL_CLI0 (installer sets 1)Route generation through the local claude CLI so no external API key is required.
CLAUDE_SMART_USE_LOCAL_EMBEDDING0 (installer sets 1)Use the in-process ONNX embedder (requires chromadb).
CLAUDE_SMART_CLI_PATHshutil.which("claude")Override the path to the claude binary.
CLAUDE_SMART_CLI_TIMEOUT120Per-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_AUTOSTART1Set to 0 to stop the SessionStart hook from spawning the Reflexio backend on localhost:8081.
CLAUDE_SMART_DASHBOARD_AUTOSTART1Set to 0 to stop the SessionStart hook from spawning the Next.js dashboard on localhost:3001.
CLAUDE_SMART_BACKEND_STOP_ON_END0Set to 1 to tear down the backend at SessionEnd instead of leaving it long-lived.
REFLEXIO_URLhttp://localhost:8081/Point the plugin at a non-local Reflexio backend.

Where Data Lives

PathWhatSafe to delete?
~/.reflexio/data/reflexio.dbSource of truth — profiles, user playbooks, interactions, FTS5 indexes, vec0 embedding tables (plus .db-shm / .db-wal WAL sidecars).Destructive — wipes all learned rules.
~/.reflexio/.envProvider config and optional API keys.Deleting will revert to defaults (re-seeded on next install).
~/.claude-smart/sessions/{session_id}.jsonlPer-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.logReflexio 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

AspectUser ProfileProject Playbook
ScopePer-sessionCross-session, project-wide
Retrieval keyuser_id = session_idagent_version = project_id (git-toplevel basename)
Persists across new sessions?NoYes
Reinjected on /resume, /clear, /compact?YesYes
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:

  1. claude-code — the local claude CLI. Wins whenever CLAUDE_SMART_USE_LOCAL_CLI=1.
  2. local — in-process ONNX embedder. Used for embeddings when CLAUDE_SMART_USE_LOCAL_EMBEDDING=1.
  3. anthropic — if ANTHROPIC_API_KEY is set.
  4. gemini — if GEMINI_API_KEY is set.
  5. openai — if OPENAI_API_KEY is set.

Confirm what's active by checking the startup log:

Primary provider for generation: claude-code
Embedding provider: local

Troubleshooting

/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=180

A 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.

See Also