Skip to content

Claude Code runner fails with a subscription token: wrong env var and --bare #6488

Description

@strelov1

Problem

Even with #6487 fixed on the API-client side, the runner path still cannot use a Claude Code OAuth token. Two independent causes:

  1. Wrong env var. The integration hands its credential to runners as ANTHROPIC_API_KEY regardless of the credential kind, so an OAuth token arrives in the wrong variable and the CLI rejects it with Invalid API key. The variable should be chosen from the credential type, mirroring how the API client picks its auth header.

  2. --bare blocks the subscription login. run.js always passes --bare, whose documented behavior includes skipping keychain reads — the same path Claude Code uses to authenticate a subscription token. The run then fails with Not logged in · Please run /login. Reproduced outside SuperPlane: identical arguments succeed without the flag and fail with it.

Expected

A Claude Code component configured with a subscription token runs and bills against the subscription. --bare is omitted when a subscription token is present and kept otherwise, where its isolation costs nothing.

Notes

Depends on #6487. Related: #6204 (Claude components failing without a clear error) — same class of opaque failure.

Affected: pkg/integrations/claude/integration_secrets.go, pkg/components/runner/claude/run.js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions