Skip to content

fix(continual-learning): support persistent workspace exclusions - #529

Open
rohan-patnaik wants to merge 2 commits into
cursor:mainfrom
rohan-patnaik:fix/continual-learning-excluded-paths
Open

rohan-patnaik wants to merge 2 commits into
cursor:mainfrom
rohan-patnaik:fix/continual-learning-excluded-paths

Conversation

@rohan-patnaik

@rohan-patnaik rohan-patnaik commented Oct 9, 2026 •

Copy link
Copy Markdown

Refs #141 (workspace exclusions).

Add excludedPaths in ~/.cursor/continual-learning.json, with an optional CONTINUAL_LEARNING_CONFIG path override. A listed directory and its descendants skip the stop-hook trigger before any state writes. Path matching resolves symlink aliases and does not match sibling prefixes. The continual-learning skill passes the helper path and workspace to the updater, which checks the same setting for manual runs.

Missing config preserves current behavior. Invalid or unreadable config stops learning and reports an error. Cadence and memory-file settings are unchanged; Git remote owner/slug matching is outside this change.

Validation: 13 Bun tests pass, including an actual stop-hook regression that fails before the hook change, allowed-workspace behavior, malformed config, descendants and symlinks. The helper also runs with CURSOR_PLUGIN_ROOT absent and a space-containing install path. git diff --check passes.


Note

Medium Risk
Changes when learning runs and reads user config from disk; misconfiguration or strict validation could block learning, but scope is limited to the continual-learning plugin hooks and updater flow.

Overview
Adds persistent workspace exclusions so continual learning can be turned off for specific local directories via ~/.cursor/continual-learning.json (excludedPaths of absolute paths), with optional CONTINUAL_LEARNING_CONFIG override.

A new workspace-exclusions helper resolves symlinks, matches a path and its descendants (not prefix siblings), treats a missing config as “not excluded,” and throws on invalid config so learning does not run silently. The stop hook bails out before cadence state or follow-up triggers when excluded; the continual-learning skill passes the installed helper path and workspace to agents-memory-updater, which must run the helper with bun run before reading transcripts or updating AGENTS.md. Docs and focused Bun tests cover hook behavior, manual updater path, symlinks, and malformed config.

Reviewed by Cursor Bugbot for commit 33a7d45. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit a3ac327. Configure here.

Comment thread continual-learning/agents/agents-memory-updater.md Outdated
Comment thread continual-learning/hooks/workspace-exclusions.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant