Skip to content

Fall back from Fable to Opus when Claude is out of usage credits - #210

Merged
BunsDev merged 9 commits into
mainfrom
credit-fallback
Oct 15, 2026
Merged

BunsDev merged 9 commits into
mainfrom
credit-fallback

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Updated against current main, preserving the landed archive/deletion fixes and the newer iPhone long-press recovery test. The fallback implementation and regression tests match the reviewed fallback portion of #221; its independent native-window E2E observer change is not included here.

What changes

When Claude Code refuses Fable for usage credits, Modex now reruns the turn on Opus instead of ending it with a failure card.

  • Fallback. The rerun happens only when the refusal arrives before any reply, tool or reasoning, so no work runs twice. It continues the same Claude session.
  • It says so. A warning in the thread names both models, and Auto's route receipt gets the same reason. The switch is marked as Modex's, so Auto does not learn it as a user override.
  • No repeat refusals. For an hour after a refusal, Fable turns start on Opus directly.
  • Clearer card. "You're out of usage credits" was classified as unknown. It is now rate_limited, with the summary "Claude Code is out of usage credits for this model." If Opus also fails, the card lists the fallback under recovery.
  • No duplicate bubble. The CLI streams the refusal as a synthetic assistant reply (model <synthetic>) before the failed result. The backend now drops it.
  • Truthful fallback results. Empty Opus completions retain a retryable failure. Auto records the actual Opus model/tier and premium usage without learning a false user override.
  • Setting. Settings > General has "Fall back to Opus when Fable is out of usage credits", on by default.

Verification

  • Current-main conflict resolution retains the iPhone archive long-press recovery regression unchanged and removes duplicate deletion status notes.
  • The fallback implementation and tests match the reviewed fallback portion of Handle inactive native windows and recover paired iPhone menus #221, including Correct fallback failure detection and Auto history (#210 follow-up) #212 and Sync fallback with landed deletion and archive fixes #214 corrections.
  • Full pnpm build and pnpm test passed: 1,447 passed, 16 platform-specific skips, no failures.
  • Focused fallback, Claude backend and owner-removal integration tests: 41 passed.
  • Desktop main/renderer typecheck passed; site E2E: 7 passed.
  • Local pnpm test:e2e passed its first five cases, then the existing relaunch test timed out in app.close() before relaunch. The run was stopped; its trace is preserved. This is not a green full E2E result. The PR-triggered macOS check subsequently passed its full build, unit, Electron/browser E2E and site stages (run); the push-triggered required macOS check also passed (run). Both runs passed all 296 desktop E2E tests and all 7 site E2E tests.

Coven-Harness: Codex / GPT-6

Claude Code refuses Fable with "You're out of usage credits. Switch to
another model..." before running anything. Modex showed that as an
assistant bubble plus an "unknown" failure card and stopped.

Now, when the refusal arrives before any reply, tool or reasoning, the
runner reruns the turn on Opus in the same session, posts a warning
naming both models, and notes it on Auto's route receipt. Later Fable
turns start on Opus for an hour. A refusal after work started keeps its
failure card, so nothing runs twice. If Opus also fails, the card lists
the fallback under recovery.

The Claude backend drops the CLI's synthetic API-error reply, which the
failed result repeats. The classifier reads "out of usage credits" as
rate limited with its own summary. Settings > General can turn the
fallback off; it is on by default.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 15, 2026 8:58am UTC

Request Review

Keep empty fallback replies retryable and record the actual Opus route without a false user override.

Coven-Harness: Codex / GPT-6
Separate owner-removal admission from restart so deletion drains its own turns while unrelated turns continue. Preserve admitted routing and title updates, replay surviving thread metadata after canonical adoption, and retain Stop recovery.

Coven-Harness: Codex / GPT-6
Preserve archive state, unarchive on send, and keep active or waiting threads visible. Includes reservation-release and stable-layout acceptance corrections.

Coven-Harness: Codex / GPT-6
@BunsDev BunsDev self-assigned this Oct 15, 2026
Move running Knowledge controls into the titlebar, remove its outer frame, and collapse the duplicate Space sidebar while preserving saved preferences. Support Backspace/Delete for safely mapped rendered Space selections and retain the editing caret.

Coven-Harness: Codex / GPT-6
Preserve the reviewed fallback fixes while integrating thread deletion and archive behavior. Cover pending credit refusal during owner-removal admission.

Coven-Harness: Codex / GPT-6
On a loaded simulator the press reached the row as a tap: CI run
38677984502 failed with the thread's transcript on screen and no
context menu. pressForMenu goes back and presses longer, and the test
makes its first attempt a tap so the recovery runs on every run; the
menu itself is still required.

Coven-Harness: Claude Code / claude-opus-5-5
Preserve the landed iPhone archive long-press recovery regression and keep the Fable fallback status entry without duplicating deletion notes. Retain reviewed fallback corrections from #212 and #214.

Coven-Harness: Codex / GPT-6
@BunsDev
BunsDev merged commit aa2ee9b into main Oct 15, 2026
13 of 14 checks passed
BunsDev added a commit that referenced this pull request Oct 15, 2026
Settings: keep both new checkboxes, the Fable-to-Opus fallback from #210 and
Show Analytics in the rail.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev deleted the credit-fallback branch October 15, 2026 15:41

This branch was successfully deployed

1 active deployment
Preview — eea36541 Deployed Oct 15, 2026 by vercel[bot]
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