Skip to content

0.2.49 release missing vendor/reflexio/ — backend crash-loops on "bundled Reflexio import preflight failed" #130

Description

@jodunk

Bug

After updating to 0.2.49, the local Reflexio backend will not start. ~/.claude-smart/backend.log repeats indefinitely:

[claude-smart] backend: bundled Reflexio import preflight failed

Root cause

scripts/backend-service.shverify_bundled_reflexio_import() (line ~255) hard-requires the bundled source dir:

[ -d "$VENDORED_REFLEXIO/reflexio" ] || {
  echo "bundled Reflexio package not found at $VENDORED_REFLEXIO" >&2
  return 1
}

But the 0.2.49 plugin cache ships without vendor/reflexio/. npx claude-smart install installs reflexio-ai (0.2.28) into .venv/lib/python3.12/site-packages/reflexio instead — so the vendored dir the preflight demands is never populated.

The plugin's own pyproject.toml documents the intent:

# Core Reflexio client/backend package. This is the PyPI baseline used by
# ... installing plugin/vendor/reflexio. Keep in sync via
# scripts/sync-reflexio-dep.py
"reflexio-ai>=0.2.28"

…so vendor/reflexio is supposed to be bundled and kept in sync by scripts/sync-reflexio-dep.py. In the 0.2.49 cache that script is also absent, and the vendored tree is absent.

Impact (severe)

This is destructive on restart, not just a fresh-install gap:

  1. A backend that was previously healthy (running off site-packages reflexio on port 8071) is detected as "not using bundled Reflexio at .../vendor/reflexio".
  2. /claude-smart:restart (or backend-service.sh start) kills that working backend and replaces it.
  3. The replacement fails the preflight because vendor/reflexio is empty → crash loop → no backend at all.

Log evidence of the kill-then-loop:

[claude-smart] backend: replaced claude-smart backend on port 8071 that was not using bundled Reflexio at .../vendor/reflexio
[claude-smart] backend: bundled Reflexio import preflight failed
[claude-smart] backend: bundled Reflexio import preflight failed
... (repeats)

i.e. a routine restart bricks a working install.

Environment

  • claude-smart: 0.2.49
  • reflexio-ai: 0.2.28 (installed in .venv/site-packages)
  • macOS: Darwin 25.5.0 (arm64, macOS 15)
  • Claude Code host
  • claude CLI provider present (~/.local/bin/claude)

Workaround

Copy the installed package into the location the preflight expects:

V=~/.claude/plugins/cache/reflexioai/claude-smart/0.2.49
mkdir -p "$V/vendor/reflexio"
cp -R "$V/.venv/lib/python3.12/site-packages/reflexio" "$V/vendor/reflexio/reflexio"
bash "$V/scripts/backend-service.sh" start
curl -s localhost:8071/health   # → {"status":"healthy"}

Preflight passes because vendor/reflexio/reflexio/__init__.py exists, imports cleanly (deps resolve from .venv), and reflexio.__file__ resolves under vendor/.

Suggestions

  • Ensure the release/packaging step actually runs sync-reflexio-dep.py (or equivalent) so vendor/reflexio/ is present in the cached plugin, or
  • Make verify_bundled_reflexio_import fall back to the .venv-installed reflexio when vendor/reflexio is absent, instead of failing hard — this would also stop the restart path from killing a healthy site-packages-backed backend.

Happy to PR either if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions