Add Anthropic Claude subscription support (Pro/Max) #214
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Creatidy/scarcity-router#214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add evidence-backed Anthropic Claude Pro/Max subscription support to Scarcity Router's existing recommendation and optional execution-gateway architecture, without changing its ownership, security or routing boundaries.
Why and Current Baseline
Canonical
developwas fetched atcd8fb16b62472b0c4a437a33718c84bbeaaa0ea8on 2026-10-22. The current collectors support OpenAI/Codex and Z.ai Coding Plan.docs/providers.mdnames Claude subscription telemetry as the highest-priority later collector, contingent on authentication, security and maintenance evaluation. No equivalent Claude subscription feature issue was found.Related work is not a duplicate: closed #92 is the ZCode feasibility/execution-source precedent; open #181 covers versioned protocol compatibility and an evidenced Responses subset, and explicitly treats Anthropic Messages ingress separately. Closed #158 and #150 also record Anthropic Messages as out of scope for their respective work. This issue does not add an Anthropic Messages API ingress or duplicate #181.
Scope
Subscription telemetry
rate_limits.five_hourandrate_limits.seven_day, with source/version/date evidence.claude -pmerely to refresh telemetry. If no safe non-inference acquisition path exists, record that limitation and keep capacity unknown/unsupported rather than inventing a refresh path.seven_dayas the existing weekly kind only when the official semantics establish that mapping. Missing, malformed, stale, future-dated, reset-crossed or unverified observations remain unknown/stale; never synthesize zero or full capacity.Subscription-backed execution
claude -p) and Claude Agent SDK at pinned versions, including their official authentication, model identity, capabilities, tool behavior, streaming, cancellation, error and usage semantics. Establish whether each can use an eligible Claude plan without switching to API PAYG.Authentication and terms
Acceptance Criteria
Offline implementation and verification
Deferred live acceptance: Claude Pro ($20/month)
Dependencies, Reuse and Priority
No blocking issue dependency for offline research, telemetry parsing or deterministic fixtures. Reuse the accepted resource/collector and execution/worker architecture (#85-#91), with #92 as a provider-CLI feasibility precedent. Preserve D-040 through D-045, D-053/D-056, D-063/D-073, D-076, capacity v3 and the current routing/security contracts. Related open #181 is not a dependency and does not authorize Anthropic Messages ingress; coordinate only if a verified shared compatibility contract is needed. Preserve the existing ZCode migration/ownership gate in #199; neither this issue nor Claude support is authority to extend or retire that path. Do not make unrelated work or completion of the live account gate a prerequisite to the offline deliverables.
Constraints
This is future implementation work, not authorization to implement now. No subscription purchase, billable/live test, PAYG or additional-credit use is authorized. No OAuth credential handling, arbitrary endpoint, new network exposure, new credential storage, autonomous fallback, second routing/agent/workspace system, API Messages ingress, catalog rating without provenance, or changes to existing provider regressions/security requirements. Any materially incompatible public contract, ownership, terms, authentication or security finding remains explicitly unsupported/owner-gated until resolved.
Links
docs/providers.md,docs/capacity-model.md,docs/architecture.md,docs/security.md,docs/decisions.md,docs/roadmap.mdSelected for independently authorized OFFLINE work under Adrian's 2026-10-24 explicit resumed /loop directive, after reconciling PR206/209/204. Registration alone did not authorize implementation; the later explicit /loop selection now supplies that authority, without weakening any terms/auth/source/public-contract gate. Base
b2b35bce6678ebc4e393e8c5d78f8c1044f4b119; branch will be issue-214-claude-subscription. Live Pro/Max account use, acquisition prompts, purchases, inference, credits/PAYG, workspace/tool access and permanent provider guarantees remain unauthorized/deferred. Scope begins with pinned official evidence and deterministic offline parsing/refusal fixtures, not a promised executable adapter.Selection evidence: full canonical open issue queue refreshed through page2(empty), initially16 then15 after #205 closure. Exact wontfix exclusions:132/139/140/141/165/166, not substring/history filtering. Preserved owner-only exact-current review gates for174/PR204 and185/PR209; no ordinary/security ordinal added. #176 actual MI producer revalidated at
d65891668b7e79f7b666c021f02a1b4bf8c4ca9c: publication exists, while Router185 compatibility/private admission-calibration approval gate activation, not research. #177 formal174 prerequisite and accepted Kernel58 local schema/rights specification (20e7f3e/merge98656f6) are distinguished from unimplemented full-cost/route/call collection. #181 implementation is explicitly ordered after174/175/179 semantics; contract research and actual179 baseline remain available, real-harness receipts are separate. #183's stated140 state-correctness prerequisite is excluded, not silently resurrected;179 is delivered. #186 explicit139/141/185 ordering and platform/signing/publication authority stay bounded. #199 still requires actual replacement/consumer/composed receipts and explicit owner retirement; Kernel52/60 contracts were refreshed, not treated as delivered merely by issue state. None of these issue-local gates blocks214's expressly independent offline work; no false QUEUE_EMPTY/program-inactivity claim.#214 has no issue dependency. Live account gate is not an offline implementation/review gate (AC5/8). No prior PR/review history exists for this delivery; default finite10 whole-PR reviews remains, with security/owner-manual requirements classified from actual changes. No inference or review is dispatched by this selection record.
Offline source study and bounded implementation are in progress on issue-214-claude-subscription from
b2b35bc. Official public npm metadata pins CLI2.1.310 and SDK0.3.310 (exact SHA512 SRI in dated poc-evidence); no installation/execution/account/credential/model call. Statusline docs recovered via official Markdown after one reader timeout; metadata lookup recovered by explicit existing Node PATH in a synthetic HOME, not by installing tools.Material findings: official SDK-plan help permits subscription use while legal/compliance restricts third-party OAuth absent express permission; no permissive legal conclusion is invented (U-015). Statusline has no original quota timestamp and may repeat on timers. Bare CLI mode changes auth to API/no subscription login; normal print may load native hooks/tools. Cost budget is an overshootable estimate, not complete-path no-PAYG. Thus acquisition/execution remain unsupported, live acceptance DEFERRED.
Small offline scope: one pure unregistered partial statusline parser, one synthetic fixture,14 deterministic tests and dated evidence/contract boundaries in existing docs. Always status unknown; no unit/model scope/plan or billing assertion. Percentage facts require explicit original observation provenance plus positive caller freshness policy; missing/stale/future/reset-crossed/fractional values are withheld, unknown buckets drift atomically. The actual native payload supplies no such provenance, so no production collector/caller/CLI flag/catalog or selector/public enum is enabled. Raw auth/account/session/path/cost fields never enter output. Existing two-provider status and interfaces remain unchanged.
Threat/complexity boundary: untrusted JSON/timestamps to bounded pure data only; zero credential/network/process/tool/workspace/auth changes, no execution authority, no new service/dependency. This passive, nonactivated parser is not classified security_critical; ordinary independent review must assess that classification and privacy/correctness/UX. Any actual auth/source/adapter activation retains separate security/manual gates. Default budget10 fresh visible whole-PR reviews; no invocation yet and no counter imported from other PRs.254 focused Claude/status/selection/resource-policy/public-interface tests pass; standalone basedpyright now0diagnostics after fixing test-boundary typing. Full gate will run before commit/PR/review.
Offline delivery integrated through canonical PR217 at develop merge
57cef8275b766a6ecf678db83ea88767b061aa21(2026-10-24T18:09:36Z). Verified parents are exact approved baseb2b35bce6678ebc4e393e8c5d78f8c1044f4b119and HEADe5c8d8fa9ba57c44ff88c88efcbd0d3e614fbb7c; integrated tree equals validated/approved treeeb4662db8fba8c66ea18641b9024c5bd5ba45ff9byte-for-byte. No main/release/deployment.Offline scope independently APPROVED at ordinary#2 (fresh native read-only session
ses_e90e7c42dffegG6rWn4seIYnI7, PR comment18729), findings[]/limitations[], no owner relay. #1 COMMENT access-limitation outcome preserved; default10 unchanged. No permission/profile/framework changes to recover: primary raw Git proof plus independently inspected canonical pinned source used the existing workflow. Classification remains non-security-critical inactive zero-I/O parsing, not actual provider/source activation.PASS: full make check2869/17skips; basedpyright0; package-check;254 focused tests and all whitespace gates, synthetic environment only. Dated official source/SRI pins, unsupported compatibility/terms/freshness findings, pure partial parser, synthetic fixture14 tests and unknown/no-echo/no-I/O/nonactivation behavior are integrated. Existing provider/catalog/public enum/status/source/execution/workspace authority and D-078 unchanged.
Issue214 intentionally REMAINS OPEN. Offline deliverable accepted; actual permitted acquisition/plan/auth/model/reset/source-freshness/billing/no-PAYG/stream/cleanup/live Pro acceptance remains DEFERRED under AC6-8/U-015. The statusline has no original quota timestamp and CLI/SDK permission/control findings remain unresolved; no source refresh, OAuth extraction, prompt, API-key/credits fallback, native workspace/tool grant or supported-route claim is authorized. No synthetic parser fact is installed consumer/live acceptance. Future work needs actual permitted contract/control evidence and separately authorized account tests, not repeated model calls on this same completed offline scope.
Post-integration /loop evidence refresh at
57cef8275b766a6ecf678db83ea88767b061aa21: complete canonical open-issue page1 has15 entries; page2 empty. Excluded only exact wontfix132/139/140/141/165/166. No eligible work was stopped merely because another PR has an owner gate: this invocation retired206, corrected/validated209+204, refreshed producer research, then independently approved/merged217 offline scope. Current checkout clean develop; only PR204/209 remain open.Remaining issue-local stages/owners, not a whole-program inactivity claim:
-174/PR204 and185/PR209: current corrected heads lack ordinary APPROVE; explicit existing formal-review/conditional manual-security bounds and this owner's no-new-ordinal directive gate integration. All authorized code/validation is published; no new owner authority appeared in fresh canonical history. Earliest predecessors are these already-remediated deliveries, not an invented downstream receipt dependency.
-176: actual MI publication exists and was inspected at current
d65891668b7e79f7b666c021f02a1b4bf8c4ca9c; Router185 compatibility and explicit private admission/calibration approval gate activation/bootstrap migration. Research is not declared blocked or exhausted.-177/181: explicit174 producer/retained-requirement sequencing remains; current develop gateway blob421b05f still lacks /v1/route (actual Git object inspected), rather than inferring absence from open issue state.175/179 are delivered. Accepted Kernel58 schema/rights specification20e7f3e/98656f6 exists; actual current full task/call collector/installed harness coverage remains UNVERIFIED, not fabricated missing-contract evidence. Kernel current develop freshly pinned
e1aca78b0e56afffb245005e25ecb7b155a8367a. Downstream physical receipts do not gate upstream174 implementation already completed.-183: stated140 correctness predecessor remains excluded; actual current control_api state/resources views count/iterate static _config.resources (lines1519-1530,1563-1582), so its required derived-resource guarantees cannot honestly be advertised. Existing179 metadata is not missing. No excluded140 work is silently revived.
-186: explicit139/141/185 ordering stays; no private signing/publication/platform acceptance or paid test authority is invented. Public artifact research can remain independent; final release/composed guarantees are not delivered.
-199: accepted Kernel replacement/consumer/composed evidence and explicit owner retirement are still required; neither new passive Claude parsing nor old live ZCode evidence retires D-063.
-214: offline deliverable is integrated; only actual permitted acquisition/activation/live conditions remain. U-015 official permission/freshness/control gaps cannot be solved by a prompt, token extraction, configured plan label, paid fallback or repeated synthetic tests. Live account use/purchase/inference remains unauthorized. No additional speculative parser/framework/issue is needed to keep the loop running.
Verified prerequisites/owner gates are distinguished from the explicitly UNVERIFIED future producer/consumer/runtime checks above. No unavailable evidence is called approval, no cross-repository mutation, no hidden launch or skipped security gate. Normal research work is not claimed impossible; no further full implementation delivery is verified eligible under these explicit prerequisites at this refresh. Retirement/merge references and all actual ordinals remain canonical.
Current owner triage, 2026-11-01: P3, activation deferred. Offline parser and fixtures already integrated in PR #217 (merge
57cef8275b766a6ecf678db83ea88767b061aa21); do not repeat that implementation. Subscription acquisition and execution remain unsupported: Router requires verified official authentication and terms, original observation freshness/source provenance, actual plan/billing and no-PAYG control, and compatible execution/tool boundaries before activation; the status-line payload lacks an original quota timestamp. Earliest independent work is bounded current official-contract/terms research without credentials or inference. Owner-authorized account access and precisely scoped live/billing tests are separate acceptance gates; no credentials, purchase, provider use or inference are authorized here. Existing review history remains unchanged.