Switch back to what you were doing while Cursor works. Get pulled back when it needs you.
Written in Rust. No dependencies. Just download and run.
See Recursor in action.
Switch to Cursor, submit a prompt, get sent back to what you were doing—and get pulled back only when the agent needs you.
recursordemo_1080p.mp4
One command:
curl -fsSL https://github.com/adityasingh2400/Recursor/main/install.sh | shOr download and double-click:
| macOS | Windows | Linux |
|---|---|---|
Then restart Cursor. That's it.
macOS: On first use, click "Allow" when macOS asks for Accessibility permission.
- You're watching YouTube or doing something else
- You switch to Cursor, submit a prompt, and the agent starts working
- Recursor sends you back to YouTube
- When the agent needs approval for a command, you get pulled back to Cursor
- After you approve, you go back to YouTube
- When the agent finishes, you get pulled back to Cursor to see the results
If you're watching YouTube, Recursor pauses the video when pulling you to Cursor and resumes it when sending you back.
To have Recursor automatically pause/resume YouTube when switching windows:
macOS: In Chrome, go to View → Developer → Allow JavaScript from Apple Events
recursor status # Check current state
recursor permissions # Test if permissions are working (macOS)
recursor clear # Reset saved stateWindow switching not working on macOS?
Click "Allow" when macOS prompts for Accessibility permission. If you missed it: System Settings → Privacy & Security → Accessibility → enable for Terminal/Cursor.
YouTube not pausing/resuming?
Enable AppleScript in Chrome: View → Developer → Allow JavaScript from Apple Events.
Not getting pulled back to Cursor?
Run recursor status to check if state is being saved.
Commands running without asking for approval?
That command is in your Cursor allowlist. Check Cursor settings → Agent → Command Allowlist.
The installer sets up hooks automatically. If you need to do it manually, create ~/.cursor/hooks.json:
{
"version": 1,
"hooks": {
"beforeSubmitPrompt": [
{ "command": "/Users/YOUR_USERNAME/.cursor/bin/recursor save" }
],
"beforeShellExecution": [
{ "command": "/Users/YOUR_USERNAME/.cursor/bin/recursor before-shell" }
],
"afterShellExecution": [
{ "command": "/Users/YOUR_USERNAME/.cursor/bin/recursor after-shell" }
],
"stop": [
{ "command": "/Users/YOUR_USERNAME/.cursor/bin/recursor restore" }
]
}
}Replace YOUR_USERNAME with your username (whoami to find it).
rm ~/.cursor/bin/recursor
rm ~/.cursor/hooks.json
rm ~/.cursor/recursor_state.jsongit clone https://github.com/adityasingh2400/Recursor.git
cd Recursor
cargo build --release
cp target/release/recursor ~/.cursor/bin/MIT