Fix Roo Code Infinite Loading "API Request..." in VS Code
Does your Roo Code extension hang forever on "API Request..." with an infinite loading spinner? Here's the definitive solution using a full manual cache purge.

π Fix Roo Code Infinite "API Request..." Loading in VS Code β Complete Troubleshooting Guide
π Step 0 β Identify Your Problem (Choose One)
Before diving into solutions, please check which error scenario matches your experience.
β Question 1: Did your Roo Code work normally before, and then suddenly got stuck on "API Request..." even after reinstalling?
OR does it work fine when you open VS Code with no folder, but hangs when you open a project folder?
β Question 2: When you open the Developer Tools (Ctrl+Shift+P β Developer: Toggle Developer Tools) and look at the Console tab, do you see repeated errors like:
Could not find ripgrep binaryripgrep not foundENOTFOUNDnetwork errors (but those are secondary)?
β Question 3: After resetting or reinstalling Roo Code, does it still remember your old chat history and API token, and then hangs again?
Based on your answers:
- If you see
ripgreperrors β You have Problem #1 (Missing ripgrep). - If Roo Code keeps old data after reinstall and hangs, but no ripgrep error β You have Problem #2 (Corrupted Cache).
If you are unsure, try the Quick Diagnosis below.
β‘ Quick Diagnosis (One Command)
Open PowerShell (Win + X β Terminal) and run:
Get-ChildItem -Path "$env:USERPROFILE\.vscode\extensions\rooveterinaryinc.roo-cline-*" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
- If you see a path and the folder exists β You likely have Problem #2 (Cache).
- If you get no output, proceed to the ripgrep test:
rg --version
- If
rgis not found β Problem #1 (Missing ripgrep). - If
rgworks but Roo Code still hangs β Problem #2 (Cache).
π‘ Problem #1: Missing ripgrep Binary β The "Ripgrep Not Found" Error
π΄ Symptom (What you see)
Your Roo Code hangs forever on "API Request...".
In the Developer Tools console (Ctrl+Shift+P β Developer: Toggle Developer Tools β Console tab), you see repeated lines like:
Could not find ripgrep binary
Error: Could not find ripgrep binary
π§ Why does this happen? (Technical)
Roo Code uses a fast fileβsearching tool called ripgrep to index and search files in your workspace (for features like workspace tracking, file search, etc.).
By default, it tries to locate the rg executable in your system PATH. If ripgrep is not installed or not reachable, Roo Code waits indefinitely for a response, causing the infinite hang.
πΆ Explanation (Simple, nonβtechnical)
Imagine Roo Code is a robot that needs a special flashlight called "ripgrep" to see inside folders. If the flashlight is missing, the robot just stands there waiting. It never gives up β it just stays stuck. We need to either give it the flashlight or tell the robot to stop looking for it.
β Solution 1 β Install ripgrep Properly
Technical Approach (For advanced users)
Install ripgrep using a package manager. Open PowerShell as Administrator and run one of these:
Using Winget (Windows 10/11):
winget install BurntSushi.ripgrep.MSVC
Using Scoop:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install ripgrep
Using Chocolatey:
choco install ripgrep
After installation, close VS Code completely and restart.
Simple Explanation (For beginners)
We are downloading and installing the missing flashlight (ripgrep) on your computer. Once it's installed, close VS Code and open it again β the robot will find its flashlight and work normally.
β Solution 2 β Force Add ripgrep Path to VS Code (If already installed)
Sometimes ripgrep is installed but VS Code doesn't see it.
Technical
Find where
rg.exeis located. Usually:C:\Users\YourUsername\scoop\shims\rg.exe(if installed via Scoop)C:\Program Files\ripgrep\bin\rg.exe(if installed via winget)
Open VS Code User Settings JSON (
Ctrl+Shift+PβPreferences: Open User Settings (JSON)).Add this block inside the existing
{ }:"terminal.integrated.env.windows": { "PATH": "C:\\Users\\YourUsername\\scoop\\shims;${env:PATH}" }(Adjust the path to your actual
rg.exefolder)Save and reload VS Code (
Ctrl+Shift+PβDeveloper: Reload Window).
Simple Explanation
We are telling VS Code exactly where the flashlight is, because it was looking in the wrong drawer. After this, the robot will find it immediately.
β Solution 3 β Edit the Roo Code Extension Itself (Ultimate Fix)
If none of the above works, we can modify Roo Code's internal file to bypass the search.
Technical (For advanced users)
Close VS Code completely.
Navigate to the extension folder:
%USERPROFILE%\.vscode\extensions\rooveterinaryinc.roo-code-nightly-0.0.8179\dist(Replace the version number with your installed one)
Make a backup copy of
extension.js.Open
extension.jsin a text editor (like Notepad++ or VS Code itself, but ensure VS Code is not running with the project).Search for
function getRipgrepPath(orgetRipgrepPath =).Replace the entire function body with:
return "C:\\Windows\\System32\\rg.exe";Or if you have
rg.exesomewhere else, use that full path.Save the file.
Restart VS Code and test.
Simple Explanation
We opened the robot's brain and rewired it: instead of searching for the flashlight, we directly told it, "The flashlight is right here at this exact spot." Now it won't waste time looking.
π’ Problem #2: Corrupted VS Code Cache β The "Ghost Data" Issue
π΄ Symptom (What you see)
- Roo Code hangs on
"API Request..."even after resetting or reinstalling. - After uninstall/reinstall, old chat history and API tokens are still there.
- The hang appears only when a project folder is open (works fine with no folder).
- In Developer Tools console, you see errors like
Failed to load resourceorCould not find ripgrep binarymay also appear, but the main issue is leftover cache.
π§ Why does this happen? (Technical)
VS Code stores extension data, cache, and logs in several system folders. Normal uninstall does not delete these folders. When corrupted files (e.g., broken index maps, old log conflicts) remain, Roo Code reads them and enters an infinite loop before even making the API call.
πΆ Explanation (Simple)
Imagine you have a backpack. You put some food inside, but it goes bad. Even if you throw away the backpack, the rotten food stays in your closet. Later, when you buy a new backpack, the old rotten food falls inside and spoils everything again. We need to clean the entire closet, not just throw away the backpack.
β The Only Solution: Full Manual Purge of VS Code Cache
Technical Steps (Windows PowerShell as Administrator)
Close VS Code completely (no
Code.exein Task Manager).Open PowerShell as Administrator (
Win + Xβ Terminal (Admin)).Delete all Roo Code related folders and cache:
# Remove extension storage
Remove-Item -Path "$env:APPDATA\Code\User\globalStorage\rooveterinaryinc.roo-cline" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:APPDATA\Code\User\globalStorage\rooveterinaryinc.roo-code-nightly" -Recurse -Force -ErrorAction SilentlyContinue
# Remove extension itself (if any leftover)
Remove-Item -Path "$env:USERPROFILE\.vscode\extensions\rooveterinaryinc.roo-cline-*" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:USERPROFILE\.vscode\extensions\rooveterinaryinc.roo-code-nightly-*" -Recurse -Force -ErrorAction SilentlyContinue
# Remove VS Code global cache
Remove-Item -Path "$env:APPDATA\Code\Cache" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:APPDATA\Code\CachedData" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:APPDATA\Code\CachedExtensionVSIXs\*roo*" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:APPDATA\Code\logs" -Recurse -Force -ErrorAction SilentlyContinue
# Local cache
Remove-Item -Path "$env:LOCALAPPDATA\Code\Cache" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path "$env:LOCALAPPDATA\Code\CachedData" -Recurse -Force -ErrorAction SilentlyContinue
Restart your computer (clears RAM and any inβmemory corruption).
Reinstall Roo Code from VS Marketplace and configure your API key as if it's the first time.
Simple Explanation
We are deleting every single file that VS Code and Roo Code ever created β like emptying your entire closet, wiping the floor, and throwing away all old rotten food. Then we restart the computer so the memory is fresh. When you install Roo Code again, it starts with a completely clean slate, and the infinite hang disappears.
π Key Error Keywords (For Search and Troubleshooting)
RIPGREP_MISSING_ERRORCOULD_NOT_FIND_RIPGREP_BINARYROO_CODE_INFINITE_API_REQUESTVS_CODE_CACHE_CORRUPTIONMANUAL_PURGE_SOLUTIONEDIT_EXTENSION_SOURCE_CODE_FIXGRADLE_USER_HOME(not used here but related)HARD_LINK_FAILED(different issue)ENOTFOUND(network, not Roo Code fault)
π― Final Checklist
- Did you check Developer Tools Console for
ripgreperrors? β If yes, apply Problem #1 solutions. - Does Roo Code remember old data after reinstall? β If yes, apply Problem #2 (full manual purge).
- After applying the correct solution, restart VS Code and your computer.
- Test with a simple message like "Hello".
π¬ Need More Help?
If you still face issues, please provide the exact error lines from the Developer Tools Console. We will update this guide accordingly.
Happy coding! π
Core JSC Team