Troubleshooting
Troubleshooting
Section titled “Troubleshooting”Solutions for the most common issues encountered when running NEXUS.
Installation
Section titled “Installation”nexus: command not found
The nexus CLI is a Python entry point. Ensure your Python scripts directory is on $PATH:
# Check where pip installed the scriptpip show -f nexus | grep bin
# Add to PATH if needed (adjust for your system)export PATH="$HOME/.local/bin:$PATH"If using a virtual environment, activate it first:
source .venv/bin/activatenexus statusModuleNotFoundError: No module named 'nexus'
The package isn’t installed in the active Python environment. Install with:
pip install -e .The -e flag means editable: changes to source are reflected immediately.
Python version 3.10 is not supported
NEXUS requires Python 3.11+. Check your version:
python --versionIf you have multiple Python versions, use the correct one:
python3.11 -m pip install -e .LLM Connection
Section titled “LLM Connection”Connection refused on localhost:8080
The llama.cpp server isn’t running. Start it:
llama-server \ --model ~/.local/share/nexus/models/qwen3-8b-q4.gguf \ --port 8080 \ --ctx-size 8192Or check if it’s running on a different port:
# Find llama-server processesps aux | grep llama-serverOverride the port in NEXUS:
export NEXUS_LLM_PORT=8384nexus runModel too large for available memory (local models only)
If using a local GGUF model that doesn’t fit:
- Use a smaller quantization: Q4_K_M instead of Q8
- Use a smaller model: Phi-4 Mini instead of Qwen 3 8B
- Reduce context size:
--ctx-size 4096instead of 8192 - Switch to a cloud provider (OpenAI/Anthropic) to avoid local model requirements entirely
Cognitive modules return errors but rule-based modules work
Cognitive modules (Council, Specter, Oracle, etc.) require an LLM. Rule-based modules (Sentry, Oracle trigger rules) work without one. Check that a provider is registered and healthy:
curl http://localhost:8000/api/providersModules
Section titled “Modules”Module 'xyz' denied -- trust too low
Aegis blocked the module because its trust score is 0 or below the required threshold. Enable it:
nexus allow xyzNew modules start at trust 50. If trust has degraded due to failures, the module needs positive outcomes to rebuild trust.
Module not found in routing table
Cortex doesn’t have routing keywords for this module. Check nexus/kernel/cortex.py for the _MODULE_KEYWORDS dictionary. If you’re building a new module, add keywords:
_MODULE_KEYWORDS = { ... "my_module": ["keyword1", "keyword2", "keyword3"],}Messages always route to the wrong module
Cortex routes by keyword score, the module with the most keyword matches wins. If your message matches another module’s keywords more strongly, be more specific:
# Vague -- might hit the wrong module> analyze this
# Specific -- clearly targets Vex> scan this code for vulnerabilitiesCheck the Routing Table for all keyword-to-module mappings.
Testing
Section titled “Testing”PytestCollectionWarning: cannot collect test class 'TestCase'
A dataclass or class named TestCase is being picked up by pytest as a test class. Rename it to avoid the Test prefix:
# Bad -- pytest tries to collect this@dataclassclass TestCase: input: str expected: str
# Good -- not collected@dataclassclass GeneratedTest: input: str expected: strasyncio_mode = "auto" not working
Check that pytest-asyncio is installed and your config is set:
pip install pytest-asyncioIn pyproject.toml or pytest.ini:
[tool:pytest]asyncio_mode = strictWith strict mode, mark all async tests explicitly:
@pytest.mark.asyncioasync def test_my_async_function(): ...Tests pass locally but fail in CI
Common causes:
- Missing dependencies: Ensure CI installs with
pip install -e ".[dev]"or equivalent - Python version mismatch: CI might use a different Python than local
- File system differences: Tests that depend on file paths may break on Linux vs macOS
- Timing issues: Async tests with real timeouts may be flaky on slow CI runners
Data & Memory
Section titled “Data & Memory”Database is locked
Another NEXUS process is accessing the same data directory. Only one instance can write at a time. Check for running processes:
ps aux | grep nexusKill stale processes or use a different data directory:
export NEXUS_DATA_DIR=/tmp/nexus-testnexus runMemory seems to be growing without limit
Working memory (the ephemeral tier in Engram) doesn’t have automatic garbage collection yet. For long-running sessions, periodically clear it:
nexus forget --yesThis clears Engram but preserves Chronicle (audit) and Aegis (trust scores).
nexus forget doesn’t clear everything
By design. nexus forget --yes clears Engram (memory) only. Chronicle (audit trail) and Aegis (trust scores) are preserved. To fully reset:
rm -rf ~/.local/share/nexus/nexus run # recreates fresh databasesNetwork Modules
Section titled “Network Modules”Herald: network access denied
Herald and Collective require explicit network consent:
nexus allow --network heraldThis is a separate gate from normal module trust. Both nexus allow herald (trust) and nexus allow --network herald (network) are required.
Collective shares my data
Collective shares noise-injected model aggregates, never raw data. Differential privacy is applied before any information leaves your instance. Every outbound event is logged to Chronicle, you can audit exactly what was shared.