Summary
Add a claude_agent_sdk provider that routes inference through claude -p (or @anthropic-ai/claude-agent-sdk) instead of the Anthropic HTTP API, so subscribers can use OpenHuman against their Claude plan's Agent SDK credit.
Why
Starting June 15, 2026, Anthropic Pro/Max/Team/Enterprise plans include a separate monthly credit for Agent SDK and claude -p usage, including third-party apps built on the SDK (Help Center):
Pro: $20/mo
Max 20x: $200/mo
Team Premium: $100/seat/mo
The credit is only redeemable through the Agent SDK surface — not generic HTTP API calls with ANTHROPIC_API_KEY. Today, OpenHuman's Anthropic path goes through the HTTP API, so subscribers effectively pay twice (flat sub + per-token charges) or skip OpenHuman for Claude work. An SDK provider unlocks the credit for OpenHuman users.
Proposed approach:
New claude_agent_sdk provider in src/openhuman/providers/
Spawn claude -p as a child process; communicate over stdin/stdout JSON-RPC (control_request / control_response with request_id multiplexing)
Map OpenHuman tool calls onto the SDK's can_use_tool callback so existing approvals still apply
Don't handle OAuth tokens directly — assume user has run claude setup-token; CLI manages CLAUDE_CODE_OAUTH_TOKEN refresh
Doctor check for claude binary + token status
Config:
toml [providers.claude_agent_sdk]
enabled = true
binary = "claude"
model = "claude-sonnet-4-6"
permission_mode = "default"
Out of scope (first PR)
Migrating other providers
Composio/integrations changes (SDK provider should be transparent to them)
Local fallback when credit is exhausted (good follow-up)
Open questions
- Spawn claude -p as a subprocess, or call the TS SDK directly from the existing node_runtime module?
- Credit-exhausted behavior — fall back to a configured secondary provider, or hard-fail with a clear message?
References
Help Center: Agent SDK with your Claude plan
Agent SDK docs
Subprocess protocol reference
Prior art: ai-sdk-provider-claude-code
Contribution
Can help with design discussion and testing the subscription credit flow once it ships. Would need a Rust-fluent co-contributor for the core subprocess and provider work.
Summary
Add a claude_agent_sdk provider that routes inference through claude -p (or @anthropic-ai/claude-agent-sdk) instead of the Anthropic HTTP API, so subscribers can use OpenHuman against their Claude plan's Agent SDK credit.
Why
Starting June 15, 2026, Anthropic Pro/Max/Team/Enterprise plans include a separate monthly credit for Agent SDK and claude -p usage, including third-party apps built on the SDK (Help Center):
Pro: $20/mo
Max 20x: $200/mo
Team Premium: $100/seat/mo
The credit is only redeemable through the Agent SDK surface — not generic HTTP API calls with ANTHROPIC_API_KEY. Today, OpenHuman's Anthropic path goes through the HTTP API, so subscribers effectively pay twice (flat sub + per-token charges) or skip OpenHuman for Claude work. An SDK provider unlocks the credit for OpenHuman users.
Proposed approach:
New claude_agent_sdk provider in src/openhuman/providers/
Spawn claude -p as a child process; communicate over stdin/stdout JSON-RPC (control_request / control_response with request_id multiplexing)
Map OpenHuman tool calls onto the SDK's can_use_tool callback so existing approvals still apply
Don't handle OAuth tokens directly — assume user has run claude setup-token; CLI manages CLAUDE_CODE_OAUTH_TOKEN refresh
Doctor check for claude binary + token status
Config:
toml [providers.claude_agent_sdk]
enabled = true
binary = "claude"
model = "claude-sonnet-4-6"
permission_mode = "default"
Out of scope (first PR)
Migrating other providers
Composio/integrations changes (SDK provider should be transparent to them)
Local fallback when credit is exhausted (good follow-up)
Open questions
References
Help Center: Agent SDK with your Claude plan
Agent SDK docs
Subprocess protocol reference
Prior art: ai-sdk-provider-claude-code
Contribution
Can help with design discussion and testing the subscription credit flow once it ships. Would need a Rust-fluent co-contributor for the core subprocess and provider work.