Skip to content

Send bb as the Claude Code entrypoint instead of sdk-cli - #6952

Closed
Xuoon wants to merge 1 commit into
get-bb:mainfrom
Xuoon:claude-entrypoint-bb
Closed

Xuoon wants to merge 1 commit into
get-bb:mainfrom
Xuoon:claude-entrypoint-bb

Conversation

@Xuoon

@Xuoon Xuoon commented Nov 3, 2026

Copy link
Copy Markdown

Human comments

What was wrong

buildSessionEnv sets CLAUDE_CODE_ENTRYPOINT=cli (#84), which Claude Code sends as cc_entrypoint=sdk-cli in SDK mode. Anthropic meters sdk-* entrypoints at roughly 1.6-2.9x the 5-hour usage of the interactive CLI for the same tokens (anthropics/claude-code#97074), so subscription users hit the 5-hour limit sooner in bb. T3 Code fixed the same problem by sending its own name (pingdotgg/t3code#28410). Theo says he got "semi-solid permission" from Anthropic to merge that change (video, 14:37).

What changed

How you verified

  • Request capture: Claude Code 2.1.317 (claude -p --input-format stream-json --output-format stream-json) against a local server:
    • unset or cli: cc_entrypoint=sdk-cli, User-Agent: claude-cli/2.1.317 (external, sdk-cli)
    • bb: cc_entrypoint=bb, User-Agent: claude-cli/2.1.317 (external, bb)
    • Through the Agent SDK, the user agent also carries agent-sdk/<version>. cc_entrypoint is the same.
  • New it.each test in bridge.test.ts: an inherited inherited becomes bb, and a configured custom stays custom. The custom case fails when the default is spread after envOverrides.
  • Updated tests:
    • The thread/start env test expects bb.
    • The model-probe recovery test seeds an inherited entrypoint and expects bb.
    • Both fail on main (Expected: "bb", Received: "cli").
  • pnpm exec turbo run typecheck test lint --filter=bb-plugin-provider-claude-code: 431 tests pass, lint is clean, and oxfmt --check passes on the changed files.
  • Not measured: the meter itself, i.e. 5-hour usage with bb vs sdk-cli on a real account. That evidence is T3 Code's measurement for t3-code.

Fixes #6951

AGENT GENERATED

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the needs-approval PR author is not on the approved contributor list label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for the pull request, @Xuoon. It was closed automatically because it does not meet the requirements below yet. This is an automated check, not a review of the change.

Contributor approval. bb reviews pull requests only from approved contributors, and you are not on the list yet. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to your pull request, and explain what it changes and why. A maintainer then adds you to the list and reopens the pull request.

See CONTRIBUTING.md for details.

@github-actions github-actions Bot closed this Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-approval PR author is not on the approved contributor list

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Code threads report cc_entrypoint=sdk-cli and drain the 5-hour limit faster

1 participant