Skip to content

fix: show one out-of-credits notice per session when recall is refused - #134

Draft
MaheshtheDev wants to merge 2 commits into
mainfrom
capy/show-one-out-of
Draft

MaheshtheDev wants to merge 2 commits into
mainfrom
capy/show-one-out-of

Conversation

@MaheshtheDev

Copy link
Copy Markdown
Member

Why

  • Since the API started refusing search and profile at $0 credits, recall fails with 402.
  • The plugin shows a generic "recall unavailable" toast on every prompt and never says why.

What

  • On a 402 from recall or the first-prompt profile, one warning toast shows the billing link: ◪ supermemory · recall paused · You've run out of credits. Top up to continue. https://console.supermemory.ai/billing
  • It is shown once per session. Later prompts stay quiet.
  • Recall still runs on every prompt, so it resumes on its own after a top-up. The prompt is never changed or blocked. Same behavior in OpenCode V1 and OpenCode 2.

Numbers

  • User-visible refusal toasts in a session with 3 prompts: 3 generic → 1 out-of-credits notice.
  • Tested with the real V1 chat.message hook against a mock that answers 402 with the API's exact body, on v5 and legacy. OpenCode 2 is covered by a runtime test.

Notes

Open in Capy

MaheshtheDev and others added 2 commits November 25, 2026 17:25
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

# Conflicts:
#	src/v2/runtime.test.ts
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