Solution for latest version cursor CPU HIGH ISSUE

entirely:

sudo nano /tmp/rgwrap

Paste this into nano:

#!/bin/bash
RG_ORIG="/usr/bin/rg"
LOG="/tmp/rg-cursor.log"
TIMEOUT=30
args=()
for arg in "$@"; do
  [[ "$arg" == "--follow" ]] && continue
  [[ "$arg" == "--no-ignore" ]] && continue
  [[ "$arg" == "--no-ignore-parent" ]] && continue
  [[ "$arg" == "--no-ignore-global" ]] && continue
  args+=("$arg")
done
echo "[$(date '+%H:%M:%S')] PID=$$ ARGS: ${args[*]}" >> "$LOG"
start=$(date +%s)
timeout "$TIMEOUT" "$RG_ORIG" "${args[@]}"
rc=$?
elapsed=$(( $(date +%s) - start ))
if [[ $rc -eq 124 ]]; then
  echo "[$(date '+%H:%M:%S')] KILLED after ${elapsed}s" >> "$LOG"
else
  echo "[$(date '+%H:%M:%S')] DONE in ${elapsed}s (rc=$rc)" >> "$LOG"
fi
exit $rc

Save (Ctrl+O, Enter, Ctrl+X), then:

sudo cp /tmp/rgwrap /usr/share/cursor/resources/app/node_modules/@vscode/ripgrep/bin/rg
sudo chmod +x /usr/share/cursor/resources/app/node_modules/@vscode/ripgrep/bin/rg