Skip to content

feat: reasoned per-turn memory recall with auto-approve#52

Open
sreedharsreeram wants to merge 5 commits into
mainfrom
sreedharsreeram/bump-package
Open

feat: reasoned per-turn memory recall with auto-approve#52
sreedharsreeram wants to merge 5 commits into
mainfrom
sreedharsreeram/bump-package

Conversation

@sreedharsreeram

@sreedharsreeram sreedharsreeram commented Jun 16, 2026

Copy link
Copy Markdown
Member

No description provided.

sreedharsreeram and others added 5 commits June 15, 2026 23:16
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>
@sreedharsreeram sreedharsreeram requested a review from ved015 June 16, 2026 06:26
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