hermes - 💡(How to fix) Fix [Feature]: Claude Agent SDK model provider with subscription OAuth (Codex-style) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#25267Fetched 2026-05-14 03:47:44
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
1
Author
Participants
Timeline (top)
labeled ×4subscribed ×2
RAW_BUFFERClick to expand / collapse

Problem or Use Case

I want to run Hermes with Claude as the model backend while staying on my Claude subscription, but the existing anthropic provider requires a Developer Platform API key and bills separately — so Claude-subscribed users effectively pay twice (subscription + per-token API).

Starting June 15, 2026, Anthropic decouples Agent SDK and claude -p usage from interactive subscription limits and introduces a separate monthly Agent SDK credit:

PlanMonthly Agent SDK credit
Pro$20
Max 5x$100
Max 20x$200
Team (Standard / Premium)$20 / $100
Enterprise (usage-based / Premium seats)$20 / $200

The credit explicitly covers "third-party apps that authenticate with your Claude subscription through the Agent SDK." Source: Anthropic Help Center.

Today there's no way to route Hermes into that credit — even Pro / Max subscribers must fund an API key on top of their plan. A Claude-subscription-OAuth provider would close the gap, the same way the existing Codex OAuth credential pool already does for OpenAI subscribers.

Proposed Solution

A new model-provider plugin that wraps the Claude Agent SDK with Claude subscription OAuth, mirroring the existing Codex OAuth path. Coexists with the current anthropic (API-key) provider rather than replacing it, so users on the Developer Platform are unaffected.

Plugin layout

  • New plugin at plugins/model-providers/claude-agent-sdk/, wrapping claude-agent-sdk (Python) or @anthropic-ai/claude-agent-sdk (TypeScript).
  • Either a new ClaudeAgentSdkTransport under agent/transports/, or extend the existing AnthropicTransport to swap auth header / endpoint by credential type — whichever fits the ProviderTransport ABC more cleanly.

Auth integration

  • Detect Claude Code OAuth credentials at ~/.claude/, paralleling the existing ~/.codex/auth.json import path.
  • Reuse the Codex credential-pool plumbing for refresh, rotation, and stale-token handling.

Config / UX

  • New provider option (e.g. claude_subscription) selectable in hermes model, symmetric to the Codex subscription option.
  • New env var, e.g. HERMES_CLAUDE_SUBSCRIPTION_AUTH=1, or auto-detect when ~/.claude/ credentials exist and no Anthropic API key is set.
  • Surface a docs / UX warning when a subscription provider is selected for shared multi-user deployments — per Anthropic, the credit is "sized for individual experimentation"; production multi-tenant automation should still use API keys.

Open implementation questions

  • The Agent SDK ships its own agent loop. Since Hermes is itself an agent, the cleanest integration is likely the SDK's lower-level / non-interactive surface rather than letting both loops fight for control of tool use and context. Worth scoping during design.
  • Anthropic's formal terms for subscription auth in third-party Agent SDK apps will be posted when the claim flow opens — worth re-checking against Hermes' usage pattern before merging.

References

Alternatives Considered

  • Keep the status quo (anthropic provider with API key). Works, but Claude-subscribed users pay twice. The new June 15 credit policy makes this less defensible: there's now a published, supported path for third-party apps to authenticate through the subscription.
  • Route Claude via OpenRouter. Adds ~5.5% platform fee on top, still pay-per-token, and doesn't touch the new subscription credit. Useful for multi-provider flexibility, not for cost.
  • Switch to Codex / OpenAI subscription via the existing Codex OAuth pool. Already supported and works today, but forces users away from Claude as the backend, which isn't a trade-off Claude-subscription users would want to make.
  • Community subscription-auth shims (claude_max, claude-code-router, etc.). Technically bolt-on-able, but lives in ToS gray-area territory and is likely to break as Anthropic tightens auth flows around the formal credit program. A first-class provider plugin is cleaner and more durable.

Feature Type

Other

Scope

None

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING