Skip to content

docs(readme): add troubleshooting entry for stale plugin cache auth failure - #134

Open
JiwaniZakir wants to merge 1 commit into
griffinmartin:mainfrom
JiwaniZakir:fix/130-you-can-remove-the-cache-of-opencode-if
Open

docs(readme): add troubleshooting entry for stale plugin cache auth failure#134
JiwaniZakir wants to merge 1 commit into
griffinmartin:mainfrom
JiwaniZakir:fix/130-you-can-remove-the-cache-of-opencode-if

Conversation

@JiwaniZakir

Copy link
Copy Markdown

Closes #130

Adds a troubleshooting entry to README.md (line 106) for the case where the plugin is configured in opencode.json but authentication still fails due to a stale plugin cache — the fix is to run rm -rf ~/.cache/opencode and restart OpenCode, which triggers a fresh plugin reinstall.

Modified files:

  • README.md — new row in the troubleshooting table documenting the cache-clearing workaround

Verified manually by following the steps in the issue: adding the plugin, observing missing "anthropic": {} in ~/.local/share/opencode/auth.json, clearing the cache, restarting OpenCode, and confirming auth resolved after plugin reinstall.


This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@griffinmartin griffinmartin changed the title Fix #130: You can remove the cache of Opencode if you add this plugin... docs(readme): Fix #130: You can remove the cache of Opencode if you add this plugin... Apr 4, 2026
@griffinmartin griffinmartin changed the title docs(readme): Fix #130: You can remove the cache of Opencode if you add this plugin... docs(readme): add troubleshooting entry for stale plugin cache auth failure Apr 4, 2026
@griffinmartin

Copy link
Copy Markdown
Owner

The lint check is failing — you can fix the README formatting by running:

pnpm run lint:fix

or just the formatter:

pnpm run format

Then commit the result and push.

@griffinmartin

Copy link
Copy Markdown
Owner

@greptileai

@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a single troubleshooting row to the README.md table documenting a workaround for the case where a plugin is configured in opencode.json but authentication still fails due to a stale plugin cache.

Confidence Score: 5/5

This is a documentation-only change with no code execution impact; the workaround it documents is safe and correct.

The only change is one new row in a Markdown table. The rm -rf command targets the correct cache path and the overall guidance matches the issue's verified reproduction steps. The only nit is a minor wording contradiction in the solution description that could confuse readers but does not affect the correctness of the fix itself.

Files Needing Attention: No files require special attention beyond the minor wording issue flagged in the inline suggestion.

Important Files Changed

Filename Overview
README.md Adds a single troubleshooting table row documenting the stale plugin cache workaround; the rm -rf command and overall guidance are correct, but the explanation "fresh from the cache" is slightly contradictory since the cache was just deleted.

Fix All in Cursor Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
README.md:106
The explanation at the end of the solution is contradictory — after running `rm -rf ~/.cache/opencode` the cache no longer exists, so describing the subsequent reinstall as happening "from the cache" is misleading. OpenCode would be fetching/reinstalling the plugins from their original source, not from a (now-deleted) cache.

```suggestion
| Plugin added to `opencode.json` but auth still fails | Run `rm -rf ~/.cache/opencode` then restart OpenCode — it will reinstall plugins fresh on next startup             |
```

Reviews (1): Last reviewed commit: "Document cache-clear fix when plugin aut..." | Re-trigger Greptile

Comment thread README.md
| "Credentials not found" | Run `claude` to authenticate with Claude Code first |
| "Keychain is locked" | Run `security unlock-keychain ~/Library/Keychains/login.keychain-db` |
| "Token expired and refresh failed" | The plugin runs `claude` CLI to refresh automatically. If this fails, re-authenticate manually by running `claude` |
| Plugin added to `opencode.json` but auth still fails | Run `rm -rf ~/.cache/opencode` then restart OpenCode — it will reinstall plugins fresh from the cache |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The explanation at the end of the solution is contradictory — after running rm -rf ~/.cache/opencode the cache no longer exists, so describing the subsequent reinstall as happening "from the cache" is misleading. OpenCode would be fetching/reinstalling the plugins from their original source, not from a (now-deleted) cache.

Suggested change
| Plugin added to `opencode.json` but auth still fails | Run `rm -rf ~/.cache/opencode` then restart OpenCode — it will reinstall plugins fresh from the cache |
| Plugin added to `opencode.json` but auth still fails | Run `rm -rf ~/.cache/opencode` then restart OpenCode — it will reinstall plugins fresh on next startup |
Prompt To Fix With AI
This is a comment left during a code review.
Path: README.md
Line: 106

Comment:
The explanation at the end of the solution is contradictory — after running `rm -rf ~/.cache/opencode` the cache no longer exists, so describing the subsequent reinstall as happening "from the cache" is misleading. OpenCode would be fetching/reinstalling the plugins from their original source, not from a (now-deleted) cache.

```suggestion
| Plugin added to `opencode.json` but auth still fails | Run `rm -rf ~/.cache/opencode` then restart OpenCode — it will reinstall plugins fresh on next startup             |
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Cursor Fix in Claude Code Fix in Codex

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.

You can remove the cache of Opencode if you add this plugin in opencode.json but it doesn't work

2 participants