Problem
handleSearchCode and handleIndexCodebase call syncIndexedCodebasesFromCloud() before operations, but handleGetIndexingStatus does not.
Current Behavior
// handlers.ts:144 - handleIndexCodebase
await this.syncIndexedCodebasesFromCloud();
// handlers.ts:414 - handleSearchCode
await this.syncIndexedCodebasesFromCloud();
// handlers.ts:691 - handleGetIndexingStatus
// NO sync call
Impact
Status check may return stale/incorrect data compared to actual index/search operations.
Expected Behavior
Either:
- All handlers sync before operation (consistent but slower)
- No handlers sync inline (rely on background sync only)
Location
packages/mcp/src/handlers.ts:691-799