BugBot and Memories
- Set up BugBot to review pull requests automatically and act on its comments in Cursor
- Create project-level and user-level Memories to persist context across Chat sessions
- Manage Memories to keep them accurate and context-window efficient
BugBot: Automated PR Review
BugBot is a GitHub app that integrates with Cursor to review pull requests automatically. When a PR is opened or updated, BugBot reads the diff, analyses the changes, and posts comments identifying potential issues: logic errors, missing error handling, security concerns, inconsistencies with the rest of the codebase.
Setting Up BugBot
- Go to Cursor Settings and find the BugBot section, or install it directly from the GitHub Marketplace.
- Authorise BugBot to access the GitHub repositories you want it to review.
- Open or update a PR — BugBot reviews it automatically and posts comments.
How BugBot Comments Work
Each BugBot comment identifies a specific issue and includes a pre-filled prompt. You click the prompt, it opens in Cursor at the relevant code location, and you can immediately address the issue with Agent or Cmd+K — without having to explain the problem to Cursor from scratch.
BugBot Autofix takes this further: in some cases BugBot doesn't just flag an issue, it proposes a fix. You review the proposed change in Cursor and accept or reject it.
Treating BugBot as a First Pass
BugBot is a first-pass review, not a final one. It catches a useful category of issues — particularly things that are consistent rule violations or common error patterns. It will miss issues that require deep domain knowledge or understanding of business logic. Treat it as a colleague who does a quick check before human reviewers look at the code.
Memories: Context That Persists
Every time you start a new Chat session in Cursor, the conversation history resets. Memories exist to solve the problem of repeatedly re-explaining the same things. A Memory is a piece of information Cursor stores and injects into future Chat sessions automatically.
Two Levels of Memory
- User-level Memories — Apply across all projects. Store personal preferences: your preferred naming style, the languages you work in, how you like explanations structured.
- Project-level Memories — Apply only to the current project. Store project-specific facts that Cursor would otherwise forget: "we use Drizzle ORM not Prisma", "authentication middleware is in middleware.ts", "the legacy module in lib/old/ should not be modified".
Creating Memories
In any Chat, type "remember that..." and Cursor will create a Memory from what follows. You can also create Memories through the Memories panel in Settings. Each Memory is stored as an editable entry — you can view, edit, and delete them at any time.
Managing Your Memories
Memories consume context window space on every Chat prompt. Occasionally review your project and user Memories and delete ones that are stale, incorrect, or no longer relevant. A handful of precise, accurate Memories is more valuable than a large collection of outdated ones.
- BugBot catches a useful first pass of issues in PRs — treat its comments as a starting point, not a complete review
- Use project-level Memories for architectural facts Cursor keeps forgetting; user-level for personal coding preferences
- Review and prune Memories periodically — stale ones consume context and can produce incorrect output