Open
Conversation
Add hindsight-opencode integration with: - Three custom tools: hindsight_retain, hindsight_recall, hindsight_reflect - Auto-retain on session.idle with document_id deduplication - Memory injection on session start via system transform hook - Memory preservation during context window compaction - Sliding window retain with retainOverlapTurns support - 4-level config hierarchy (defaults, user file, plugin options, env vars) - Dynamic bank ID derivation (agent, project, channel, user dimensions) - CI job, release script entry, docs page 79 tests across 6 test files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Pre-compaction retain now uses shared retainSession() helper, respecting retainMode, documentId, and session_id metadata consistently with idle-retain (was bypassing retention policy). 2. System transform recall is only consumed after successful injection. If Hindsight is briefly unavailable, the plugin retries on the next LLM call instead of permanently skipping recall for the session. 3. Config validation for retainMode and recallBudget — typos like "full_session" or "maximum" now log a warning and fall back to the default instead of silently changing retention semantics. 85 tests (6 new covering compaction documentId, recall retry, and config validation). Co-Authored-By: Claude Opus 4.6 <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.
Summary
@vectorize-io/opencode-hindsightplugin for OpenCode with persistent long-term memoryhindsight_retain,hindsight_recall,hindsight_reflect) + three automatic hooks (session recall, auto-retain on idle, compaction preservation)document_id, sliding window retain withretainOverlapTurnstest.yml, release script entry, docs page, 79 tests across 6 filesTest plan
npm test— 79/79 tests passnpm run build— tsup builds cleanly🤖 Generated with Claude Code