Skip to content

feat(cursor): add prompt-aware recall and resilient transcript handling - #3492

Draft
voarsh2 wants to merge 5 commits into
vectorize-io:mainfrom
voarsh2:cursor-desktop-coding-agents
Draft

feat(cursor): add prompt-aware recall and resilient transcript handling#3492
voarsh2 wants to merge 5 commits into
vectorize-io:mainfrom
voarsh2:cursor-desktop-coding-agents

Conversation

@voarsh2

@voarsh2 voarsh2 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor
  • Add automatic beforeSubmitPrompt recall for every substantive user prompt.
  • Build prompt-aware recall queries from recent transcript turns, with configurable roles, tool markers, query length, score floors, and timeout.
  • Refresh the workspace rules-file context after successful prompt recall while returning Cursor’s documented {"continue": true} response.
  • Improve session-start recall handling with CURSOR_PROJECT_DIR, UTF-8 BOM-safe hook input, configurable API timeout, and the documented additional_context field.
  • Fix transcript retention for Cursor 3.x role-nested JSONL payloads and environment-provided transcript/session paths.
  • Keep retained content focused on conversation by removing injected memories, <external_links> previews, internal reasoning, and tool traffic by default.
  • Preserve structured tool-call data only when explicitly enabled, while retaining channel-message text and avoiding Hindsight feedback loops.
  • Ensure repeated retains receive distinct conversation-scoped document IDs and support configurable retained roles.
  • Make installation portable across platforms with py -3 on Windows, python3 elsewhere, plus --python-command and --hook-timeout overrides.
  • Add hook timeouts of 15s for session/stop hooks and 45s for prompt recall, while preserving stop-hook timing when overrides are used.
  • Expand unit, hook, CLI, rules-file, transcript, configuration, and integration coverage.
  • Synchronize the package README, integration docs, catalog metadata, Cursor skill guidance, and SDK reference documentation.

Note

Cursor uses additional_context for sessionStart; beforeSubmitPrompt only supports continue, so prompt recall refreshes the workspace rules file instead. The removed additionalContext references reflect the previous Cursor implementation and are not emitted by this branch.

Test plan

  • py -3 -m pytest tests -q — 101 passed, 4 skipped
  • Covered prompt recall, multi-turn transcript context, score filtering, and timeout configuration
  • Covered Cursor 3.x transcript formats, UTF-8 content, BOM input, environment transcript paths, and retention cleanup
  • Covered Windows/non-Windows launcher rendering and explicit launcher/timeout overrides
  • Covered rules-file generation, .gitignore handling, session context delivery, and end-to-end hook behavior
  • Ran Python compilation checks

voarsh added 5 commits August 14, 2026 09:29
Adds automatic memory retrieval before each prompt while preserving broad session recall.

Uses workspace rules as a reliable delivery path when native hook context is unavailable, and keeps native output for forward compatibility.

Handles platform payload differences, workspace-derived banks, configurable query context, score filtering, and timeout behavior.
Keeps retained memories focused on conversational roles and excludes transient web previews and tool traffic by default.

Preserves structured tool data when explicitly enabled, supports runtime-provided transcript paths, and gives repeated retains distinct conversation-scoped documents.
Selects a platform-appropriate Python launcher so generated plugin commands work on Windows and other environments.

Allows installers to override the launcher and prompt-hook timeout without changing the packaged plugin, while leaving existing task-stop timing intact.
Verifies prompt recall, session recall, retention cleanup, workspace bank selection, configuration overrides, and rules-file behavior.

Exercises platform-specific installation rendering and end-to-end context delivery so regressions surface at both unit and integration boundaries.
Explains prompt-level recall, reliable context delivery, new configuration controls, and platform-specific installation options.

Keeps the public integration pages, package README, skill guidance, catalog summary, and reference copy aligned with the shipped behavior.
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.

2 participants