GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(server): show and redeem Claude banked resets by rynfar · Pull Request #934 · pylon-code/pylon Conversation
|
| Source | Upstream PR | Disposition |
|---|---|---|
3412097bff7ffa62ef79e735c65d1e5cff71c356 |
pingdotgg/t3code#13118 | Adapted (manual port; see adaptations and exclusions) |
GET /api/oauth/usage?cedar_ember=1&skip_spend=1. Pylon adds cedar_ember=1 to its single shared, throttle-fenced usage read (Claude CLI login only; the Prime and hub readers neither ask nor publish) and stores the credits in the machine-wide shared reading..credentials.json. Pylon's reader already reads the login Keychain, so the same token is used.nextCreditId as creditId. The server refuses, before sending anything, when: the instance was replaced or retired (isCurrent from the RPC handler, plus the runtime fence when present); the account is not positively identified; the snapshot's credit is not that credit or was not marked redeemable; the login on disk is not the one that credit was read with (opaque credential key, same hash the shared usage cache uses); or Claude's account record (.claude.json) does not name the displayed email. All checks run before queueing and again inside the account lock.codexResetCredit -> resetCreditCoordinator, as upstream) is reused: attempts serialise per login + account + credit, a double submit or a second client shares one claim and its receipt, and an unanswered/unconfirmed claim keeps its request id. Upstream's isSettled is ported so a final answer (cooldown, 429, signed out, or any pre-send refusal) releases the id. Clients key their pending attempt by credit too.ServerProviderResetCredits.redeemable is stamped by the driver at publish time (never written to the shared cache). A native balance that names a credit without it — an older server on the same machine serving the shared reading — leaves the control off. Codex names no credit and is unchanged. An older client that sends no creditId is refused for Claude.reset, the confirmed outcome is returned with a warning (Pylon's warning field) rather than an error.resetCreditTargetKey).claude-cli/<version> user agent. Upstream sends user-agent: claude-cli/<version> (external, cli) on both requests. This port sends the same headers Pylon's gauge already sends and does not present as the CLI. Not verified live whether either endpoint requires that user agent; if it does, credits will not appear (fails closed) and this needs a product choice.cedar_ember=1 on the existing gauge request is unverified live. It is assumed not to change the window fields Pylon parses. skip_spend=1 is deliberately not sent.POST /api/organizations/{org}/reset_rate_limits); claudeOAuthUsage.ts previously described that login as read-only gauge access. Flagging for an explicit yes.HttpClient.vp test run on claudeResetCredits.test.ts, resetCreditCoordinator.test.ts, claudeUsageReconciliation.test.ts, claudeOAuthUsage.test.ts, CodexDriver.test.ts, ProviderInstanceRegistryLive.test.ts, ProviderRegistry.test.ts, accountDrainEndToEnd.test.ts, server.test.ts, packages/shared/src/usageLimits.test.ts: 10 files, 407 tests passed (before rebase; the three new/changed server suites rerun after the final edits: 17 passed).vp run -F <pkg> typecheck for t3, @t3tools/contracts, @t3tools/shared, @t3tools/web, @t3tools/mobile, @t3tools/client-runtime: all ran tsc --noEmit, no errors.vp lint on changed files: 3 warnings, all on lines this PR does not touch. vp fmt --check: clean.No rendered-client pass (web or mobile) was done, and nothing was exercised against a real Claude account.
Model: Claude Opus 5.5. Harness: Claude Code in Pylon. Workflow: review-t3-upstream skill.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Recovery check on head |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Claude accounts can bank rate-limit resets. Read them on the OAuth usage reading Pylon already makes and let the user redeem one from the existing "Use reset" control. Redeeming is irreversible, so the server refuses unless what the user was shown still holds: the instance is still registered, the signed-in account and the named credit match the snapshot, the login on disk is the one the credit was read with, and Claude's account record names the same account. Attempts serialise per login and credit and keep one request id until Claude answers. Only a server that can redeem a named credit marks it redeemable, so clients leave the control off for older servers. Adapted from upstream 3412097bff7ffa62ef79e735c65d1e5cff71c356 (#13118).
3796ac7 to
1721353
Compare
|
Closing at the maintainer's decision (2026-10-01): DEF-19 becomes an exclusion. The port calls a private, account-changing Anthropic endpoint, adds |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.