Add claude-code provider: run RLE on a Claude subscription#22
Merged
Conversation
New ClaudeCodeProvider routes deliberations through the Claude Code CLI in headless print mode (claude -p) instead of the Messages API, billing the user's Claude plan rather than an API key. Fable 5 is free on subscriptions through June 22, which makes this the cheapest way to run the benchmark on it. The subprocess runs from a neutral temp cwd with --tools "", --setting-sources "" and --strict-mcp-config so no project CLAUDE.md, settings, tools, or MCP servers leak into deliberations. CLAUDECODE (nested-session guard) and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN (would flip billing to the API) are stripped from the child env. Sampling params are accepted and ignored; the CLI does not expose them. Registered as --provider claude-code in both CLI scripts; the --no-think prefill gate now also covers this provider (prefills unsupported). Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Fable 5 is free on Claude subscriptions through June 22, and
claude -p/ Agent SDK usage is covered by plans (monthly Agent SDK credits after June 15). RLE previously could only bill an API key. This adds a provider that routes deliberations through headless Claude Code using the machine's existing subscription login.What
ClaudeCodeProvider(src/rle/providers/claude_code.py): flattens[SYSTEM, USER]messages into--system-prompt+ stdin, invokesclaude -p --output-format json, maps the result envelope toCompletionResultwith real token usage.--tools "",--setting-sources "",--strict-mcp-config— deliberations see nothing but our prompts.CLAUDECODE,ANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKENstripped from the child env (the first crashes nested sessions; the others flip billing to the API).--provider claude-codeinrun_scenario.py/run_benchmark.pyandRLEConfig.--no-thinkprefill gate extended to cover this provider.Verified
🤖 Generated with Claude Code