Skip to content

[scanner] [v6] claude auth: accept HIVE_CLAUDE_OAUTH_TOKEN and inject it as CLAUDE_CODE_OAUTH_TOKEN for every claude agent #17758

Closed

Description

@hivecommons-hive

Part of #17753 (child 1 of 4).

Target: v6.

Add a hive-side secret HIVE_CLAUDE_OAUTH_TOKEN (env or secret file, handled like the other hive secrets) holding an operator-generated claude setup-token token, and when it is set launch every claude-backend agent with CLAUDE_CODE_OAUTH_TOKEN set to it — whether or not a credentials file exists.

Scope (items 1–3 of the parent):

  • Secret intake: never logged, never returned by API/MCP, never written to a pane. Reuse the existing secret path (tmux set-environment, not the command line) that the current last-resort fallback in src/crux/agent/manager_env.go (~L440-468) already uses.
  • Precedence: the long-lived token wins over a dashboard sign-in; a later dashboard sign-in must not switch agents back to the 8-hour token.
  • Unset → behaviour exactly as today (existing tests unchanged).
  • Tests on the agent env pairs: token set with file, token set without file, token unset; redaction test with a sentinel value across log/API/MCP surfaces.
  • changelog.d/added-claude-long-lived-token.md fragment.

Out of scope here (separate children): suppressing the re-bridge/watchdog, status/401 surfacing, docs.

Decision taken by hive: the env var name HIVE_CLAUDE_OAUTH_TOKEN from the parent is used as-is; file form follows the existing hive secret-file convention. The parent's "Verify first" measurements need an operator-held setup-token and are tracked on the parent.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Nov 11, 2026
  2. hivecommons-hive commented on Nov 12, 2026

    @hivecommons-hive
    ContributorAuthor

    Fixed by #17762 (merged 8c35975). Closing. Reply /reopen if the problem persists.

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

    agent/scannerCreated or modified by the scanner agenthas-open-prhelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions