You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
[0.0.1] - 2026-11-12
Changed
Scripts call History through its tools RPC. The history namespace description and a new row in the history-recall skill's table now say that a script or cron job uses the tools RPC history.sessions.tools (opencode api post /api/rpc/history.sessions.tools/<tool>, as a session the script creates) and never reads OpenCode's database (opencode.db) or History's index (index.db) directly: the RPC masks secrets and applies the permission rules, and a direct read does neither. In an interleaved evaluation against 0.0.0 (both versions run case by case in the same hour, Claude Haiku on OpenCode, 45 core questions and 17 safety questions, one model and one synthetic history), the scripting question's direct database reads fell from 1 of 2 runs to none, with no regression on the core questions and no safety failures. Scores moved by 10 to 16 points between runs of the same version at different hours, so only the interleaved comparison is meaningful, and it supports "no regression", not a gain.
Known limits
The first index pass runs in the background. Until it finishes, search, sessions and recall answer from the sessions indexed so far. /history-status shows the progress.
Only OpenCode's database is read. When it cannot be read, or its layout is one this version does not know, the plugin falls back to the plugin session API, which holds only the messages after each session's latest compaction. Status says the history is partial.
Masking matches patterns. The built-in patterns and your mask entries catch the credentials they describe, not every secret. Text indexed before a change keeps its old form until /history-reindex rebuild.
The index is large and grows with your history. It takes about 2.7 times the text it holds, and deleting a session does not shrink the file.
Every tool is allowed by default. Any agent can read any indexed session in any project, and access decides what runs without asking. scope filters results; it is not access control.
Tested on OpenCode 2.2.3, 2.2.4, 2.2.5 and 2.2.6. Other releases inside >=2.2.3 <2.3.0 start, and status reports them as untested.
Updates are not automatic for a Git install, and opencode plugin update and opencode plugin check do not work on one: to move to a newer release, remove the old entry and add the new tag.