Skip to content

Default BENCH_PROVIDER=claude_code for Bench self-governance#7

Merged
dburks-svg merged 2 commits into
mainfrom
bench/default-claude-code-provider
Jun 26, 2026
Merged

Default BENCH_PROVIDER=claude_code for Bench self-governance#7
dburks-svg merged 2 commits into
mainfrom
bench/default-claude-code-provider

Conversation

@dburks-svg

Copy link
Copy Markdown
Contributor

What

Sets BENCH_PROVIDER=claude_code in the project's .claude/settings.json env block, making the Claude Code subscription the default provider when Bench governs its own repo.

Why

Bench only runs inside Claude Code (a PreToolUse hook), so every contributor already has subscription auth available. Defaulting to claude_code means contributors govern the Bench repo through their existing subscription with no separate ANTHROPIC_API_KEY. Dogfoods the provider added in #6.

Details

  • The PreToolUse hook config is unchanged; only the env block is added.
  • Overridable per contributor: set BENCH_PROVIDER in .claude/settings.local.json (gitignored; local settings load after project and win) to use a different provider or your own key.
  • Takes effect on a fresh Claude Code sessionenv is applied at startup, so a restart is needed to pick it up.
  • Trade-off: each governed Write/Edit cold-starts three claude -p calls, so edits are slower than the direct-API path. Tunable via BENCH_CLAUDE_TIMEOUT.
  • Ledger files carry this session's fail-open governance entries (no provider key was set during the edit), committed per the ledger-is-source policy.

🤖 Generated with Claude Code

dburks-svg and others added 2 commits June 25, 2026 23:05
Sets BENCH_PROVIDER=claude_code in the project's .claude/settings.json env
block so Bench governs its own repo through each contributor's Claude Code
subscription instead of requiring a separate ANTHROPIC_API_KEY. Bench only
runs inside Claude Code (a PreToolUse hook), so subscription auth is always
present. The PreToolUse hook config itself is unchanged.

Overridable per contributor: set BENCH_PROVIDER in .claude/settings.local.json
(local settings load after project and win). Takes effect on a fresh Claude
Code session, since env is applied at startup.

Ledger files carry this session's fail-open governance entries (no provider
key was set during the edit), committed per the ledger-is-source policy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…code-provider

# Conflicts:
#	ledger/bench-ledger.json
#	ledger/ledger-meta.json
@dburks-svg
dburks-svg merged commit 57eb1f6 into main Jun 26, 2026
@dburks-svg
dburks-svg deleted the bench/default-claude-code-provider branch June 26, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant