Repository navigation
π [v6] claude auth: suspend the credential re-bridge and durable-credential watchdog while HIVE_CLAUDE_OAUTH_TOKEN is set - #17851
Conversation
β¦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>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
/lgtm |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
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. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
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: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Fixes #17760. Part of #17753 (child 2 of 4).
Stacked on #17762 (base is its branch
scanner/fix-17758, which defines theHIVE_CLAUDE_OAUTH_TOKENintake; GitHub retargets this PR tov6when #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_TOKENand the shared~/.claude/.credentials.jsonis not what they use, so the machinery around that file has nothing to act on or alert about:rebridgeClaudeCredential/RepairClaudeCredentialBridgesreturn 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.evalCredentialWatchskips the Claude probe (noclaude_token_missingaudit, no "durable credential unusable" warning) and clears its transition record; Copilot is watched exactly as before.CredentialBridgeBrokenis not reported for the unused bridge (Manager.snapshotAgentwrapsAgentProcess.snapshotfor the three status paths).Infoline at startup/first call says the re-bridge and watchdog alerts are suspended for the claude backend. The token is never logged.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.