Troubleshooting
Common issues and how to resolve them.
Installation Issues
Node.js Version Error
Error: Bellwether requires Node.js 20 or later
Solution: Update Node.js:
# Check version
node --version
# Use nvm to install/switch
nvm install 20
nvm use 20
Permission Denied (Global Install)
EACCES: permission denied
Solution: Fix npm permissions or use npx:
# Option 1: Use npx (no install needed)
npx @dotsetlabs/bellwether check npx server
# Option 2: Fix npm permissions
sudo chown -R $(whoami) ~/.npm
npm install -g @dotsetlabs/bellwether
LLM Provider Issues
These issues only apply to bellwether explore. The bellwether check command doesn't use LLMs.
API Key Not Found
Error: Failed to initialize LLM client - API key not found
Solution: Set up your API key using one of these methods:
# Option 1: Interactive setup (recommended)
bellwether auth
# Option 2: Environment variable
export OPENAI_API_KEY=sk-xxx
# or
export ANTHROPIC_API_KEY=sk-ant-xxx
# Verify configuration
bellwether auth status
For persistent storage, bellwether auth stores your key in the system keychain (most secure) or in ~/.bellwether/.env.
Invalid API Key
Error: 401 Unauthorized
Solution:
- Verify your API key is correct
- Check the key hasn't expired
- Ensure you have API access (not just ChatGPT access)
Rate Limiting
Error: 429 Too Many Requests
Solution:
- Wait and retry
- Reduce
explore.maxQuestionsPerToolin bellwether.yaml - Consider upgrading your API plan
Ollama Connection Refused
Error: connect ECONNREFUSED 127.0.0.1:11434
Solution: Start Ollama:
# Start Ollama server
ollama serve
# Verify it's running
curl http://localhost:11434/api/tags
MCP Server Issues
Connection Failed
Error: Failed to connect to MCP server
Solutions:
-
Verify the command works:
# Test the server directly
npx @modelcontextprotocol/server-filesystem /tmp -
Check for missing dependencies:
npm install -
Increase timeout in bellwether.yaml:
server:
timeout: 60000
Server Crashes
Error: Server process exited unexpectedly
Solutions:
-
Enable debug logging in
bellwether.yaml:logging:
level: debug
verbose: true -
Test server independently:
npx server 2>&1 -
Check for missing environment variables the server needs
Tool Not Found
Error: Tool 'my_tool' not found
Solution: Verify available tools:
bellwether discover npx server
Check Mode Issues
Timeout During Check
Error: Tool call timed out
Solution: Increase timeout in bellwether.yaml:
server:
timeout: 120000
Empty Results
Warning: No tools discovered
Solutions:
-
Check server supports MCP:
bellwether discover npx server -
Verify server implementation returns tools in
tools/list
Explore Mode Issues
Poor Quality Results
Solutions:
-
Use a better model in bellwether.yaml:
llm:
provider: anthropic
model: claude-sonnet-4-5 -
Increase questions:
explore:
maxQuestionsPerTool: 5 -
Use multiple personas:
explore:
personas:
- technical_writer
- security_tester
- qa_engineer
- novice_user
Drift Detection Issues
Baseline Not Found
Error: Baseline file not found: ./bellwether-baseline.json
Solution: Create a baseline first:
bellwether check npx server
bellwether baseline save
Unexpected Drift
If you're seeing drift you don't expect:
-
Review the diff output to understand what changed
-
Check if schemas actually changed in the server
-
Update baseline if changes are intentional:
bellwether check npx server
bellwether baseline save --force
git add .bellwether/bellwether-baseline.json
git commit -m "Update baseline"
Version Mismatch Error
Error: Version Compatibility Error
Solution: Recreate your baseline with the latest CLI:
bellwether check
bellwether baseline save
Or force comparison (results may be less accurate):
bellwether baseline compare ./old-baseline.json --ignore-version-mismatch
CI/CD Issues
Exit Code 1 in CI
Error: Drift detected
This is expected when drift is found. Options:
- Review and fix the drift
- Update the baseline if changes are intentional
- Handle exit codes in CI to allow info/warning changes
API Key Not Found in CI
Solutions:
-
For check mode: No API key needed! Make sure you're using
bellwether check, notbellwether explore. -
For explore mode: Set the secret in your CI configuration:
GitHub Actions:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} -
Enable debug logging in
bellwether.yaml:logging:
level: debug
verbose: trueThen capture output in CI:
- run: npx @dotsetlabs/bellwether check 2>&1 | tee bellwether.log
- uses: actions/upload-artifact@v4
if: failure()
with:
name: debug-logs
path: bellwether.log
Debug Mode
For detailed troubleshooting, enable debug mode in bellwether.yaml:
logging:
level: debug
verbose: true
Then run your command normally:
bellwether check
This logs:
- MCP protocol messages
- Tool call details
- Timing information
For explore mode:
bellwether explore
This also logs:
- LLM requests and responses
Getting Help
If these solutions don't help:
-
Search existing issues: github.com/dotsetlabs/bellwether/issues
-
Open a new issue with:
- Bellwether version (
bellwether --version) - Node.js version (
node --version) - Command you ran
- Full error message
- Debug log if available
- Bellwether version (
-
Ask in Discussions: github.com/dotsetlabs/bellwether/discussions