agentleFS
yoanbernabeuyoanbernabeu/grepai-skills/skills/advanced/grepai-troubleshooting/SKILL.md

grepai-troubleshooting

Skill20 starsChanged 34 days agoMITView on GitHub

Troubleshooting guide for GrepAI. Use this skill to diagnose and fix common issues.

  • Reads credentials
  • Deletes or force-pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. About 0 are common, 20 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search returning poor results

    line 13
  2. Distinctive:

    Run these commands to understand your setup:

    line 19
  3. Distinctive:

    Cause: No index has been created for this project.

    line 46
  4. Distinctive:

    Check endpoint in config:

    line 78
  5. Distinctive:

    Verify files are being indexed:

    line 128
  6. Distinctive:

    Check what's indexed:

    line 171
  7. Distinctive:

    Not enough ignore patterns

    line 231
  8. Distinctive:

    Use OpenAI for speed (if privacy allows):

    line 251
  9. Distinctive:

    Symptom: Search queries take several seconds.

    line 263
  10. Distinctive:

    Check exact function name (case-sensitive)

    line 301
  11. Distinctive:

    Test MCP server manually:

    line 331
  12. Distinctive:

    Check GrepAI is in PATH:

    line 336
  13. Distinctive:

    Use PostgreSQL or Qdrant instead of GOB

    line 369
  14. Distinctive:

    Ensure variable is exported:

    line 393
  15. Very specific:

    Check key format in config.

    line 398
  16. Very specific:

    Solution: Remove node_path (default node), or set an absolute path outside the project:

    line 448
  17. Very specific:

    If two starts race, the second one fails with another grepai watch process is starting (lock held) (another grepai worktree watch process …

    line 472
  18. Distinctive:

    Cause: Only one watch daemon can run per project or worktree: the PID lock is held for the daemon's whole lifetime.

    line 474
  19. Distinctive:

    Solution: Use the running daemon, or stop it first:

    line 476
  20. Distinctive:

    If all else fails, complete reset:

    line 531
  21. Distinctive:

    Check GrepAI documentation: https://yoanbernabeu.github.io/grepai/

    line 548
  22. Distinctive:

    Search issues: https://github.com/yoanbernabeu/grepai/issues

    line 549
  23. Distinctive:

    Create new issue with:

    line 550

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GrepAI Troubleshooting

This skill provides solutions for common GrepAI issues and diagnostic procedures.

When to Use This Skill

  • GrepAI not working as expected
  • Search returning poor results
  • Index not updating
  • Connection or configuration errors

Quick Diagnostics

Run these commands to understand your setup:

# Check GrepAI version
grepai version

# Check project status
grepai status

# Check Ollama (if using)
curl http://localhost:11434/api/tags

# Check config
cat .grepai/config.yaml

Common Issues


Issue: "Index not found"

Symptom:

Error: Index not found. Run 'grepai watch' first.

Cause: No index has been created for this project.

Solution:

# Initialize if needed
grepai init

# Create the index
grepai watch

Issue: "Cannot connect to embedding provider"

Symptom:

Error: Cannot connect to Ollama at http://localhost:11434

Causes:

  1. Ollama not running
  2. Wrong endpoint configured
  3. Firewall blocking connection

Solutions:

  1. Start Ollama:
ollama serve
  1. Check endpoint in config:
embedder:
  endpoint: http://localhost:11434  # Verify this
  1. Test connection:
curl http://localhost:11434/api/tags

Issue: "Model not found"

Symptom:

Error: Model 'nomic-embed-text' not found

Cause: The embedding model hasn't been downloaded.

Solution:

# Download the model
ollama pull nomic-embed-text

# Verify
ollama list

Issue: Search returns no results

Symptom: Searches return empty or very few results.

Causes:

  1. Index is empty
  2. Files are being ignored
  3. Query too specific

Solutions:

  1. Check index status:
grepai status
# Should show files > 0 and chunks > 0
  1. Verify files are being indexed:
# Check ignore patterns in config
cat .grepai/config.yaml | grep -A 20 "ignore:"
  1. Try broader query:
grepai search "function"  # Very broad test

Issue: Search returns irrelevant results

Symptom: Results don't match what you're looking for.

Causes:

  1. Query too vague
  2. Boosting not configured
  3. Wrong content indexed

Solutions:

  1. Improve query (see grepai-search-tips skill):
# Bad
grepai search "auth"

# Good
grepai search "user authentication middleware"
  1. Configure boosting to penalize tests:
search:
  boost:
    enabled: true
    penalties:
      - pattern: /tests/
        factor: 0.5
  1. Check what's indexed:
grepai status

Issue: Index is outdated

Symptom: Recent file changes aren't appearing in search results.

Causes:

  1. Watch daemon not running
  2. Debounce delay
  3. File not in indexed extensions

Solutions:

  1. Check daemon status:
grepai watch --status
  1. Restart daemon:
grepai watch --stop
grepai watch --background
  1. Force re-index:
rm .grepai/index.gob
grepai watch

Issue: "Config not found"

Symptom:

Error: Config file not found at .grepai/config.yaml

Cause: GrepAI not initialized in this directory.

Solution:

grepai init

Issue: Slow indexing

Symptom: Initial indexing takes very long.

Causes:

  1. Large codebase
  2. Slow embedding provider
  3. Not enough ignore patterns

Solutions:

  1. Add ignore patterns:
ignore:
  - node_modules
  - vendor
  - dist
  - build
  - "*.min.js"
  1. Use faster model:
embedder:
  model: nomic-embed-text  # Smaller, faster
  1. Use OpenAI for speed (if privacy allows):
embedder:
  provider: openai
  model: text-embedding-3-small
  parallelism: 8

Issue: Slow searches

Symptom: Search queries take several seconds.

Causes:

  1. Very large index
  2. GOB storage on large codebase
  3. Embedding provider slow

Solutions:

  1. Check index size:
ls -lh .grepai/index.gob
  1. For large indices, use Qdrant:
store:
  backend: qdrant
  1. Limit results:
grepai search "query" --limit 5

Issue: Trace not finding symbols

Symptom: grepai trace callers returns no results.

Causes:

  1. Function name spelled wrong
  2. Language not enabled for trace
  3. Symbols index out of date

Solutions:

  1. Check exact function name (case-sensitive)
  2. Enable language in config:
trace:
  enabled_languages:
    - .go
    - .js
    - .ts
  1. Re-build symbol index:
rm .grepai/symbols.gob
grepai watch

Issue: MCP not working

Symptom: AI assistant can't use GrepAI tools.

Causes:

  1. MCP config incorrect
  2. GrepAI not in PATH
  3. Working directory wrong

Solutions:

  1. Test MCP server manually:
grepai mcp-serve
  1. Check GrepAI is in PATH:
which grepai
  1. Verify MCP config:
# Claude Code
cat ~/.claude/mcp.json

# Cursor
cat .cursor/mcp.json

Issue: Out of memory

Symptom: GrepAI crashes or system becomes slow.

Causes:

  1. Large embedding model
  2. Very large index in GOB format
  3. Too many parallel requests

Solutions:

  1. Use smaller model:
embedder:
  model: nomic-embed-text  # Smaller
  1. Use PostgreSQL or Qdrant instead of GOB
  2. Reduce parallelism:
embedder:
  parallelism: 2

Issue: API key errors (OpenAI)

Symptom:

Error: 401 Unauthorized - Invalid API key

Solutions:

  1. Check environment variable:
echo $OPENAI_API_KEY
  1. Ensure variable is exported:
export OPENAI_API_KEY="sk-..."
  1. Check key format in config. grepai does not substitute ${VAR}: api_key: ${OPENAI_API_KEY} is sent literally. Remove the line to use the environment variable:
embedder:
  provider: openai
  model: text-embedding-3-small
  # no api_key: OPENAI_API_KEY is read from the environment

Issue: "API keys from the environment ... are only sent to the official endpoint"

Symptom:

API keys from the environment (OPENAI_API_KEY) are only sent to the official endpoint https://api.openai.com/v1, not to the custom endpoint https://...: set embedder.api_key in the grepai config to use a key with this endpoint

Cause: embedder.endpoint is not the provider's official host over HTTPS (api.openai.com, openrouter.ai, api.synthetic.new, router.requesty.ai), and embedder.api_key is empty. grepai never sends an environment key (OPENAI_API_KEY, OPENROUTER_API_KEY, SYNTHETIC_API_KEY, REQUESTY_API_KEY) to another endpoint, because a .grepai/config.yaml committed in a cloned repository could redirect it.

Solutions:

  1. Azure, LiteLLM, vLLM, a proxy: put the key in the config (.grepai/config.yaml or ~/.grepai/workspace.yaml), and keep that file out of version control:
embedder:
  provider: openai
  endpoint: https://your-resource.openai.azure.com/openai/v1
  api_key: your-key
  1. Local server without authentication (through the openai provider): the provider always needs a non-empty key, so use a placeholder:
embedder:
  api_key: unused
  1. Using the official API: remove endpoint (empty keeps the official endpoint).

ollama and lmstudio providers use no key and are not affected.


Issue: "framework_processing.node_path ... use "node" or an absolute path outside the project"

Symptom: A warning at index or watch time (only while Vue processing is enabled), for example:

Warning: framework_processing.node_path "./node_modules/.bin/node" is a relative path: use "node" or an absolute path outside the project; using "node" instead

Cause: node_path only accepts a Node.js command name resolved through PATH (node, nodejs, node20, node.exe) or a local absolute path outside the project and its git repository. A relative path, a path inside the project or its repository (also through symlinks), a missing path, a /proc or /dev path or a network path is ignored, and grepai uses node from PATH.

Solution: Remove node_path (default node), or set an absolute path outside the project:

framework_processing:
  node_path: /usr/local/bin/node

Untrusted repositories: compiling .vue files loads @vue/compiler-sfc from the project's node_modules. Only run grepai on repositories you trust, or disable Vue processing:

framework_processing:
  frameworks:
    vue:
      enabled: false

Issue: "watcher is already running"

Symptom:

watcher is already running in background (PID 12345)
Use 'grepai watch --stop' to stop it

If two starts race, the second one fails with another grepai watch process is starting (lock held) (another grepai worktree watch process is starting (lock held) in a linked worktree).

Cause: Only one watch daemon can run per project or worktree: the PID lock is held for the daemon's whole lifetime.

Solution: Use the running daemon, or stop it first:

grepai watch --status
grepai watch --stop

An empty *.pid.lock file stays in the log directory after a stop. This is normal; do not delete it while a daemon runs.


Issue: Qdrant hybrid search returns a single result

Symptom: With store.backend: qdrant and search.hybrid.enabled: true, every search returns only one result.

Cause: Bug present since v0.18.0, fixed in grepai v1.2.0.

Solution: Upgrade grepai (grepai update). No re-index is needed. Results with hybrid search disabled are unchanged.


Issue: Empty RPG links in a workspace, or a single RPG node with Qdrant

Symptom: In workspace mode, RPG symbols are not linked to chunks; or with Qdrant and RPG, all chunks end up in one node.

Solution: Fixed in grepai v1.2.0. Upgrade, then run grepai index (or let grepai watch run): the links are repaired on the next indexing, without re-embedding.

Diagnostic Commands

Full System Check

#!/bin/bash
echo "=== GrepAI Diagnostics ==="

echo -e "\n1. Version:"
grepai version

echo -e "\n2. Status:"
grepai status

echo -e "\n3. Config:"
cat .grepai/config.yaml 2>/dev/null || echo "No config found"

echo -e "\n4. Index files:"
ls -la .grepai/ 2>/dev/null || echo "No .grepai directory"

echo -e "\n5. Ollama (if using):"
curl -s http://localhost:11434/api/tags | head -5 || echo "Ollama not responding"

echo -e "\n6. Daemon:"
grepai watch --status 2>/dev/null || echo "Daemon not running"

Reset Everything

If all else fails, complete reset:

# Remove all GrepAI data
rm -rf .grepai

# Re-initialize
grepai init

# Start fresh index
grepai watch

Getting Help

If issues persist:

  1. Check GrepAI documentation: https://yoanbernabeu.github.io/grepai/
  2. Search issues: https://github.com/yoanbernabeu/grepai/issues
  3. Create new issue with:
    • GrepAI version (grepai version)
    • OS and architecture
    • Config file (remove secrets)
    • Error message
    • Steps to reproduce

Output Format

Diagnostic summary:

🔍 GrepAI Diagnostics

Version: 0.24.0
Project: /path/to/project

✅ Config: Found (.grepai/config.yaml)
✅ Index: 245 files, 1,234 chunks
✅ Embedder: Ollama (connected)
✅ Daemon: Running (PID 12345)
❌ Issue: [Description if any]

Recommended actions:
1. [Action item]
2. [Action item]

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.