Skip to content

Name the Claude sessions' client: CLAUDE_CODE_ENTRYPOINT=bosun, and measure its weighting #283

Backlog

Description

@PlugFox

anthropics/claude-code#97074 (open, no answer from Anthropic): a claude -p run labels itself entrypoint: sdk-cli (cc_entrypoint in the billing header), and several controlled A/B runs measured sdk-cli/sdk-ts drawing the 5-hour window 1.8-3x faster than cli or claude-vscode for the same tokens; the weekly window by a smaller 1.14-1.32x. The VS Code extension is a headless stream-json session too, so the label, not the mode, is what is weighted.

bosun is affected: bosun-runner's Claude runner spawns claude -p with a constructed environment (#2) that never sets CLAUDE_CODE_ENTRYPOINT, so every card session is sdk-cli (all 78 card sessions of the last three days in the transcripts).

Decision

  • The runner sets CLAUDE_CODE_ENTRYPOINT=bosun: an honest label of its own, as T3 Code and BaoCode did. Posing as cli or claude-vscode is ruled out.
  • Whether bosun is weighted as sdk-cli is undocumented, so it is measured, passively: an active A/B on the weekly window (the only window this Max account has now; five_hour is null) would cost 25-30% of a week at 1% resolution.

Measurement

A sampler outside the repository reads the account's weekly utilization every 10 minutes. Each rise of the meter is matched to the API-price-weighted tokens of the transcripts in that interval, by entrypoint (cli, sdk-cli, bosun), and a regression gives the weighted tokens per 1% of each label. Read after several days of ordinary use.

Acceptance

  • Every Claude session the runner spawns, fresh or resumed, carries CLAUDE_CODE_ENTRYPOINT=bosun. Mutant mutant_runner_entrypoint_unnamed (the variable is left out) turns claude::tests::the_command_names_bosun_as_the_client red.
  • The measurement's result is a comment here: tokens per 1% of the week for each label, with the intervals, and whether bosun keeps the label.

Activity

  1. PlugFox commented on Nov 29, 2026

    @PlugFox
    OwnerAuthor

    Landed in 36018e7; the installed daemon runs it since 2026-11-29T16:29Z (a probe's transcript records entrypoint: bosun). The sampler reads the weekly meter every 10 minutes from 2026-11-29T16:28Z; at the start the week is at 37% (five_hour is null on this account). Sampler and analysis live outside the repository (operator data).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions