Skip to content

πŸ› [v6] claude auth: suspend the credential re-bridge and durable-credential watchdog while HIVE_CLAUDE_OAUTH_TOKEN is set - #17851

Closed
clubanderson wants to merge 1 commit into
scanner/fix-17758from
fix-17760-operator-token-skips-rebridge
Closed

clubanderson wants to merge 1 commit into
scanner/fix-17758from
fix-17760-operator-token-skips-rebridge

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17760. Part of #17753 (child 2 of 4).

Stacked on #17762 (base is its branch scanner/fix-17758, which defines the HIVE_CLAUDE_OAUTH_TOKEN intake; GitHub retargets this PR to v6 when #17762 merges). The diff shown here is only this change.

What

While the operator's long-lived token is set, Claude agents authenticate through CLAUDE_CODE_OAUTH_TOKEN and the shared ~/.claude/.credentials.json is not what they use, so the machinery around that file has nothing to act on or alert about:

  • rebridgeClaudeCredential / RepairClaudeCredentialBridges return immediately in operator-token mode: covers the launch path, the 5s watchdog poll and the post-sign-in hook. No files are moved, nothing is audited.
  • evalCredentialWatch skips the Claude probe (no claude_token_missing audit, no "durable credential unusable" warning) and clears its transition record; Copilot is watched exactly as before.
  • Status: CredentialBridgeBroken is not reported for the unused bridge (Manager.snapshotAgent wraps AgentProcess.snapshot for the three status paths).
  • One Info line at startup/first call says the re-bridge and watchdog alerts are suspended for the claude backend. The token is never logged.
  • Token unset: every path behaves exactly as today (existing tests unchanged).

Decision recorded: env-token mode is operator-managed, so the hive neither repairs nor alerts about the Claude credentials file; the token's own health (401) is #17759's job, not the watchdog's.

Tests

src/crux/agent/claude_operator_token_mode_test.go: re-bridge suspended on all three triggers (private file untouched, shared untouched, nothing moved aside, nothing audited, status not flagged, logged exactly once, sentinel token never logged); watchdog Claude probe suspended while Copilot still alerts; token unset keeps today's behaviour.

changelog.d/changed-claude-operator-token-suspends-rebridge.md.

…l watchdog while HIVE_CLAUDE_OAUTH_TOKEN is set

With the operator's long-lived token set, Claude agents authenticate through
CLAUDE_CODE_OAUTH_TOKEN and the shared ~/.claude/.credentials.json is not in
use. The per-agent credential re-bridge (launch, watchdog poll, post-sign-in)
and the watchdog's Claude probe now do nothing in that mode: no files moved,
no claude_token_missing audit or warning, no broken-bridge flag in status. The
suspension is logged once at startup; Copilot watching is unchanged, and with
the token unset nothing changes.

Fixes #17760

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: scanner/fix-17758

Conflicts are checked with every PR merged onto the current tip of scanner/fix-17758, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@clubanderson

Copy link
Copy Markdown
Member Author

/lgtm
/approve

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm
/approve

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow
kubestellar-prow Bot deleted the branch scanner/fix-17758 November 12, 2026 05:35
@kubestellar-prow kubestellar-prow Bot closed this Nov 12, 2026
@kubestellar-prow kubestellar-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 12, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Re-homed onto v6 as #17858 (your commits cherry-picked with authorship preserved) after this PR was auto-closed when its stacked base branch was deleted on #17762's merge.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant