Skip to main content

Troubleshooting & Error Codes

Infrastructure Issues

IssueError CodeSolution
Qdrant not runningINFRA_QDRANT_UNAVAILABLEQdrant is built-in and starts automatically. If using external Qdrant: docker compose up -d, verify QDRANT_URL
Qdrant operation timed outINFRA_QDRANT_TIMEOUTCheck Qdrant server load or increase timeout
Qdrant operation failedINFRA_QDRANT_OPERATIONCheck Qdrant logs for details
Qdrant unauthorizedSet QDRANT_API_KEY environment variable for secured instances
Ollama not runningINFRA_EMBEDDING_OLLAMA_UNAVAILABLEVerify with curl http://localhost:11434, start Ollama or run docker compose up -d
Model missingINFRA_EMBEDDING_OLLAMA_MODEL_MISSINGollama pull nomic-embed-text
ONNX model failed to loadINFRA_EMBEDDING_ONNX_LOADCheck that the model file exists and is valid
ONNX inference failedINFRA_EMBEDDING_ONNX_INFERENCECheck model compatibility and input data
Rate limit errors (OpenAI)INFRA_EMBEDDING_OPENAI_RATE_LIMITAdjust EMBEDDING_MAX_REQUESTS_PER_MINUTE to match your provider tier
Rate limit errors (Cohere)INFRA_EMBEDDING_COHERE_RATE_LIMITWait and retry, or adjust request rate
Rate limit errors (Voyage)INFRA_EMBEDDING_VOYAGE_RATE_LIMITWait and retry, or adjust request rate
API key errorsINFRA_EMBEDDING_OPENAI_AUTHVerify correct API key in environment configuration
Git CLI not foundINFRA_GIT_NOT_FOUNDInstall git
Git command timed outINFRA_GIT_TIMEOUTReduce scope or increase timeout
Alias operation failedINFRA_ALIAS_OPERATIONCheck Qdrant server status and collection names

Indexing Issues

IssueError CodeSolution
Codebase not indexedINGEST_NOT_INDEXEDRun index_codebase before search_code
Collection already existsINGEST_COLLECTION_EXISTSUse forceReindex=true or delete the collection first
Snapshot not foundINGEST_SNAPSHOT_MISSINGEnsure the snapshot file exists at ~/.tea-rags/snapshots/
Snapshot corruptedINGEST_SNAPSHOT_CORRUPTEDDelete old snapshot and re-index with forceReindex=true
Snapshot migration failedINGEST_MIGRATION_FAILEDDelete old snapshot and re-index
Slow indexingUse Ollama (local) for faster indexing, or increase EMBEDDING_BATCH_SIZE
Files not foundCheck .gitignore and .contextignore patterns
Out of memory during indexReduce CODE_CHUNK_SIZE or EMBEDDING_BATCH_SIZE

Explore Issues

IssueError CodeSolution
Collection not foundEXPLORE_COLLECTION_NOT_FOUNDIndex the codebase first with index_codebase
Collection or path not providedINPUT_COLLECTION_NOT_PROVIDEDProvide a collection name or a path to the codebase
Hybrid search not enabledEXPLORE_HYBRID_NOT_ENABLEDRun reindex_changes — hybrid is enabled by default and auto-migrates
Invalid queryEXPLORE_INVALID_QUERYFix query parameters
Search returns no resultsTry broader queries, check if codebase is indexed with get_index_status
Filter errorsEnsure Qdrant filter format, check field names match metadata

Trajectory Issues

IssueError CodeSolution
Git blame failedTRAJECTORY_GIT_BLAME_FAILEDEnsure the file is tracked by git
Git log timed outTRAJECTORY_GIT_LOG_TIMEOUTReduce scope or increase timeout
Git not availableTRAJECTORY_GIT_NOT_AVAILABLEEnsure git is installed and in PATH
File parse failedTRAJECTORY_STATIC_PARSE_FAILEDFile may have syntax errors

Configuration Issues

IssueError CodeSolution
Invalid config valueCONFIG_VALUE_INVALIDCheck expected values for the field
Required config missingCONFIG_VALUE_MISSINGSet the required environment variable

Error Codes Reference

Full table of all structured error codes returned by the MCP server.

CodeClassHTTPMessage TemplateHint Template
UNKNOWN_ERRORUnknownError500Unexpected error: {detail}Check server logs for details
INPUT_COLLECTION_NOT_PROVIDEDCollectionNotProvidedError400Either 'collection' or 'path' parameter is required.Provide a 'collection' name or a 'path' to the codebase.
INFRA_QDRANT_UNAVAILABLEQdrantUnavailableError503Qdrant is not reachable at {url}Start Qdrant: docker compose up -d, or verify QDRANT_URL={url}
INFRA_QDRANT_TIMEOUTQdrantTimeoutError504Qdrant operation "{operation}" timed out at {url}Check Qdrant server load or increase timeout
INFRA_QDRANT_OPERATIONQdrantOperationError500Qdrant operation "{operation}" failed: {detail}Check Qdrant logs for details
INFRA_EMBEDDING_OLLAMA_UNAVAILABLEOllamaUnavailableError503Ollama is not reachable at {url}Start Ollama or verify OLLAMA_BASE_URL={url}
INFRA_EMBEDDING_OLLAMA_MODEL_MISSINGOllamaModelMissingError503Model "{model}" is not available on Ollama at {url}Pull the model: ollama pull {model}
INFRA_EMBEDDING_ONNX_LOADOnnxModelLoadError503Failed to load ONNX model from "{modelPath}"Check that the model file exists and is valid
INFRA_EMBEDDING_ONNX_INFERENCEOnnxInferenceError500ONNX inference failed: {detail}Check model compatibility and input data
INFRA_EMBEDDING_OPENAI_RATE_LIMITOpenAIRateLimitError429OpenAI API rate limit exceededWait and retry, or increase rate limits
INFRA_EMBEDDING_OPENAI_AUTHOpenAIAuthError401OpenAI API authentication failedCheck OPENAI_API_KEY is set correctly
INFRA_EMBEDDING_COHERE_RATE_LIMITCohereRateLimitError429Cohere API rate limit exceededWait and retry
INFRA_EMBEDDING_VOYAGE_RATE_LIMITVoyageRateLimitError429Voyage API rate limit exceededWait and retry
INFRA_GIT_NOT_FOUNDGitCliNotFoundError503Git CLI is not installedInstall git
INFRA_GIT_TIMEOUTGitCliTimeoutError504Git command "{command}" timed out after {timeoutMs}msReduce scope or increase timeout
INFRA_ALIAS_OPERATIONAliasOperationError500Alias operation "{operation}" failed: {detail}Check Qdrant server status and collection names
INGEST_NOT_INDEXEDNotIndexedError404Codebase at "{path}" is not indexedRun index_codebase first
INGEST_COLLECTION_EXISTSCollectionExistsError409Collection "{collectionName}" already existsUse forceReindex=true or delete first
INGEST_SNAPSHOT_MISSINGSnapshotMissingError404Snapshot not found at "{path}"Ensure the snapshot file exists
INGEST_SNAPSHOT_CORRUPTEDSnapshotCorruptedError400Snapshot corrupted: {detail}Delete and re-index with forceReindex=true
INGEST_MIGRATION_FAILEDMigrationFailedError400Snapshot migration failed: {reason}Delete old snapshot and re-index
EXPLORE_COLLECTION_NOT_FOUNDCollectionNotFoundError404Collection "{collectionName}" does not existIndex the codebase first
EXPLORE_HYBRID_NOT_ENABLEDHybridNotEnabledError400Collection "{collectionName}" does not support hybrid searchRun reindex_changes — hybrid is enabled by default and auto-migrates
EXPLORE_INVALID_QUERYInvalidQueryError400Invalid query: {reason}Fix query parameters
TRAJECTORY_GIT_BLAME_FAILEDGitBlameFailedError500Git blame failed for "{file}"Ensure file is tracked by git
TRAJECTORY_GIT_LOG_TIMEOUTGitLogTimeoutError504Git log timed out after {timeoutMs}msReduce scope or increase timeout
TRAJECTORY_GIT_NOT_AVAILABLEGitNotAvailableError503Git is not availableEnsure git is installed and in PATH
TRAJECTORY_STATIC_PARSE_FAILEDStaticParseFailedError500Failed to parse "{file}"File may have syntax errors
CONFIG_VALUE_INVALIDConfigValueInvalidError400Invalid value "{value}" for field "{field}"Expected one of: {expected}
CONFIG_VALUE_MISSINGConfigValueMissingError400Required field "{field}" is not setSet the {envVar} environment variable

MCP Response Format

When an error occurs, the MCP server returns a structured JSON error response:

{
"isError": true,
"content": [
{
"type": "text",
"text": "Error [INFRA_QDRANT_UNAVAILABLE]: Qdrant is not reachable at http://localhost:6333\n\nHint: Start Qdrant: docker compose up -d, or verify QDRANT_URL=http://localhost:6333"
}
]
}

The text field always follows the pattern:

Error [<CODE>]: <message>

Hint: <hint>

For unknown/unexpected errors, the response includes the full stack trace in debug mode:

{
"isError": true,
"content": [
{
"type": "text",
"text": "Error [UNKNOWN_ERROR]: Unexpected error: Cannot read properties of undefined\n\nHint: Check server logs for details"
}
]
}

Enable debug logging with DEBUG=1 to get full stack traces in the server logs.


FAQ

Does reindexing cause downtime?

No. forceReindex uses zero-downtime collection aliases. A new versioned collection is built in the background while search continues on the current one. When indexing completes, the alias is switched atomically. Search is available 100% of the time during reindexing.

How do I know when indexing is complete?

The MCP server returns a success response with statistics (files indexed, chunks created, time elapsed). You can also check status anytime with get_index_status.

I accidentally cancelled the request. Is my indexing lost?

No worries! Indexing continues in the background until completion. Check progress with get_index_status. Already processed chunks are saved via checkpointing.

How do I stop indexing?

Find and kill the process:

ps aux | grep tea-rags
kill -9 <PID>

How do I resume interrupted indexing?

Just run index_codebase again. Completed steps are cached -- only remaining work will be processed.

Where are cache snapshots and logs stored?

All data is stored in ~/.tea-rags/:

  • snapshots/ -- file hash snapshots for incremental indexing
  • git-cache/ -- git blame cache (L2 disk cache)
  • logs/ -- debug logs (when DEBUG=1)

How do I enable MCP logging?

Run your agent with the DEBUG variable:

DEBUG=1 claude

Or add DEBUG=true to your MCP server configuration in env section.