Cursor's billing UI had a bug: once you hit the hard cap on your spending limit, the UI wouldn't let you raise it or toggle usage-based pricing. I poked around, found the API call, wrote this one-off patch for the browser console. Would have been a PR if Cursor were open source, or a gist if I'd been thinking practically. Ended up as a repo. Cursor eventually fixed the bug.
Browser console script for managing Cursor's spending limit and usage-based pricing.
- Open browser DevTools (F12)
- Paste
main.jsinto the console - Get your session token (see below) and initialize
// Initialize with your session token
init('your_token_here');
// Set spending limit (USD)
setLimit(100);
// Set limit and disable usage-based pricing
setLimit(100, true);
// Print token instructions
getToken();- Open DevTools (F12)
- Application → Cookies →
cursor.com - Copy the
WorkosCursorSessionTokenvalue - Run
init('paste_token_here')
- Open DevTools (F12)
- Storage → Cookies →
cursor.com - Copy the
WorkosCursorSessionTokenvalue - Run
init('paste_token_here')
MIT