Skip to content

Add a Claude Agent SDK provider that uses your local Claude Code login - #368

Open
sstockdev wants to merge 2 commits into
interviewstreet:mainfrom
sstockdev:main
Open

Add a Claude Agent SDK provider that uses your local Claude Code login#368
sstockdev wants to merge 2 commits into
interviewstreet:mainfrom
sstockdev:main

Conversation

@sstockdev

Copy link
Copy Markdown

This adds a Claude Agent SDK provider so you can run the evaluator with a Claude model using your local Claude Code login, without setting an API key.

This is separate from the existing anthropic provider. That one calls the Anthropic API and needs ANTHROPIC_API_KEY. This one rides on whatever you're already logged into in Claude Code.

Uses your local Claude Code login instead of an API key. Adds a
`claude_agent` entry in providers.json and a new ClaudeAgentProvider, wired
into the config-driven provider setup. The SDK is an optional, lazily
imported dependency, so a normal install doesn't need it.
The SDK provider joined text across every streamed assistant message,
so a partial draft got glued onto the final answer and produced two
JSON objects in a row. It also dropped the caller's schema, ran the
subprocess with the host project's CLAUDE.md, settings, skills, and
hooks loaded, and capped turns at 1. Together these broke resume
extraction and scoring.

- Keep only the last assistant message; prefer ResultMessage
  structured_output, then result.
- Pass the caller's schema to output_format so the CLI returns
  validated JSON.
- Run the subprocess in isolation mode: no filesystem settings,
  skills, or MCP servers.
- Raise max_turns to 8 so structured output can finish.
- Retry evaluate_resume up to 3 times on bad JSON.
- Quiet the SDK's per-call bundled-CLI log line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant