@stratusagent/provider-claude-code
v0.6.0
Published
Claude subscription runtime for Stratus Agent: runs turns through the Claude Agent SDK so Pro/Max plans cover usage
Maintainers
Readme
@stratusagent/provider-claude-code
The Claude subscription runtime for Stratus Agent: turns run through the Claude Agent SDK (Claude Code as a library), so a Claude Pro/Max plan covers usage instead of per-token API billing.
import { createClaudeCodeProvider } from '@stratusagent/provider-claude-code';
const provider = createClaudeCodeProvider({
authToken: process.env.CLAUDE_CODE_OAUTH_TOKEN, // from `claude setup-token`
model: 'claude-opus-5', // default
});- The agent's persona and long-term memory are rendered as the system prompt, and multi-turn sessions are replayed as a transcript — a Stratus agent is the same person on this runtime as on the API-key provider.
- Kernel tools run here too. Pass
executeTool(the CLI wiresAgentRunner.executeHostedToolCallautomatically) and the request's tools are bridged into the Claude Code loop as an in-process MCP server: Claude calls them mid-turn, your host executes them — approval policy, agent allowlists, andtool.called/tool.completedevents included — and the result feeds back into the same turn.memory.rememberworks on a subscription exactly like it does on an API key. - The subprocess environment pins billing to the subscription in both auth modes (any ambient
ANTHROPIC_API_KEYis cleared). WithauthTokenset the setup token is used; omit it to use the machine's existingclaudesign-in. - Claude Code's built-in tools stay disabled — Stratus owns the tool surface.
Most users won't wire this directly — @stratusagent/cli routes subscription sign-ins here automatically: stratus setup → Providers → Claude → Claude subscription.
