diff --git a/src/resources/extensions/sf/subagent/index.js b/src/resources/extensions/sf/subagent/index.js index e7d21d0f6..dc73adff2 100644 --- a/src/resources/extensions/sf/subagent/index.js +++ b/src/resources/extensions/sf/subagent/index.js @@ -161,7 +161,22 @@ function isCodebaseSearchError(details) { * Consumer: `codebase_search.execute`. */ function buildCodebaseSearchArgs(strategy, query, scope) { - return ["search", "--strategy", strategy, "--agent", query, scope]; + // Restrict retrievers to bm25+phrase and disable ML reranking to avoid + // the vector retriever hang where embedding model inference stalls forever + // (#vector-hang-fix). This gives fast lexical results without the broken + // semantic path. + return [ + "search", + "--strategy", + strategy, + "--retrievers", + "bm25,phrase", + "--reranking", + "none", + "--agent", + query, + scope, + ]; } function formatUsageStats(usage, model) { const parts = []; @@ -2502,7 +2517,7 @@ export default function (pi) { name: "codebase_search", label: "Code Search", description: [ - "Perform Sift-backed hybrid (BM25 + Vector) retrieval over a scoped codebase path.", + "Perform Sift-backed hybrid (BM25 + phrase) retrieval over a scoped codebase path.", " Use this for conceptual, behavioral, or cross-cutting questions only after choosing a narrow scope", " (e.g. 'how is X handled?', 'where is the logic for Y?', 'find examples of Z').", " If Sift status is degraded or the scope is broad, prefer grep/find/ls and retry with a narrower scope.",