feat: reasoned per-turn memory recall with auto-approve#52
Open
sreedharsreeram wants to merge 5 commits into
Open
feat: reasoned per-turn memory recall with auto-approve#52sreedharsreeram wants to merge 5 commits into
sreedharsreeram wants to merge 5 commits into
Conversation
Plumbing for reasoned per-turn memory recall. Adds the nullable `recallDirective` setting (overrides the directive text the model is shown each turn) and a `getRecallConfig()` helper that resolves it, falling back to null so recall.ts uses its built-in default. No behavior change on its own. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Port the Claude Code "reasoned per-turn recall" to OpenCode's in-process hook model. New src/services/recall.ts holds the platform-agnostic DEFAULT_RECALL_DIRECTIVE (adapted to reference the native `supermemory` tool with mode:"search" instead of a skill/Bash script) plus a debug self-report suffix gated on SUPERMEMORY_DEBUG. chat.message now pushes the directive as a synthetic text part on every turn, so the model decides per-message whether recalling saved memory helps. Always on; the only knob is recallDirective. No network call in the hook — the directive is the entire product surface. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
OpenCode's equivalent of Claude Code's PreToolUse auto-approve. A narrow permission.ask hook sets status:"allow" only for the `supermemory` tool in read-only `search` mode, so reasoned recall runs as silently as the save path. The allow-list is deliberately narrow and never denies: the tool's own add/forget writes, and anything we can't positively identify as the search, fall through to OpenCode's normal permission flow. Fails open on any error. (Defense-in-depth: OpenCode doesn't prompt for plugin tools by default, so this mainly covers users with strict permission config.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
README gains a "Reasoned Recall" section and the recallDirective config option. `status` now reports per-turn reasoned recall (plus the eager session-start dump when autoRecallEveryPrompt is on) and whether a custom recall directive is set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Ship reasoned per-turn recall. Bumps package.json (release workflow auto-publishes on the version change) and PLUGIN_VERSION in lockstep so the update-notice check matches the published version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.