Repository navigation
fix(opencode-plugin): report an unreachable server in the session - #7647
Open
marlon-costa-dc wants to merge 1 commit into
Open
marlon-costa-dc wants to merge 1 commit into
marlon-costa-dc wants to merge 1 commit into
Conversation
The only outage signal was the startup health toast, which fires before the OpenCode TUI attaches and is dropped. Every later prompt then hit `if (!health.ok) return` and ran without recalled memories while the user saw nothing; the warning reached only the plugin log. When the per-prompt health check fails, recall now logs the cause and posts an error toast naming the endpoint and the error, so the session shows that the prompt runs without memory. createMemoryRecall takes the notifier from the runtime (makeToast(client)); callers without one keep the old behaviour. Verified in a live OpenCode 1.19.5 TUI with the server stopped: the toast appears on the first prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Description
When the OpenViking server is unreachable, the OpenCode plugin shows nothing in the session. The only outage signal is the startup health toast in
initializeRuntime, which fires before the OpenCode TUI attaches, so it is dropped. Every later prompt then reachesif (!health.ok) returninbuildRelevantMemoriesand runs without recalled memories, while the user sees no sign of it. The warning goes only to the plugin log file.With this change, a failed per-prompt health check logs the cause and posts an error toast naming the endpoint and the error, so the session shows that the prompt runs without memory.
Human Involvement
Type of Change
Changes Made
createMemoryRecalltakes an optionalnotify(message, variant); when absent it is a no-op, so existing callers keep the old behaviour./health, recall logsWARN recallwith endpoint, status and error, and callsnotifywith anerrorvariant.createOpenVikingRuntimepassesmakeToast(client)as the notifier.127.0.0.1:1(no mock) produces exactly one error notice and no recall block.Testing
node --test tests/*.test.mjs: 62 pass;npm run checkclean)Also verified in a live OpenCode 1.19.5 TUI with the server stopped: the toast
OpenViking memory is unavailable at http://127.0.0.1:…appears on the first prompt. Before the change, nothing was shown.Checklist
🤖 Generated with Claude Code